Weather Data

Avirach

Current weather data, 7-day forecasts and historical statistics spanning up to 26 years — with intelligent H3 geocaching.

Pricing

3Credits
Current Weather
3Credits
Batch request (up to 100 locations)

3 credits per successful element. One batch counts as 1 call against the rate limit.

10Credits
Historical Statistics

25 credits with include=data

+25Day range (2-7 days)
+50Month query (8-31 days)
GET/v1/avirach/overview

Retrieves current weather data and forecasts for a location.

Parameter

NameTypeStatusDescription
h3_indexstring
Preferred
H3 hex index (resolution 6) — preferred method
latnumberAlternativeLatitude (-90 to 90) — alternative, with lon
lonnumberAlternativeLongitude (-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]
    }
  }
}
POST/v1/avirach/overview/batch

Retrieves current weather data for up to 100 locations in a single request.

Parameter

NameTypeStatusDescription
itemsarray
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

Results preserve the input order — item i in results[] corresponds to items[i]. Duplicate locations (same H3 cell) return the same payload. Each element has status:"ok" with data or status:"error" with an error code (invalid_h3, invalid_coords, missing_params, upstream_unavailable). Billing: 3 credits per successful element (error elements are free). One batch request counts as one call against your rate limit, regardless of item count.
GET/v1/avirach/history/locations

Returns all locations available for historical queries (curated set, currently airports). Free — 0 credits, no special rate-limit handling.

Parameter

NameTypeStatusDescription
categorystringOptionalOptional: filter by category (e.g. ``airport``).
searchstringOptionalOptional: 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
}
GET/v1/avirach/history

Historical weather statistics for a location — individual days, day ranges or entire months, aggregated over freely selectable time periods.

Parameter

NameTypeStatusDescription
h3_indexstring
Preferred
H3 hex index (resolution 5)
latnumberAlternativeLatitude (-90 to 90) — alternative, with lon
lonnumberAlternativeLongitude (-180 to 180) — alternative, with lat
monthnumber
Yes
Month (1-12)
daynumberOptionalDay (1-31). Without = entire month. Not combinable with day_from/day_to
day_from / day_tonumberOptionalDay range (e.g. day_from=20&day_to=27). Not combinable with day
hournumberOptionalHour UTC (0-23). Without = all hours
yearsnumberOptionalLast N years (default: 26, max: 26). Not combinable with year / year_from+year_to
yearnumberOptionalSingle year (e.g. 2023). Not combinable with years / year_from+year_to
year_from / year_tonumberOptionalYear range (e.g. year_from=2010&year_to=2019). Not combinable with years / year
includestringOptionalstatistics (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

All H3 indices are automatically normalized to resolution 6 (~36 km²). When normalized, the response additionally contains and .

Attribution

  • Weather data provided in part by Open-Meteo