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.
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/1abhw_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
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.
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:
| Header | Example | Description |
|---|---|---|
X-RateLimit-Limit | 100 | The daily quota for this key. |
X-RateLimit-Remaining | 73 | Requests remaining before the next reset. |
X-RateLimit-Reset | 1736947200 | Unix 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.
/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
| Name | Type | Required | Description |
|---|---|---|---|
typepath | division | district | upazila | union | yes | The location type. |
idpath | string | yes | The unique id of the location (e.g. "1" for Dhaka division). |
langquery | bn | en | no | Preferred 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
/api/v1/weather/division/1?lang=bn/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
| Name | Type | Required | Description |
|---|---|---|---|
latpath | number (-90..90) | yes | Latitude in decimal degrees. Must be within Bangladesh (20.0–27.0). |
lngpath | number (-180..180) | yes | Longitude in decimal degrees. Must be within Bangladesh (87.5–93.0). |
langquery | bn | en | no | Preferred 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
/api/v1/weather/coords/23.81/90.41?lang=bn/api/v1/locationsList / 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
| Name | Type | Required | Description |
|---|---|---|---|
typequery | division | district | upazila | union | yes | The location type to list. There is no "all" option. |
division_idquery | string | no | When type=district, filter districts within this division. |
district_idquery | string | no | When type=upazila, filter upazilas within this district. |
qquery | string | no | Free-text name search — matches name_en OR name_bn (case-insensitive). |
limitquery | integer (1..100) | no | Maximum 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
/api/v1/locations?type=division&limit=10/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
| Name | Type | Required | Description |
|---|---|---|---|
typepath | division | district | upazila | union | yes | The location type. |
idpath | string | yes | The 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
/api/v1/locations/district/13/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
| Name | Type | Required | Description |
|---|---|---|---|
typepath | division | district | upazila | union | yes | The location type. |
idpath | string | yes | The unique id of the location. |
daysquery | integer (1..7) | no | Number 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
/api/v1/forecast/division/1?days=7Errors
The Abohawa API uses conventional HTTP status codes. Every error response includes a JSON body with an error field describing the problem.
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Malformed request — invalid type, coordinates outside Bangladesh, days out of range, etc. The error field names the specific problem. |
| 401 | Unauthorized | The 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. |
| 404 | Not Found | The 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. |
| 429 | Rate Limit Exceeded | The API key has exceeded its daily quota. Retry-After and X-RateLimit-Reset indicate when the quota resets (next local midnight). |
| 500 | Server Error | Unexpected 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.