GETClimate At Coordinates
https://api-climate-normals.dataandapis.com/v1/climate
Parâmetros de consulta
| Parâmetro | Exemplo | |
|---|---|---|
| lat | 40.7128 | Obrigatório |
| lon | -74.0060 | Obrigatório |
| month | 1 | Opcional |
Exemplo de requisição
curl "https://api-climate-normals.dataandapis.com/v1/climate?lat=40.7128&lon=-74.0060&month=1" \
-H "X-Api-Key: YOUR_API_KEY"// npm install dataandapis
import { DataAndApis } from "dataandapis";
const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY
const data = await client.climateNormals.climateAtCoordinates({
lat: 40.7128,
lon: -74.0060,
month: 1,
});# pip install dataandapis
from dataandapis import DataAndApis
client = DataAndApis() # reads DATAANDAPIS_API_KEY
data = client.climate_normals.climate_at_coordinates(lat=40.7128, lon=-74.0060, month=1)Exemplo de resposta{
"ok": true,
"query": {
"lat": 40.7128,
"lon": -74.006
},
"distance_km": 8.1,
"station": {
"id": "USW00094728",
"name": "NEW YORK CNTRL PK TWR",
"state": "NY",
"latitude": 40.78,
"longitude": -73.97,
"elevation_m": 39.6,
"annual": {
"avg_temp_f": 55.8,
"avg_high_f": 62.6,
"avg_low_f": 48.9,
"precipitation_in": 49.5,
"snowfall_in": 29.8,
"heating_degree_days": 4553.4,
"cooling_degree_days": 1221.5,
"hottest_month": 7,
"coldest_month": 1,
"wettest_month": 7
}
},
"monthly": [
…
Ver resposta completa
{
"ok": true,
"query": {
"lat": 40.7128,
"lon": -74.006
},
"distance_km": 8.1,
"station": {
"id": "USW00094728",
"name": "NEW YORK CNTRL PK TWR",
"state": "NY",
"latitude": 40.78,
"longitude": -73.97,
"elevation_m": 39.6,
"annual": {
"avg_temp_f": 55.8,
"avg_high_f": 62.6,
"avg_low_f": 48.9,
"precipitation_in": 49.5,
"snowfall_in": 29.8,
"heating_degree_days": 4553.4,
"cooling_degree_days": 1221.5,
"hottest_month": 7,
"coldest_month": 1,
"wettest_month": 7
}
},
"monthly": [
…{
"ok": true,
"query": {
"lat": 40.7128,
"lon": -74.006
},
"distance_km": 8.1,
"station": {
"id": "USW00094728",
"name": "NEW YORK CNTRL PK TWR",
"state": "NY",
"latitude": 40.78,
"longitude": -73.97,
"elevation_m": 39.6,
"annual": {
"avg_temp_f": 55.8,
"avg_high_f": 62.6,
"avg_low_f": 48.9,
"precipitation_in": 49.5,
"snowfall_in": 29.8,
"heating_degree_days": 4553.4,
"cooling_degree_days": 1221.5,
"hottest_month": 7,
"coldest_month": 1,
"wettest_month": 7
}
},
"monthly": [
{
"month": 1,
"avg_temp_f": 33.7,
"avg_high_f": 39.5,
"avg_low_f": 27.9,
"diurnal_range_f": 11.5,
"precipitation_in": 3.64,
"precip_days": 10.8,
"rainy_days": 2.5,
"snowfall_in": 8.8,
"freeze_days": 20.5,
"hot_days": 0,
"ice_days": 7.4,
"heating_degree_days": 970.1,
"cooling_degree_days": 0
}
]
}



