Skip to content

Area API

Overview

The Area API provides comprehensive area management capabilities for your e-commerce operations. It allows you to search and retrieve area information including provinces, cities, districts, and subdistricts, as well as validate addresses and get accurate postal codes.

Authentication

All API requests require authentication using API key in the Authorization header:

Authorization: YOUR_API_KEY

Endpoints

MethodEndpointDescription
GET/api/partner/v1/areasSearch Area
GET/api/partner/v1/areas/detailGet Area details

Download Area Data

You can download area data in Console.

1. Search and Retrieve Area Information

Search and retrieve area information including provinces, cities, districts, and subdistricts. This endpoint is useful for address validation and autocomplete functionality.

Endpoint

GET /api/partner/v1/areas

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoItems per page (default: 20, max: 100)
search_bystringNoField to search by: province, city, district, or subdistrict
search_valuestringNoSearch keyword (case-insensitive)

Response

Success Response (200 OK)

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "areas": [
      {
        "region_id": 40,
        "country": "Indonesia",
        "country_code": "ID",
        "state": "Aceh",
        "state_code": "11",
        "city": "Kabupaten Aceh Selatan",
        "city_code": "11.01",
        "district": "Kluet Selatan",
        "district_code": "11.01.03",
        "subdistrict": "Pasi Meurapat",
        "subdistrict_code": "11.01.03.2012",
        "postcode": "23772",
        "longitude": "97.32272690",
        "latitude": "3.07217520"
      },
      {
        "region_id": 67,
        "country": "Indonesia",
        "country_code": "ID",
        "state": "Aceh",
        "state_code": "11",
        "city": "Kabupaten Aceh Selatan",
        "city_code": "11.01",
        "district": "Meukek",
        "district_code": "11.01.05",
        "subdistrict": "Buket Meuh",
        "subdistrict_code": "11.01.05.2006",
        "postcode": "23754",
        "longitude": "97.08346060",
        "latitude": "3.53330870"
      },
      {
        "region_id": 77,
        "country": "Indonesia",
        "country_code": "ID",
        "state": "Aceh",
        "state_code": "11",
        "city": "Kabupaten Aceh Selatan",
        "city_code": "11.01",
        "district": "Meukek",
        "district_code": "11.01.05",
        "subdistrict": "Keude Meukek",
        "subdistrict_code": "11.01.05.2016",
        "postcode": "23754",
        "longitude": "97.05287340",
        "latitude": "3.45723970"
      },
      {
        "region_id": 82,
        "country": "Indonesia",
        "country_code": "ID",
        "state": "Aceh",
        "state_code": "11",
        "city": "Kabupaten Aceh Selatan",
        "city_code": "11.01",
        "district": "Meukek",
        "district_code": "11.01.05",
        "subdistrict": "Alue Meutuah",
        "subdistrict_code": "11.01.05.2021",
        "postcode": "23754",
        "longitude": "97.09195090",
        "latitude": "3.42851630"
      }
    ],
    "pagination": {
      "current_page": 1,
      "per_page": 10,
      "total": 4,
      "last_page": 1,
      "from": 1,
      "to": 4,
      "has_more_pages": false
    }
  },
  "errors": null,
  "request_id": "97594f4f-b1fa-47d6-b676-7bbbbade0273"
}

Example Request

bash
curl -X GET "https://sandbox-api.bebaskirim.com/api/partner/v1/areas?page=1&per_page=10&search_by=subdistrict&search_value=Cilampeni" \
  -H "Authorization: YOUR_API_KEY"
  1. Get Area Details

Get detailed information for a specific area.

Endpoint

GET /api/partner/v1/areas/detail

Query Parameters

ParameterTypeRequiredDescription
subdistrict_codestringYesSubdistrict code

Response

Success Response (200 OK)

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "region_id": 40,
    "country": "Indonesia",
    "country_code": "ID",
    "state": "Aceh",
    "state_code": "11",
    "city": "Kabupaten Aceh Selatan",
    "city_code": "11.01",
    "district": "Kluet Selatan",
    "district_code": "11.01.03",
    "subdistrict": "Pasi Meurapat",
    "subdistrict_code": "11.01.03.2012",
    "postcode": "23772",
    "longitude": "97.32272690",
    "latitude": "3.07217520",
    "created_at": "2025-08-25T03:25:14.000000Z",
    "updated_at": "2025-08-25T03:25:14.000000Z"
  },
  "errors": null,
  "request_id": "860c8070-9675-405e-aaba-2a575b1abb29"
}

Example Request

bash
curl -X GET "https://sandbox-api.bebaskirim.com/api/partner/v1/areas/detail?subdistrict_code=11.01.03.2012" \
  -H "Authorization: YOUR_API_KEY"

Search Examples

Use Casesearch_bysearch_value
Find by provinceprovinceJawa Barat
Find by citycityJakarta
Find by districtdistrictCilaku
Find by subdistrictsubdistrictCilampeni
Find by postal codesubdistrict43254

Rate Limits

  • Search Area: 200 requests per minute