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_KEYEndpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/partner/v1/areas | Search Area |
| GET | /api/partner/v1/areas/detail | Get 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/areasQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number (default: 1) |
| per_page | integer | No | Items per page (default: 20, max: 100) |
| search_by | string | No | Field to search by: province, city, district, or subdistrict |
| search_value | string | No | Search 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"- Get Area Details
Get detailed information for a specific area.
Endpoint
GET /api/partner/v1/areas/detailQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| subdistrict_code | string | Yes | Subdistrict 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 Case | search_by | search_value |
|---|---|---|
| Find by province | province | Jawa Barat |
| Find by city | city | Jakarta |
| Find by district | district | Cilaku |
| Find by subdistrict | subdistrict | Cilampeni |
| Find by postal code | subdistrict | 43254 |
Rate Limits
- Search Area: 200 requests per minute