Divisions API
4.6M+ administrative boundaries worldwide
Divisions API Features
Postcode → Boundary NEW
One call takes a postcode and returns the containing locality with full polygon, bounding box, and population — replacing the typical 2-call flow on competitors. 6.7× faster than Geoapify at p50.
Boundary Search
Search for administrative divisions by name or code. Get countries, states, counties, cities, neighborhoods, and postal codes.
Point-in-Polygon
Determine which divisions contain a specific point. Get all administrative levels from country down to neighborhood.
Hierarchy Traversal
Navigate the full hierarchy from any division. Get parent, children, and sibling divisions easily.
Country Coverage
Coverage across 39 countries with consistent data model. From major cities to small neighborhoods.
Population Data
Population statistics where available. Perfect for demographic analysis and market sizing.
Statistics & Counts
Get division counts by country and type. Understand coverage before building your application.
All 9 Endpoints
Complete list of Divisions API endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/divisions/by-postcode | Postcode → boundary + population in one call (replaces 2-call flow on competitors). NEW |
| GET | /v1/divisions | Search divisions by name or query |
| GET | /v1/divisions/contains | Find all divisions containing a coordinate (point-in-polygon) |
| GET | /v1/divisions/subtypes | List all available division types (country, region, city, etc.) |
| GET | /v1/divisions/countries | List all countries with division coverage |
| GET | /v1/divisions/stats | Get database statistics by country and type |
| GET | /v1/divisions/random | Get random sample divisions (for testing) |
| GET | /v1/divisions/hierarchy/{id} | Get full hierarchy chain for a division |
| GET | /v1/divisions/{id} | Get detailed information about a specific division |
Code Examples
Postcode → Boundary + Population NEW
GET /v1/divisions/by-postcode?code=15236&country=GR&include=geometry&api_key={key}
Response:
{
"query": { "postcode": "15236", "country": "GR", "include": "geometry" },
"result": {
"id": "a9b4b9ec-7335-4384-8488-2aaa137f4e8b",
"name": "Δήμος Πεντέλης",
"name_local": "Δήμος Πεντέλης",
"name_latin": "Dimos Pentelis",
"location": { "lat": 38.0596, "lng": 23.8678 },
"subtype": "locality",
"country": "GR",
"region": "GR-A",
"population": 34934,
"bbox": [23.83, 38.05, 23.92, 38.10],
"geometry": { "type": "Polygon", "coordinates": [[...]] },
"confidence": 0.95
},
"meta": { "version": "1.0.0", "timestamp": "..." }
}
Why this matters: Geoapify and similar APIs require two calls (geocode → boundary lookup) to get this data. We do it in one. 6.7× faster at p50 (256ms vs 1727ms head-to-head).
| No geometry (bbox + population only) | 1 credit |
?include=geometry&precision=simplified | 2 credits |
?include=geometry&precision=full | 3 credits |
Free tier: capped at 10 boundary calls/day (separate from the 3,000 general daily quota). Production-friendly: Truly free for commercial use — no badges, no strings, just usage limits.
Search Divisions
GET /v1/divisions?q=Los+Angeles&subtype=locality&country=US&api_key={key}
Response:
{
"results": [{
"id": "08f28a8f-8c8b-4896-815e-c92c8df0a8a6",
"name": "Los Angeles",
"subtype": "locality",
"country": "US",
"region": "US-CA",
"population": 4030904,
"area_km2": 1302.15,
"lat": 34.0522,
"lng": -118.2437,
"wikidata": "Q65"
}]
}
Point-in-Polygon (Contains)
GET /v1/divisions/contains?lat=40.7128&lng=-74.0060&api_key={key}
Response:
{
"results": [
{ "name": "United States", "subtype": "country", "code": "US" },
{ "name": "New York", "subtype": "region", "code": "US-NY" },
{ "name": "New York County", "subtype": "county", "fips": "36061" },
{ "name": "New York City", "subtype": "locality", "population": 8336817 },
{ "name": "Manhattan", "subtype": "borough" },
{ "name": "Lower Manhattan", "subtype": "neighborhood" }
]
}
Get Division Hierarchy
GET /v1/divisions/hierarchy/08f28a8f-8c8b-4896-815e-c92c8df0a8a6?api_key={key}
Response:
{
"division": {
"id": "08f28a8f-8c8b-4896-815e-c92c8df0a8a6",
"name": "Manhattan",
"subtype": "borough"
},
"hierarchy": [
{ "name": "New York City", "subtype": "locality" },
{ "name": "New York County", "subtype": "county" },
{ "name": "New York", "subtype": "region" },
{ "name": "United States", "subtype": "country" }
]
}
List Countries
GET /v1/divisions/countries?api_key={key}
Response:
{
"countries": [
{ "code": "US", "name": "United States", "divisions_count": 85000 },
{ "code": "BR", "name": "Brazil", "divisions_count": 72000 },
{ "code": "DE", "name": "Germany", "divisions_count": 45000 },
{ "code": "FR", "name": "France", "divisions_count": 42000 },
...
],
"total_countries": 52
}