Divisions API

4.6M+ administrative boundaries worldwide

4.6M
Boundaries
All
Levels
8
Endpoints

Core Features

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 50+ 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 8 Endpoints

Complete list of Divisions API endpoints

Method Endpoint Description
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

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
}

Division Types

250+
Countries
4,800+
Regions/States
45,000+
Counties
2.5M+
Cities
500K+
Neighborhoods
1.2M+
Postal Codes
200K+
Districts
150K+
Localities