Abohawa API v1

আবহাওয়া API v1

Programmatic access to weather data for 5,000+ locations across Bangladesh — divisions, districts, upazilas, and unions. Real-time conditions, hourly and 7-day forecasts, all in JSON.

Endpoints
5
Locations
5,000+
Auth
API key
Rate limit
100–100K/day

Note: API keys are issued upon request. Contact our team to request an API key for your project.

Authentication

All API requests must include an x-api-key header. Keys are prefixed abhw_live_ and are shown only once at creation time.

Pass your API key in the x-api-key header of every request:

Example cURL

curl -H "x-api-key: abhw_live_..." \
  https://abohawa.bd/api/v1/weather/division/1
Keys are prefixed abhw_live_ and shown only once at creation time. We store only the SHA-256 hash — there is no way to recover a lost key.

Your API key

Your API key is stored locally in your browser only — it is never sent anywhere except the Abohawa API.

Enter your API key to enable the try-it playgrounds below.

Rate Limiting

Every API key has a daily request quota that resets at local midnight. Quota is per-key, not per-IP.

Free৳0
100 / day
StarterContact
1,000 / day
BusinessContact
10,000 / day
EnterpriseContact
100,000 / day

Pricing: The Free tier is available at no cost. For Starter, Business, and Enterprise tiers, please contact us for pricing.

Response headers

Every API response includes these headers so your client can display remaining quota in real time:

HeaderExampleDescription
X-RateLimit-Limit100The daily quota for this key.
X-RateLimit-Remaining73Requests remaining before the next reset.
X-RateLimit-Reset1736947200Unix timestamp when the quota resets (next local midnight).

429 response example

{
  "error": "Rate limit exceeded",
  "limit": 100,
  "reset_at": "2025-01-16T00:00:00.000Z"
}

Endpoints

Five read-only GET endpoints covering weather, locations, and forecasts. Click 'Send Request' on any endpoint to try it live.

GET/api/v1/weather/[type]/[id]

Get weather by location

Returns the current conditions, hourly forecast, and 7-day daily forecast for a published location identified by its type and id. The id is the database primary key (e.g. division_id, district_id) as exposed by the /locations endpoint.

Parameters

NameTypeRequiredDescription
typepathdivision | district | upazila | unionyesThe location type.
idpathstringyesThe unique id of the location (e.g. "1" for Dhaka division).
langquerybn | ennoPreferred language for display names in the response. Defaults to bn.

Example request

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/weather/division/1?lang=en"

Example response

{
  "location": {
    "type": "division",
    "id": "1",
    "name_en": "Dhaka",
    "name_bn": "ঢাকা",
    "slug_en": "dhaka",
    "latitude": 23.81,
    "longitude": 90.41,
    "parent_en": null,
    "parent_bn": null
  },
  "current": {
    "time": "2025-01-15T14:00",
    "interval": 900,
    "temperature_2m": 28.4,
    "relative_humidity_2m": 72,
    "apparent_temperature": 31.2,
    "is_day": 1,
    "precipitation": 0,
    "rain": 0,
    "showers": 0,
    "snowfall": 0,
    "weather_code": 3,
    "cloud_cover": 88,
    "pressure_msl": 1013.4,
    "surface_pressure": 1010.8,
    "wind_speed_10m": 12.5,
    "wind_direction_10m": 215,
    "wind_gusts_10m": 22.1
  },
  "current_units": {
    "time": "iso8601",
    "interval": "seconds",
    "temperature_2m": "°C",
    "relative_humidity_2m": "%",
    "wind_speed_10m": "km/h",
    "precipitation": "mm"
  },
  "daily": {
    "time": [
      "2025-01-15",
      "2025-01-16",
      "2025-01-17"
    ],
    "weather_code": [
      3,
      61,
      2
    ],
    "temperature_2m_max": [
      30.1,
      27.8,
      29.5
    ],
    "temperature_2m_min": [
      18.3,
      17.2,
      18.9
    ],
    "precipitation_probability_max": [
      35,
      80,
      20
    ]
  },
  "timezone": "Asia/Dhaka"
}

Try it

Enter your API key in the Authentication section above to enable the try-it playground.
GET/api/v1/weather/division/1?lang=bn
GET/api/v1/weather/coords/[lat]/[lng]

Get weather by coordinates

Returns the same weather payload as /weather/[type]/[id] but for raw latitude/longitude coordinates. Useful for IoT devices or mobile apps that already know their position. Only coordinates inside the Bangladesh bounding box (~20–27°N, 87.5–93°E) are accepted — requests for foreign locations are rejected with 400.

Parameters

NameTypeRequiredDescription
latpathnumber (-90..90)yesLatitude in decimal degrees. Must be within Bangladesh (20.0–27.0).
lngpathnumber (-180..180)yesLongitude in decimal degrees. Must be within Bangladesh (87.5–93.0).
langquerybn | ennoPreferred language. Defaults to bn.

Example request

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/weather/coords/23.81/90.41"

Example response

{
  "location": {
    "type": "coords",
    "latitude": 23.81,
    "longitude": 90.41,
    "name_en": "23.810, 90.410",
    "name_bn": null
  },
  "current": {
    "time": "2025-01-15T14:00",
    "temperature_2m": 28.4,
    "weather_code": 3,
    "wind_speed_10m": 12.5
  },
  "timezone": "Asia/Dhaka"
}

Try it

Enter your API key in the Authentication section above to enable the try-it playground.
GET/api/v1/weather/coords/23.81/90.41?lang=bn
GET/api/v1/locations

List / search locations

Returns a paginated list of published locations of a given type. Optional filters narrow by parent (e.g. districts within a division) or by free-text name search (matches either English or Bengali name, case-insensitive). Results are sorted by population descending. Only metadata is returned — no weather.

Parameters

NameTypeRequiredDescription
typequerydivision | district | upazila | unionyesThe location type to list. There is no "all" option.
division_idquerystringnoWhen type=district, filter districts within this division.
district_idquerystringnoWhen type=upazila, filter upazilas within this district.
qquerystringnoFree-text name search — matches name_en OR name_bn (case-insensitive).
limitqueryinteger (1..100)noMaximum results to return. Default 50.

Example request

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/locations?type=division&limit=10"

Example response

{
  "results": [
    {
      "type": "division",
      "id": "1",
      "name_en": "Dhaka",
      "name_bn": "ঢাকা",
      "slug_en": "dhaka",
      "latitude": 23.81,
      "longitude": 90.41,
      "parent_en": null,
      "parent_bn": null,
      "population": 44438083,
      "area_sq_km": 20594
    },
    {
      "type": "division",
      "id": "3",
      "name_en": "Chattogram",
      "name_bn": "চট্টগ্রাম",
      "slug_en": "chattogram",
      "latitude": 22.36,
      "longitude": 91.8,
      "parent_en": null,
      "parent_bn": null,
      "population": 33080310,
      "area_sq_km": 33771
    }
  ],
  "total": 8,
  "type": "division"
}

Try it

Enter your API key in the Authentication section above to enable the try-it playground.
GET/api/v1/locations?type=division&limit=10
GET/api/v1/locations/[type]/[id]

Get single location metadata

Returns extended metadata for a single published location — including population, area in km², official website (when available), and the Bangladesh Bureau of Statistics (BBS) code. Use this when you want a richer location card without making a weather request.

Parameters

NameTypeRequiredDescription
typepathdivision | district | upazila | unionyesThe location type.
idpathstringyesThe unique id of the location.

Example request

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/locations/district/13"

Example response

{
  "location": {
    "type": "district",
    "id": "13",
    "name_en": "Dhaka",
    "name_bn": "ঢাকা",
    "slug_en": "dhaka-dhaka",
    "latitude": 23.81,
    "longitude": 90.41,
    "parent_en": "Dhaka",
    "parent_bn": "ঢাকা",
    "population": 12044397,
    "area_sq_km": 1463.6,
    "website": null,
    "bbs_code": 26
  }
}

Try it

Enter your API key in the Authentication section above to enable the try-it playground.
GET/api/v1/locations/district/13
GET/api/v1/forecast/[type]/[id]

Get 7-day forecast

Returns only the daily forecast block for a published location — a lighter-weight alternative to /weather/[type]/[id] for clients that only need the multi-day outlook (e.g. an embedded widget). Use the days query param to limit the result to the next N days (1–7).

Parameters

NameTypeRequiredDescription
typepathdivision | district | upazila | unionyesThe location type.
idpathstringyesThe unique id of the location.
daysqueryinteger (1..7)noNumber of forecast days to return. Default 7.

Example request

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/forecast/division/1?days=7"

Example response

{
  "location": {
    "type": "division",
    "id": "1",
    "name_en": "Dhaka",
    "name_bn": "ঢাকা",
    "slug_en": "dhaka",
    "latitude": 23.81,
    "longitude": 90.41,
    "parent_en": null,
    "parent_bn": null
  },
  "daily": {
    "time": [
      "2025-01-15",
      "2025-01-16",
      "2025-01-17",
      "2025-01-18",
      "2025-01-19",
      "2025-01-20",
      "2025-01-21"
    ],
    "weather_code": [
      3,
      61,
      2,
      1,
      0,
      80,
      95
    ],
    "temperature_2m_max": [
      30.1,
      27.8,
      29.5,
      31,
      32.2,
      28.4,
      26.1
    ],
    "temperature_2m_min": [
      18.3,
      17.2,
      18.9,
      19.5,
      20.1,
      19.8,
      17.5
    ],
    "precipitation_probability_max": [
      35,
      80,
      20,
      10,
      5,
      55,
      90
    ]
  },
  "daily_units": {
    "temperature_2m_max": "°C",
    "temperature_2m_min": "°C",
    "precipitation_probability_max": "%"
  },
  "timezone": "Asia/Dhaka"
}

Try it

Enter your API key in the Authentication section above to enable the try-it playground.
GET/api/v1/forecast/division/1?days=7

Errors

The Abohawa API uses conventional HTTP status codes. Every error response includes a JSON body with an error field describing the problem.

CodeNameDescription
400Bad RequestMalformed request — invalid type, coordinates outside Bangladesh, days out of range, etc. The error field names the specific problem.
401UnauthorizedThe x-api-key header is missing, the key doesn't start with abhw_live_, or the key/subscriber is revoked. No rate-limit slot is consumed.
404Not FoundThe location id doesn't exist or isn't published yet. Unpublished locations are hidden from the API exactly as they are from the public site.
429Rate Limit ExceededThe API key has exceeded its daily quota. Retry-After and X-RateLimit-Reset indicate when the quota resets (next local midnight).
500Server ErrorUnexpected server-side failure. The request still counts against the rate limit — report persistent 5xx responses to support.

401 example

{
  "error": "Invalid or missing API key"
}

404 example

{
  "error": "Location not found or not published"
}

SDK Examples

Complete, runnable examples in four languages — all fetch the current weather for Dhaka (division id 1) and print the temperature.

curl -H "x-api-key: abhw_live_..." \
  "https://abohawa.bd/api/v1/weather/division/1"

Ready to build with Abohawa?

Contact our team to get your API key and start integrating in minutes.

Get an API key
সকল এন্ডপয়েন্ট JSON রেসপন্স প্রদান করে এবং HTTPS আবশ্যক।

কুকিজ ব্যবহার

এই ওয়েবসাইটটি কুকিজ ব্যবহার করে আপনার অভিজ্ঞতা উন্নত করতে। ব্যবহার চালিয়ে যাওয়ার মাধ্যমে আপনি আমাদের কুকিজ নীতিতে সম্মত হন। গোপনীয়তা নীতি