The small public API behind ohidur.com. Look up the divisions, districts, upazilas and unions of
Bangladesh, read the blog feed or show a random meme. Responses are JSON, any website can call it, and no key is
needed.
Base URLhttps://web.ohidur.com
Find any union in Bangladesh
Each choice calls the next /geo endpoint and shows you the response.
Send requests to https://web.ohidur.com. There is no sign-up and no API key, and every response allows
cross-origin requests, so a web page can call the API directly.
Errors use the Problem Details format, with the
content type application/problem+json. Each error has a requestId that matches the
X-Request-Id response header. Include it when you report a problem.
{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "No division has id 99",
"instance": "/geo/divisions/99",
"requestId": "iad1::7xk2m-1731024000000-3f9c2a1b8e4d"
}
Caching
Location data is cached for a day in browsers and a week at the edge, and refreshed on every deploy. The blog
feed is cached for 5 minutes. Images are never cached, so each load fetches a fresh one.
Geo
Bangladesh is divided into 8 divisions, 64 districts (zila), 494 upazilas and 4,540 unions. Each one has an
English name, a Bangla name and the host name of its government website.
To build an address picker, load the divisions, then follow each choice one level down with
/geo/divisions/{id}/districts, /geo/districts/{id}/upazilas and
/geo/upazilas/{id}/unions. The explorer at the top of this page works that way.
Picks a random meme and streams it back with no-cache headers, so <img src> shows a new one on every load. If the image host fails, answers with a 302 redirect to the image instead.
Parameters
Name
In
Type
Description
category
query
one of programming, science
Picked at random when omitted. Example: programming
Responses
200A meme image (JPEG or PNG).image/*
302Fallback: the image host could not be reached through the API.
Answers {"status": "ok"} while the service is up. Use it for uptime monitors; / is the docs page.
Responses
200The service is up.application/json
Example request
curl https://web.ohidur.com/health
Example response
{
"status": "ok"
}
Geo v1 (legacy)
These are the endpoints of the old geoapi service. They return exactly the JSON it did, so existing
clients only need the new host name. They differ from /geo in two ways: ids are strings, and
/v1/{level}/{id} returns the units inside that one, with an empty list for an unknown id.
The districts in division id (not the division itself), with string ids. An unknown id gives an empty list. Use /geo/divisions/{id}/districts in new code.
The upazilas in district id (not the district itself), with string ids. An unknown id gives an empty list. Use /geo/districts/{id}/upazilas in new code.