8 couriers · Logistics · 1 endpoint
Cek Ongkir
Shipping tariffs for any route in Indonesia, kecamatan to kecamatan — every courier's services with estimated delivery time and price, at any weight.
- Status
- Operational
- Price
- 1 credit / request
- Rate limit
- 120 / 60s
- Cache
- 1d
- Requests
- 8
Endpoint
How to call it
Code
Request — cURL
v1
curl https://api.diraz.co.id/v1/ongkir \
-H "Authorization: Bearer drz_live_…"For AI agents
Callable through the MCP server with the same key:
call_api {"endpoint":"cek-ongkir","params":{"from":"gambir jakarta","to":"coblong bandung","weight":"1"}}Parameters
- fromstring · required
- Origin kecamatan or city, e.g. `gambir jakarta`.
- tostring · required
- Destination kecamatan or city, e.g. `coblong bandung`.
- weightnumber · optional
- Weight in kg.Default: 1
- courierstring · optional
- One courier or all, the default — every tariff code is listed in `/v1/resi/courier`.
Example response
200 OK
JSON
{
"data": {
"from": { "id": "2096", "kec": "Gambir", "tipe": "Kota", "kota": "Jakarta Pusat", "prop": "DKI Jakarta" },
"to": { "id": "356", "kec": "Coblong", "tipe": "Kota", "kota": "Bandung", "prop": "Jawa Barat" },
"weight_kg": 1,
"courier": "jne",
"couriers": [
{
"courier": "JNE EXPRESS",
"services": [
{ "service": "OKE", "etd": "2 hari", "price_idr": 11000 },
{ "service": "REG", "etd": "1 hari", "price_idr": 12000 }
]
}
]
},
"meta": {
"request_id": "req_7Q2fK4mZ",
"as_of": "2026-08-20T00:00:00.000Z",
"age_seconds": 3600,
"next_update_at": "2026-08-21T00:00:00.000Z"
}
}- from / to
- The exact kecamatan the tariff was priced on, echoed back — sharpen the query if this is not the one you meant (`coblong bandung`, not just `bandung`).
- weight_kg / courier
- The weight and courier filter the answer was priced at.
- couriers[].courier
- The courier's own name as the board prints it.
- couriers[].services[].service / etd / price_idr
- Each service — `OKE`, `REG`, `YES`, `SIUNT` — with estimated delivery and price in rupiah.
Errors
When something goes wrong
Every failure carries a stable machine-readable code and the same meta.request_id a success carries — quote it and we can find your request. Errors are never billed.
401 Unauthorized
JSON
{
"error": {
"code": "UNAUTHORIZED",
"message": "The API key is invalid, expired, or revoked."
},
"meta": {
"request_id": "req_7Q2fK4mZ"
}
}- UNAUTHORIZEDHTTP 401
- Missing, malformed, expired, or revoked API key.
- FORBIDDENHTTP 403
- The key is valid but lacks the scope this product needs.
- VALIDATION_ERRORHTTP 422
- A query parameter is the wrong type or out of range.
- RATE_LIMITEDHTTP 429
- Rate limit exhausted. `Retry-After` says how long to wait.
- SERVICE_UNAVAILABLEHTTP 503
- No data recent enough to serve. Carries `Retry-After`, and is never billed.
Data freshness
Every response is timestamped
as_of is when the data was published, age_seconds how old it is now, and next_update_at when newer data is expected.
Up to date
200
Inside its published window. Almost every request.
Delayed
delayed: true
Newer data is late; you get the latest there is, flagged.
Unavailable
503
Nothing recent enough. Carries Retry-After, never billed.
Health
Is it up?
- Cek Ongkir
1/1 passing