Weather Data
Avirach
Current weather data, 7-day forecasts and historical statistics spanning up to 26 years — with intelligent H3 geocaching.
Pricing
3 credits per successful element. One batch counts as 1 call against the rate limit.
25 credits with include=data
/v1/avirach/overviewRetrieves current weather data and forecasts for a location.
Parameter
| Name | Type | Status | Description |
|---|---|---|---|
h3_index | string | Preferred | H3 hex index (resolution 6) — preferred method |
lat | number | Alternative | Latitude (-90 to 90) — alternative, with lon |
lon | number | Alternative | Longitude (-180 to 180) — alternative, with lat |
Request
curl "https://api.centra.dbpg.io/v1/avirach/overview?h3_index=861f1d48fffffff" \
-H "Authorization: Bearer sk-live-your_api_key"Response
{
"h3_index": "861f1d48fffffff",
"center_coords": {
"lat": 52.52437,
"lon": 13.39645
},
"data": {
"current": {
"temperature_2m": 8.5,
"relative_humidity_2m": 78,
"weather_code": 3,
"wind_speed_10m": 12.4
},
"daily": {
"temperature_2m_max": [9.2, 11.1, 8.7],
"temperature_2m_min": [4.1, 5.8, 3.2]
}
}
}/v1/avirach/overview/batchRetrieves current weather data for up to 100 locations in a single request.
Parameter
| Name | Type | Status | Description |
|---|---|---|---|
items | array | Yes | Array of 1-100 location objects. Each item: { lat, lon } or { h3_index }. |
Request
curl -X POST "https://api.centra.dbpg.io/v1/avirach/overview/batch" \
-H "Authorization: Bearer sk-live-your_api_key" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"lat": 52.5200, "lon": 13.4050},
{"lat": 52.5200, "lon": 13.4050},
{"h3_index": "861f8d0f7ffffff"},
{"lat": 999, "lon": 0}
]
}'Response
{
"results": [
{ "status": "ok", "h3_index": "861f1d48fffffff", "center_coords": {"lat":52.524,"lon":13.396}, "data": {...} },
{ "status": "ok", "h3_index": "861f1d48fffffff", "center_coords": {"lat":52.524,"lon":13.396}, "data": {...} },
{ "status": "ok", "h3_index": "861f8d0f7ffffff", "center_coords": {"lat":48.135,"lon":11.582}, "data": {...} },
{ "status": "error", "error": {"code":"invalid_coords","message":"Latitude must be between -90 and 90, got: 999"} }
],
"usage": { "credits_used": 9, "remaining_balance": 12345 }
}Batch Semantics
/v1/avirach/history/locationsReturns all locations available for historical queries (curated set, currently airports). Free — 0 credits, no special rate-limit handling.
Parameter
| Name | Type | Status | Description |
|---|---|---|---|
category | string | Optional | Optional: filter by category (e.g. ``airport``). |
search | string | Optional | Optional: full-text search across name and ICAO code. |
Request
curl "https://api.centra.dbpg.io/v1/avirach/history/locations?category=airport" \
-H "Authorization: Bearer sk-live-your_api_key"Response
{
"locations": [
{
"h3_index": "851f8d0ffffffff",
"name": "München Flughafen",
"icao": "EDDM",
"category": "airport",
"lat": 48.3538,
"lon": 11.7861,
"data_from": 2000
}
],
"count": 1
}/v1/avirach/historyHistorical weather statistics for a location — individual days, day ranges or entire months, aggregated over freely selectable time periods.
Parameter
| Name | Type | Status | Description |
|---|---|---|---|
h3_index | string | Preferred | H3 hex index (resolution 5) |
lat | number | Alternative | Latitude (-90 to 90) — alternative, with lon |
lon | number | Alternative | Longitude (-180 to 180) — alternative, with lat |
month | number | Yes | Month (1-12) |
day | number | Optional | Day (1-31). Without = entire month. Not combinable with day_from/day_to |
day_from / day_to | number | Optional | Day range (e.g. day_from=20&day_to=27). Not combinable with day |
hour | number | Optional | Hour UTC (0-23). Without = all hours |
years | number | Optional | Last N years (default: 26, max: 26). Not combinable with year / year_from+year_to |
year | number | Optional | Single year (e.g. 2023). Not combinable with years / year_from+year_to |
year_from / year_to | number | Optional | Year range (e.g. year_from=2010&year_to=2019). Not combinable with years / year |
include | string | Optional | statistics (default), data, or statistics,data |
Request
curl "https://api.centra.dbpg.io/v1/avirach/history?h3_index=861f8d0f7ffffff&month=12&day=31&hour=10" \
-H "Authorization: Bearer sk-live-your_api_key"Response
{
"h3_index": "861f8d0f7ffffff",
"query": { "month": 12, "day": 31, "hour": 10, "years": 26 },
"count": 26,
"statistics": {
"temperature_2m": { "unit": "°C", "min": -4.8, "max": 12.9, "mean": 2.62, "median": 1.6, "stddev": 4.34, "p10": -1.95, "p90": 8.6, "count": 26 },
"dewpoint_2m": { "unit": "°C", "min": -6.1, "max": 10.4, "mean": 0.85, "median": 0.4, "stddev": 3.91, "p10": -3.7, "p90": 6.2, "count": 26 },
"precipitation": { "unit": "mm", "min": 0.0, "max": 3.4, "mean": 0.28, "median": 0.0, "stddev": 0.71, "p10": 0.0, "p90": 1.1, "count": 26 },
"wind_speed_10m": { "unit": "km/h", "min": 2.1, "max": 38.6, "mean": 14.7, "median": 13.4, "stddev": 8.12, "p10": 5.4, "p90": 25.9, "count": 26 },
"wind_direction_10m": { "unit": "°", "min": 8.0, "max": 352., "mean": 215., "median": 228., "stddev": 78.4, "p10": 102., "p90": 311., "count": 26 }
}
}H3 Geo-Indexing
Attribution
- Weather data provided in part by Open-Meteo