Realtime Weather
bash
curl "https://api.caiyunapp.com/v2.6/TAkhjf8d1nlSlspN/-74,40.7/realtime.json?lang=en_US&unit=imperial"
json
{
"status": "ok",
"api_version": "v2.6",
"api_status": "alpha",
"lang": "en_US",
"unit": "imperial",
"tzshift": -14400,
"timezone": "America/New_York",
"server_time": 1712644976,
"location": [40.7, -74.0],
"result": {
"realtime": {
"status": "ok",
"temperature": 44.19,
"humidity": 0.61,
"cloudrate": 0.42,
"skycon": "PARTLY_CLOUDY_NIGHT",
"visibility": 17.6,
"dswrf": 0.0,
"wind": { "speed": 4.46, "direction": 245.74 },
"pressure": 101561.59,
"apparent_temperature": 39.56,
"precipitation": {
"local": { "status": "ok", "datasource": "radar", "intensity": 0.0 },
"nearest": { "status": "ok", "distance": 55.3, "intensity": 0.125 }
},
"air_quality": {
"pm25": 0,
"pm10": 0,
"o3": 0,
"so2": 0,
"no2": 0,
"co": 0,
"aqi": { "chn": 0, "usa": 0 },
"description": { "usa": "", "chn": "missing" }
},
"life_index": {
"ultraviolet": { "index": 0.0, "desc": "None" },
"comfort": { "index": 12, "desc": "Damp & Cold" }
}
},
"primary": 0
}
}
Here's the translation:
JSONPath $.result.realtime. | Description |
---|---|
temperature | Surface 2m temperature |
apparent_temperature | Apparent temperature |
pressure | Ground-level atmospheric pressure |
humidity | Surface 2m relative humidity (%) |
wind.direction | Surface 10m wind direction |
wind.speed | Surface 10m wind speed |
precipitation.nearest.distance | Distance to the nearest precipitation |
precipitation.nearest.intensity | Precipitation intensity at the nearest location |
precipitation.local.intensity | Local precipitation intensity |
cloudrate | Total cloud cover (0.0-1.0) |
dswrf | Downward shortwave radiation flux (W/M2) |
visibility | Surface horizontal visibility |
skycon | Weather phenomenon |
life_index.comfort.desc | See Life Index |
life_index.ultraviolet.desc | See Life Index |
air_quality.pm25 | PM25 concentration (μg/m3) |
air_quality.pm10 | PM10 concentration (μg/m3) |
air_quality.o3 | Ozone concentration (μg/m3) |
air_quality.no2 | Nitrogen dioxide concentration (μg/m3) |
air_quality.so2 | Sulfur dioxide concentration (μg/m3) |
air_quality.co | Carbon monoxide concentration (mg/m3) |
air_quality.aqi.chn | China standard AQI |
air_quality.aqi.usa | US AQI |