1. Services
  2. Boundaries

Administrative boundaries API

GeoJSON polygons for administrative areas, plus a point lookup that tells you which area holds a coordinate.

GET /v1/boundaries/lookup2 creditsAbout $0.002

Try it

GET/v1/boundaries/lookup
curl 'https://api.apifor.dev/v1/boundaries/lookup?lat=-6.8775&lng=107.5862' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "lat": -6.8775,
    "lng": 107.5862,
    "country": "ID",
    "matched_level": "village",
    "method": "polygon",
    "approximate": false,
    "regions": {
      "province": {
        "id": "32",
        "name": "Jawa Barat",
        "region_url": "/v1/regions/32?level=provinces",
        "boundary_url": "/v1/boundaries/32"
      },
      "regency": {
        "id": "3273",
        "name": "Kota Bandung",
        "region_url": "/v1/regions/3273?level=regencies",
        "boundary_url": "/v1/boundaries/3273"
      },
      "district": {
        "id": "327301",
        "name": "Sukasari",
        "region_url": "/v1/regions/327301?level=districts",
        "boundary_url": "/v1/boundaries/327301"
      },
      "village": {
        "id": "3273011001",
        "name": "Sukarasa",
        "region_url": "/v1/regions/3273011001?level=villages",
        "boundary_url": "/v1/boundaries/3273011001"
      }
    }
  },
  "meta": {
    "attribution": {
      "source": "open-admin-data/indonesia-administrative-divisions by jakkrapongt",
      "license": "CC BY 4.0",
      "license_url": "https://creativecommons.org/licenses/by/4.0/",
      "source_url": "https://github.com/open-admin-data/indonesia-administrative-divisions",
      "attribution_page": "https://github.com/open-admin-data/indonesia-administrative-divisions/blob/main/LICENSE",
      "notice": "Boundaries from open-admin-data/indonesia-administrative-divisions (release 2026.06) by jakkrapongt, licensed CC BY 4.0. Changed by APIFo..."
    }
  }
}

A real response from our OpenAPI file, with long lists and strings shortened.

Endpoints and price

EndpointCreditsAbout
GET /v1/boundaries/lookup2 credits$0.002
GET /v1/boundaries/{region_id}2 credits$0.002
GET /v1/boundaries1 credit$0.001
GET /v1/boundaries/coverage (Free)Free$0

USD at Starter pack prices ($5 for 5,000 credits). Calls that fail before work starts are refunded.

Coverage today

Australia, Canada, France, Germany, India, Indonesia, Japan, Malaysia, Mexico, Netherlands, New Zealand, Philippines, Saudi Arabia, Singapore, South Korea, Thailand, United Arab Emirates, United Kingdom, United States and Vietnam.

Leave country out to get every covered country, or pass one to narrow it.

Country pages with the official source: Japan administrative boundaries API (MLIT).

Sources, row counts and country-only fields per country: GET /v1/boundaries/coverage, free with your API key. How coverage works

Limits

  • Depth depends on the country. Some go down to villages, most stop at the second level (ADM2).
  • Points outside covered countries or at sea return 404.
  • Points just off a coastline can get the nearest area within 2.5 km, marked approximate: true.
  • Failed calls (400, 404) are not charged.

Questions

Can I load a polygon straight into a map library?

Yes. Call /v1/boundaries/{region_id} with format=geojson for a raw FeatureCollection.

Do I have to credit the source?

Yes. The licence depends on the boundary, and each area carries its attribution. Keep it when you show the shape.

Related services

All services