Skip to content
All APIs

Cek Ongkir

8 couriers · Logistics · 1 endpoint

Shipping tariffs for any route in Indonesia, kecamatan to kecamatan — every courier's services with estimated delivery time and price, at any weight.

Base URL

https://api.diraz.ae
14 requests1d cache1 credit / request

Endpoint

GET/v1/ongkir

Snippet

Request — cURL

v1

curl https://api.diraz.ae/v1/ongkir \
  -H "Authorization: Bearer drz_live_…"

Query 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

v1

{
  "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

401 Unauthorized

v1

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "The API key is invalid, expired, or revoked."
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ"
  }
}

Every failure carries a stable machine-readable code before the human message, and the same meta.request_id the successful responses carry. Quote it and we can find your exact request.

Errors are free

Nothing on this page is billed. You are charged for a 2xx and nothing else — a rejected key, a bad parameter, a rate limit, or an outage on our side all cost you zero. Retry without watching the meter.

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.
Total requests14
Cache1d
Status
Operational
Category
Logistics
Scope
market:read
Rate limit
120 requests / 60s per key
Pricing
1 credit / request
Request a keyView as Markdown
  • Cek Ongkir

1/1 passing

Every response is timestamped. as_of is when the data was published, age_seconds how old that is now, and next_update_at when newer data is expected.

Three shapes to handle:

  • Up to date200

    The data is inside its published window. The overwhelming majority of requests.

  • Delayeddelayed: true

    Newer data is late. You still get the most recent there is, flagged so you can decide whether to use it.

  • Unavailable503

    Nothing recent enough to serve. Carries Retry-After, and is never billed.