Learn how to access current, forecast, and historical weather data for your areas of interest.
To get current weather conditions for your area of interest:
GET
https://observearth.com/api/weather/current/
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of your Area of Interest |
Parameter | Unit | Description |
---|---|---|
temperature | °C | Current air temperature |
relative_humidity | % | Percentage of moisture in the air |
apparent_temperature | °C | How the temperature feels (heat index/wind chill) |
precipitation | mm | Total precipitation amount |
rain | mm | Rain amount |
cloud_cover | % | Percentage of sky covered by clouds |
surface_pressure | hPa | Atmospheric pressure at surface level |
wind_speed | km/h | Speed of wind |
wind_gusts | km/h | Speed of wind gusts |
apparent_temperature_max | °C | Maximum apparent temperature for the day |
apparent_temperature_min | °C | Minimum apparent temperature for the day |
sunrise | iso8601 | Time of sunrise |
sunset | iso8601 | Time of sunset |
uv_index_max | Maximum UV index for the day | |
et0_fao_evapotranspiration | mm | Reference evapotranspiration |
import requests
api_key = "your_api_key_here"
geometry_id = "123e4567-e89b-12d3-a456-426614174000"
url = f"https://observearth.com/api/weather/current/?geometry_id={geometry_id}"
headers = {
"X-API-Key": api_key
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"Temperature: {data['temperature']}°C")
print(f"Precipitation: {data['precipitation']} mm")
print(f"Humidity: {data['humidity']}%")
print(f"Wind: {data['wind_speed']} m/s, {data['wind_direction']}°")
To get a 16-day weather forecast for your area of interest:
GET
https://observearth.com/api/weather/forecast/
[Image: 7-day temperature forecast chart]
7-day temperature forecast visualization.
[Image: 7-day precipitation forecast chart]
7-day precipitation forecast visualization.
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of your Area of Interest |
Parameter | Unit | Description |
---|---|---|
temp_max | °C | Maximum temperature |
temp_min | °C | Minimum temperature |
temp_mean | °C | Mean temperature |
relative_humidity | % | Percentage of moisture in the air |
precipitation | mm | Total precipitation amount |
rain | mm | Rain amount |
surface_pressure | hPa | Atmospheric pressure at surface level |
cloud_cover | % | Percentage of sky covered by clouds |
evapotranspiration | mm | Evapotranspiration amount |
wind_speed | km/h | Speed of wind |
wind_gusts | km/h | Speed of wind gusts |
Historical weather data is valuable for understanding past conditions and trends:
GET
https://observearth.com/api/weather/historical/
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of your Area of Interest |
start_date | string | Yes | Start date in YYYY-MM-DD format |
end_date | string | Yes | End date in YYYY-MM-DD format |
Parameter | Unit | Description |
---|---|---|
temp_max | °C | Maximum temperature |
temp_min | °C | Minimum temperature |
temp_mean | °C | Mean temperature |
relative_humidity | % | Percentage of moisture in the air |
precipitation | mm | Total precipitation amount |
rain | mm | Rain amount |
surface_pressure | hPa | Atmospheric pressure at surface level |
cloud_cover | % | Percentage of sky covered by clouds |
evapotranspiration | mm | Evapotranspiration amount |
wind_speed | km/h | Speed of wind |
wind_gusts | km/h | Speed of wind gusts |
Now that you understand how to work with weather data, you can: