API Indonesia docsAPI referenceGet an API keyllms.txt

World data

Documentation index for AI agents: /llms.txt. Every page is also available as markdown: add .md to the URL.

Worldwide postal codes, public holidays, earthquakes, airports and ports.

Global reference data under open licences: postal codes for 124 countries (GeoNames), public holidays for 204 countries (Nager.Date), live earthquakes (USGS), airports (OurAirports) and ports (NGA World Port Index). Responses that need credit carry meta.attribution.

All endpoints need the x-api-key header (see Authentication) and return the standard envelope. Failed requests are not charged.

Endpoints on this page

World Postal Codes (GeoNames)

Postal codes for 124 countries from the GeoNames postal code dump (1,836,750 rows) with place name, admin 1-3 names and codes, lat/lon and an accuracy level. One postal code can map to several places, so a code lookup returns a list. Includes place-name search, postal code prefix search, nearby search from a coordinate (radius up to 50 km) and a country list with row counts. The data is licensed CC BY 4.0, so it may be used commercially as long as the attribution is kept. Coverage follows GeoNames: for Canada, the United Kingdom and the Netherlands only the first part of the code. The Indonesian /kodepos product stays separate.

GET /api/v1/kodepos-dunia/{country}/{code}

Look up a postal code. Every place that uses one postal code in one country, with admin 1-3 and coordinates. Write the code exactly as that country does (case-insensitive); the whole code is matched, so a full UK code such as SW1A 1AA does not exist, only SW1A. An unknown code answers 404 NOT_FOUND.

ParameterInRequiredTypeDescription
countrypathyesstringISO2 country code, e.g. DE.
codepathyesstringPostal code, e.g. 10115. URL-encode codes with spaces (SW1A, "HM%20DX").
curl "https://use.apiindonesia.id/api/v1/kodepos-dunia/DE/10115" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "DE",
      "postal_code": "10115",
      "place_name": "Berlin",
      "admin1_name": "Land Berlin",
      "admin1_code": "BE",
      "admin2_name": "Schöneberg",
      "admin2_code": "00",
      "admin3_name": "Berlin, Stadt",
      "admin3_code": "11000",
      "lat": 52.5323,
      "lon": 13.3846,
      "accuracy": 6
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 1,
    "total_pages": 1,
    "attribution": {
      "source": "GeoNames postal codes (https://www.geonames.org)",
      "license": "CC BY 4.0",
      "license_url": "https://creativecommons.org/licenses/by/4.0/",
      "source_url": "https://download.geonames.org/export/zip/",
      "attribution_page": "https://www.geonames.org",
      "notice": "Data diubah: allCountries.zip dinormalisasi ke format JSON API Indonesia; untuk CA, GB dan NL hanya bagian pertama kode pos (sesuai berkas sumber)"
    }
  }
}

GET /api/v1/kodepos-dunia/cari

Search place names. Place-name search inside one country. q matches the PREFIX of the place name, case-insensitively (at least 2 characters). In some countries (for example Germany) GeoNames also lists organisation or company names as place names. A page past the offset ceiling answers 400 PAGINATION_LIMIT.

ParameterInRequiredTypeDescription
countryqueryyesstringISO2 country code, e.g. DE.
qqueryyesstringPlace name prefix, e.g. berl.
pagequerynointegerPage. Defaults to 1.
per_pagequerynointegerItems per page. Defaults to 20, maximum 100.
curl "https://use.apiindonesia.id/api/v1/kodepos-dunia/cari?country=DE&q=berlin" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "DE",
      "postal_code": "10115",
      "place_name": "Berlin",
      "admin1_name": "Land Berlin",
      "admin1_code": "BE",
      "admin2_name": "Schöneberg",
      "admin2_code": "00",
      "admin3_name": "Berlin, Stadt",
      "admin3_code": "11000",
      "lat": 52.5323,
      "lon": 13.3846,
      "accuracy": 6
    },
    {
      "country_code": "DE",
      "postal_code": "10117",
      "place_name": "Berlin",
      "admin1_name": "Land Berlin",
      "admin1_code": "BE",
      "admin2_name": "Schöneberg",
      "admin2_code": "00",
      "admin3_name": "Berlin, Stadt",
      "admin3_code": "11000",
      "lat": 52.517,
      "lon": 13.3872,
      "accuracy": 6
    }
  ],
  "meta": {
    "total": 207,
    "page": 1,
    "per_page": 2,
    "total_pages": 104,
    "attribution": {
      "source": "GeoNames postal codes (https://www.geonames.org)",
      "license": "CC BY 4.0"
    }
  }
}

GET /api/v1/kodepos-dunia/prefix

Postal code prefix search. Every postal code in one country that starts with q, ordered by code. Useful for autocomplete in address forms.

ParameterInRequiredTypeDescription
countryqueryyesstringISO2 country code, e.g. DE.
qqueryyesstringPostal code prefix, at most 20 characters, e.g. 101.
pagequerynointegerPage. Defaults to 1.
per_pagequerynointegerItems per page. Defaults to 20, maximum 100.
curl "https://use.apiindonesia.id/api/v1/kodepos-dunia/prefix?country=DE&q=101" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "DE",
      "postal_code": "10102",
      "place_name": "Staatsbibliothek zu Berlin Preußischer Kulturbesitz",
      "admin1_name": "Land Berlin",
      "admin1_code": "BE",
      "admin2_name": null,
      "admin2_code": null,
      "admin3_name": null,
      "admin3_code": null,
      "lat": 52.5175,
      "lon": 13.3916,
      "accuracy": null
    },
    {
      "country_code": "DE",
      "postal_code": "10103",
      "place_name": "TOTAL Deutschland GmbH",
      "admin1_name": "Land Berlin",
      "admin1_code": "BE",
      "admin2_name": null,
      "admin2_code": null,
      "admin3_name": null,
      "admin3_code": null,
      "lat": 52.5286,
      "lon": 13.3692,
      "accuracy": null
    }
  ],
  "meta": {
    "total": 35,
    "page": 1,
    "per_page": 2,
    "total_pages": 18,
    "attribution": {
      "source": "GeoNames postal codes (https://www.geonames.org)",
      "license": "CC BY 4.0"
    }
  }
}

GET /api/v1/kodepos-dunia/nearby

Nearest postal places. Postal places around a coordinate, nearest first, with the distance in kilometres (distance_km). Radius defaults to 10 km (maximum 50) and limit to 20 (maximum 100). Restrict to one country with country. Searches across the 180° meridian are handled. Invalid parameters answer 400 VALIDATION_ERROR.

ParameterInRequiredTypeDescription
latqueryyesnumberLatitude, -90 to 90.
lonqueryyesnumberLongitude, -180 to 180 (lng is accepted too).
radiusquerynonumberRadius in km, maximum 50. Defaults to 10.
limitquerynointegerNumber of results, 1 to 100. Defaults to 20.
countryquerynostringOptional ISO2 country code.
curl "https://use.apiindonesia.id/api/v1/kodepos-dunia/nearby?lat=52.52&lon=13.38" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "DE",
      "postal_code": "11056",
      "place_name": "Vertretung des Landes Sachsen-Anhalt beim Bund Dienststelle Berlin",
      "lat": 52.5219,
      "lon": 13.3795,
      "accuracy": null,
      "distance_km": 0.21
    },
    {
      "country_code": "DE",
      "postal_code": "10108",
      "place_name": "Naturschutzbund Deutschland e.V. Bundesgeschäftsstelle",
      "lat": 52.5229,
      "lon": 13.3787,
      "accuracy": null,
      "distance_km": 0.33
    }
  ],
  "meta": {
    "attribution": {
      "source": "GeoNames postal codes (https://www.geonames.org)",
      "license": "CC BY 4.0"
    }
  }
}

GET /api/v1/kodepos-dunia/negara

List countries. The covered countries (124) with row counts and distinct postal code counts, plus the country name when the geo product has it. Not paginated.

curl "https://use.apiindonesia.id/api/v1/kodepos-dunia/negara" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "AD",
      "name": "Andorra",
      "row_count": 7,
      "postal_code_count": 7
    },
    {
      "country_code": "DE",
      "name": "Germany",
      "row_count": 23296,
      "postal_code_count": 10815
    }
  ],
  "meta": {
    "total": 124,
    "page": 1,
    "per_page": 124,
    "total_pages": 1,
    "attribution": {
      "source": "GeoNames postal codes (https://www.geonames.org)",
      "license": "CC BY 4.0"
    }
  }
}

World Holidays: Public Holidays of 204 Countries 2024-2028

National and regional public holidays for 204 countries and territories, 2024 to 2028 (13,338 rows, 878 of them valid only in some regions). Each row has the date, local name, English name, country code, a national or regional flag, ISO 3166-2 subdivision codes, holiday types and launch year. Endpoints list a country and year, check a single date, and return the next holidays. For Indonesian holidays use the /hari-libur product.

GET /api/v1/libur-dunia/negara

List countries. The 204 countries and territories covered, with their holiday row counts for 2024-2028. q matches part of the name or an exact ISO2 code.

ParameterInRequiredTypeDescription
qquerynostringPartial country name or ISO2 code.
pagequerynointegerPage. Defaults to 1.
per_pagequerynointegerItems per page. Defaults to 300, maximum 300.
curl "https://use.apiindonesia.id/api/v1/libur-dunia/negara" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country_code": "DE",
      "name": "Germany",
      "years": {
        "from": 2024,
        "to": 2028
      },
      "holiday_count": 97
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 300,
    "total_pages": 1,
    "attribution": {
      "source": "Nager.Date (https://github.com/nager/Nager.Date)",
      "license": "MIT",
      "license_url": "https://github.com/nager/Nager.Date/blob/main/LICENSE",
      "source_url": "https://date.nager.at/api/v3/PublicHolidays",
      "attribution_page": "https://github.com/nager/Nager.Date",
      "notice": "Data diubah: dinormalisasi ke format JSON API Indonesia; tanggal dan nama dari Nager.Date, bukan dari kalender resmi pemerintah"
    }
  }
}

GET /api/v1/libur-dunia/{country}/{year}

Holidays by country and year. All holidays of one country in one year (2024-2028), in date order. The subdivision filter returns national holidays plus those valid in that subdivision. A country that is not covered answers 404 NOT_FOUND.

ParameterInRequiredTypeDescription
countrypathyesstringISO2 country code, e.g. DE.
yearpathyesintegerYear 2024 to 2028.
subdivisionquerynostringISO 3166-2 code, e.g. DE-BY or US-CA.
typequerynostringPublic, Bank, School, Authorities, Optional or Observance.
globalquerynobooleantrue for national only, false for regional only.
pagequerynointegerPage. Defaults to 1.
per_pagequerynointegerItems per page. Defaults to 50, maximum 200.
curl "https://use.apiindonesia.id/api/v1/libur-dunia/DE/2026" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "date": "2026-10-03",
      "local_name": "Tag der Deutschen Einheit",
      "name": "German Unity Day",
      "country_code": "DE",
      "global": true,
      "counties": [],
      "types": [
        "Public"
      ],
      "fixed": true,
      "launch_year": 1990
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 50,
    "total_pages": 1,
    "attribution": {
      "source": "Nager.Date (https://github.com/nager/Nager.Date)",
      "license": "MIT",
      "license_url": "https://github.com/nager/Nager.Date/blob/main/LICENSE",
      "source_url": "https://date.nager.at/api/v3/PublicHolidays",
      "attribution_page": "https://github.com/nager/Nager.Date",
      "notice": "Data diubah: dinormalisasi ke format JSON API Indonesia; tanggal dan nama dari Nager.Date, bukan dari kalender resmi pemerintah"
    }
  }
}

GET /api/v1/libur-dunia/cek

Check a date. Is a given date a holiday in a country? Without date, today (UTC) is used. Without subdivision, holidays valid only in some regions are listed in regional_holidays and not counted as national.

ParameterInRequiredTypeDescription
countryqueryyesstringISO2 country code.
datequerynostringYYYY-MM-DD, 2024 to 2028. Defaults to today (UTC).
subdivisionquerynostringISO 3166-2 code.
curl "https://use.apiindonesia.id/api/v1/libur-dunia/cek?country=DE" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "country_code": "DE",
    "country": "Germany",
    "date": "2026-10-03",
    "subdivision": null,
    "is_holiday": true,
    "holidays": [
      {
        "date": "2026-10-03",
        "local_name": "Tag der Deutschen Einheit",
        "name": "German Unity Day",
        "country_code": "DE",
        "global": true,
        "counties": [],
        "types": [
          "Public"
        ],
        "fixed": true,
        "launch_year": 1990
      }
    ],
    "regional_holidays": []
  },
  "meta": {
    "attribution": {
      "source": "Nager.Date (https://github.com/nager/Nager.Date)",
      "license": "MIT",
      "license_url": "https://github.com/nager/Nager.Date/blob/main/LICENSE",
      "source_url": "https://date.nager.at/api/v3/PublicHolidays",
      "attribution_page": "https://github.com/nager/Nager.Date",
      "notice": "Data diubah: dinormalisasi ke format JSON API Indonesia; tanggal dan nama dari Nager.Date, bukan dari kalender resmi pemerintah"
    }
  }
}

GET /api/v1/libur-dunia/berikutnya

Next holidays. The next holidays of a country from a date (default today, UTC), in date order. Supports the subdivision and type filters and a limit of 1 to 50.

ParameterInRequiredTypeDescription
countryqueryyesstringISO2 country code.
fromquerynostringYYYY-MM-DD. Defaults to today (UTC).
limitquerynointegerNumber of holidays, 1 to 50. Defaults to 10.
subdivisionquerynostringISO 3166-2 code.
typequerynostringHoliday type, e.g. Public.
curl "https://use.apiindonesia.id/api/v1/libur-dunia/berikutnya?country=DE" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "country_code": "DE",
    "country": "Germany",
    "from": "2026-11-28",
    "holidays": [
      {
        "date": "2026-12-25",
        "local_name": "Erster Weihnachtstag",
        "name": "Christmas Day",
        "country_code": "DE",
        "global": true,
        "counties": [],
        "types": [
          "Public"
        ],
        "fixed": true,
        "launch_year": null
      }
    ]
  },
  "meta": {
    "attribution": {
      "source": "Nager.Date (https://github.com/nager/Nager.Date)",
      "license": "MIT",
      "license_url": "https://github.com/nager/Nager.Date/blob/main/LICENSE",
      "source_url": "https://date.nager.at/api/v3/PublicHolidays",
      "attribution_page": "https://github.com/nager/Nager.Date",
      "notice": "Data diubah: dinormalisasi ke format JSON API Indonesia; tanggal dan nama dari Nager.Date, bukan dari kalender resmi pemerintah"
    }
  }
}

World Earthquakes: Global Seismic Events (USGS)

Worldwide earthquakes from USGS, read live from the official feeds with no database: summary feeds for the past hour, day, week and month (significant, M4.5+, M2.5+, M1.0+, all) and a catalogue search filtered by magnitude, time window, bounding box or radius around a point. Results are normalised to clean JSON and cached for about 90 seconds. For Indonesian earthquakes from BMKG use the /gempa product.

GET /api/v1/gempa-dunia/terkini

Latest earthquakes (USGS feeds). A USGS summary feed, newest first. feed: significant, 4.5, 2.5, 1.0 or all; period: hour, day, week or month (significant has no hour). Defaults to feed 4.5, period day. A USGS outage answers 502 UPSTREAM_ERROR.

ParameterInRequiredTypeDescription
feedquerynostringsignificant, 4.5, 2.5, 1.0 or all. Defaults to 4.5.
periodquerynostringhour, day, week or month. Defaults to day.
limitquerynointegerMaximum events, 1 to 1000. Defaults to 100.
curl "https://use.apiindonesia.id/api/v1/gempa-dunia/terkini" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "feed": "4.5",
    "period": "day",
    "title": "USGS Magnitude 4.5+ Earthquakes, Past Day",
    "generated_at": "2026-11-27T11:01:37.000Z",
    "total": 10,
    "returned": 1,
    "events": [
      {
        "id": "us6000ue1k",
        "magnitude": 4.6,
        "magnitude_type": "mb",
        "place": "26 km NNW of Cuya, Chile",
        "title": "M 4.6 - 26 km NNW of Cuya, Chile",
        "time": "2026-11-27T10:15:35.595Z",
        "updated": "2026-11-27T10:53:54.152Z",
        "latitude": -18.945,
        "longitude": -70.2869,
        "depth_km": 78.805,
        "status": "reviewed",
        "type": "earthquake",
        "tsunami": false,
        "felt_reports": 1,
        "cdi": 2,
        "mmi": null,
        "alert": null,
        "significance": 326,
        "network": "us",
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ue1k",
        "detail_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/us6000ue1k.geojson"
      }
    ]
  },
  "meta": {
    "attribution": {
      "source": "U.S. Geological Survey (USGS) Earthquake Hazards Program",
      "license": "Public domain (U.S. Government work)",
      "license_url": "https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits",
      "source_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php",
      "attribution_page": "https://www.usgs.gov/information-policies-and-instructions/acknowledging-or-crediting-usgs",
      "notice": "Data diubah: GeoJSON USGS dinormalisasi ke format JSON API Indonesia. Kredit: U.S. Geological Survey. Bukan endorsement dari USGS."
    }
  }
}

GET /api/v1/gempa-dunia/cari

Search earthquakes (USGS catalogue). Search of the USGS catalogue through the FDSN service. Filter by magnitude, time window, bounding box (bbox) or radius around a point (latitude, longitude, maxradiuskm), not both. limit is capped at 500; truncated is true when the result count reaches the cap.

ParameterInRequiredTypeDescription
minmagnitudequerynonumberMinimum magnitude.
maxmagnitudequerynonumberMaximum magnitude.
starttimequerynostringISO 8601 start, e.g. 2026-11-01 (UTC).
endtimequerynostringISO 8601 end (UTC).
bboxquerynostringminLon,minLat,maxLon,maxLat.
latitudequerynonumberCentre latitude; needs longitude and maxradiuskm.
longitudequerynonumberCentre longitude.
maxradiuskmquerynonumberRadius in km.
orderbyquerynostringtime, time-asc, magnitude or magnitude-asc. Defaults to time.
limitquerynointegerMaximum events, 1 to 500. Defaults to 100.
curl "https://use.apiindonesia.id/api/v1/gempa-dunia/cari" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "total": 1,
    "limit": 1,
    "events": [
      {
        "id": "us6000ue1k",
        "magnitude": 4.6,
        "magnitude_type": "mb",
        "place": "26 km NNW of Cuya, Chile",
        "title": "M 4.6 - 26 km NNW of Cuya, Chile",
        "time": "2026-11-27T10:15:35.595Z",
        "updated": "2026-11-27T10:53:54.152Z",
        "latitude": -18.945,
        "longitude": -70.2869,
        "depth_km": 78.805,
        "status": "reviewed",
        "type": "earthquake",
        "tsunami": false,
        "felt_reports": 1,
        "cdi": 2,
        "mmi": null,
        "alert": null,
        "significance": 326,
        "network": "us",
        "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ue1k",
        "detail_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/us6000ue1k.geojson"
      }
    ],
    "truncated": true
  },
  "meta": {
    "attribution": {
      "source": "U.S. Geological Survey (USGS) Earthquake Hazards Program",
      "license": "Public domain (U.S. Government work)",
      "license_url": "https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits",
      "source_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php",
      "attribution_page": "https://www.usgs.gov/information-policies-and-instructions/acknowledging-or-crediting-usgs",
      "notice": "Data diubah: GeoJSON USGS dinormalisasi ke format JSON API Indonesia. Kredit: U.S. Geological Survey. Bukan endorsement dari USGS."
    }
  }
}

GET /api/v1/gempa-dunia/{id}

Retrieve an earthquake. One earthquake by USGS event id, e.g. us6000ue1k. An unknown id answers 404 NOT_FOUND.

ParameterInRequiredTypeDescription
idpathyesstringUSGS event id.
curl "https://use.apiindonesia.id/api/v1/gempa-dunia/us6000ue1k" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "id": "us6000ue1k",
    "magnitude": 4.6,
    "magnitude_type": "mb",
    "place": "26 km NNW of Cuya, Chile",
    "title": "M 4.6 - 26 km NNW of Cuya, Chile",
    "time": "2026-11-27T10:15:35.595Z",
    "updated": "2026-11-27T10:53:54.152Z",
    "latitude": -18.945,
    "longitude": -70.2869,
    "depth_km": 78.805,
    "status": "reviewed",
    "type": "earthquake",
    "tsunami": false,
    "felt_reports": 1,
    "cdi": 2,
    "mmi": null,
    "alert": null,
    "significance": 326,
    "network": "us",
    "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us6000ue1k",
    "detail_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/us6000ue1k.geojson"
  },
  "meta": {
    "attribution": {
      "source": "U.S. Geological Survey (USGS) Earthquake Hazards Program",
      "license": "Public domain (U.S. Government work)",
      "license_url": "https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits",
      "source_url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php",
      "attribution_page": "https://www.usgs.gov/information-policies-and-instructions/acknowledging-or-crediting-usgs",
      "notice": "Data diubah: GeoJSON USGS dinormalisasi ke format JSON API Indonesia. Kredit: U.S. Geological Survey. Bukan endorsement dari USGS."
    }
  }
}

Transport category: 49,343 airports and airfields in 239 countries with IATA/ICAO codes, coordinates, elevation, type, scheduled service and links. Filter by country, region, type and scheduled service, search by name or city, and find the nearest to a coordinate. Source: OurAirports, public domain.

GET /api/v1/bandara-dunia

List and search world airports. Returns world airports with codes, coordinates, elevation, country, region, city, scheduled service and links. Filters can be combined. Large airports and those with scheduled service come first.

ParameterInRequiredTypeDescription
qquerynostringPartial search on airport or city name, or an exact IATA/ICAO/ident code, e.g. supadio or PNK.
countryquerynostringISO 3166-1 alpha-2 country code, e.g. ID.
regionquerynostringISO 3166-2 region code, e.g. ID-KB.
continentquerynostringAF, AN, AS, EU, NA, OC or SA.
typequerynostringlarge_airport, medium_airport, small_airport or seaplane_base.
scheduledquerynobooleantrue for airports with scheduled passenger service, false for the rest.
iataquerynostringExact 3-character IATA code.
icaoquerynostringExact 4-letter ICAO code.
pagequerynointegerPage to retrieve. Defaults to 1; a page past the offset ceiling answers 400 PAGINATION_LIMIT.
per_pagequerynointegerItems per page. Defaults to 20, maximum 100.
curl "https://use.apiindonesia.id/api/v1/bandara-dunia" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "ident": "WIOO",
      "icao": "WIOO",
      "iata": "PNK",
      "name": "Supadio International Airport",
      "type": "large_airport",
      "lat": -0.152258,
      "lng": 109.404493,
      "continent": "AS",
      "country": "ID",
      "country_name": "Indonesia",
      "region": "ID-KB",
      "region_name": "Kalimantan Barat (West Kalimantan)",
      "municipality": "Pontianak",
      "elevation_ft": 10,
      "elevation_m": 3,
      "scheduled_service": true,
      "links": {
        "home": "http://www.supadio-airport.co.id/",
        "wikipedia": "https://en.wikipedia.org/wiki/Supadio_Airport"
      }
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 20,
    "total_pages": 1
  }
}

GET /api/v1/bandara-dunia/nearby

Nearest world airports. Finds airports around a coordinate, nearest first, with the distance in metres (distance_m). The default radius is 100,000 metres (maximum 500,000) and the default limit is 5 (maximum 50). Can be narrowed with type and scheduled.

ParameterInRequiredTypeDescription
latqueryyesnumberLatitude of the reference point, e.g. -0.03.
lngqueryyesnumberLongitude of the reference point, e.g. 109.33.
radiusquerynointegerRadius in metres, 1 to 500,000. Defaults to 100,000.
limitquerynointegerMaximum airports returned, 1 to 50. Defaults to 5.
typequerynostringFilter by airport type.
scheduledquerynobooleantrue for airports with scheduled service only.
curl "https://use.apiindonesia.id/api/v1/bandara-dunia/nearby?lat=-0.03&lng=109.33" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "ident": "WIOO",
      "icao": "WIOO",
      "iata": "PNK",
      "name": "Supadio International Airport",
      "type": "large_airport",
      "lat": -0.152258,
      "lng": 109.404493,
      "continent": "AS",
      "country": "ID",
      "country_name": "Indonesia",
      "region": "ID-KB",
      "region_name": "Kalimantan Barat (West Kalimantan)",
      "municipality": "Pontianak",
      "elevation_ft": 10,
      "elevation_m": 3,
      "scheduled_service": true,
      "links": {
        "home": "http://www.supadio-airport.co.id/",
        "wikipedia": "https://en.wikipedia.org/wiki/Supadio_Airport"
      },
      "distance_m": 15919
    }
  ]
}

GET /api/v1/bandara-dunia/negara

Countries with airport counts. Countries and territories with their airport count and the number with scheduled service. Not paginated.

curl "https://use.apiindonesia.id/api/v1/bandara-dunia/negara" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country": "ID",
      "country_name": "Indonesia",
      "continent": "AS",
      "airports": 623,
      "scheduled": 152
    }
  ],
  "meta": {
    "total": 239
  }
}

GET /api/v1/bandara-dunia/{kode}

World airport detail. Returns one airport by IATA code, ICAO code or OurAirports ident, plus gps_code and local_code. An unknown code answers 404 NOT_FOUND.

ParameterInRequiredTypeDescription
kodepathyesstringIATA, ICAO or ident code, e.g. PNK or WIOO.
curl "https://use.apiindonesia.id/api/v1/bandara-dunia/kode" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "ident": "WIOO",
    "icao": "WIOO",
    "iata": "PNK",
    "gps_code": "WIOO",
    "local_code": null,
    "name": "Supadio International Airport",
    "type": "large_airport",
    "lat": -0.152258,
    "lng": 109.404493,
    "continent": "AS",
    "country": "ID",
    "country_name": "Indonesia",
    "region": "ID-KB",
    "region_name": "Kalimantan Barat (West Kalimantan)",
    "municipality": "Pontianak",
    "elevation_ft": 10,
    "elevation_m": 3,
    "scheduled_service": true,
    "links": {
      "home": "http://www.supadio-airport.co.id/",
      "wikipedia": "https://en.wikipedia.org/wiki/Supadio_Airport"
    }
  }
}

World Ports: NGA World Port Index, Size & Facilities

Transport category: 3,805 ports in 195 countries and territories from the NGA World Port Index with WPI number, UN/LOCODE (where NGA prints one), coordinates, harbor size and type, maximum vessel size, channel depth and key facilities. Filter by country, size and facility, search by name, and find the nearest to a coordinate. Public domain.

GET /api/v1/pelabuhan-dunia

List and search world ports. Returns world ports with WPI number, UN/LOCODE, country, coordinates, harbor size and type, maximum vessel size, channel depth and key facilities. Large harbors come first.

ParameterInRequiredTypeDescription
qquerynostringPartial search on port name (including the alternate name) or an exact UN/LOCODE, e.g. rotterdam or NLRTM.
countryquerynostringISO 3166-1 alpha-2 country code, e.g. NL.
sizequerynostringHarbor size: very_small, small, medium or large.
unlocodequerynostringExact 5-character UN/LOCODE, e.g. NLRTM.
facilityquerynostringOnly ports with this facility: container, ro_ro, solid_bulk, liquid_bulk, breakbulk, oil_terminal, lng_terminal, wharves, cranes_container or railway.
min_draft_mquerynonumberMinimum channel depth in metres.
pagequerynointegerPage to retrieve. Defaults to 1; a page past the offset ceiling answers 400 PAGINATION_LIMIT.
per_pagequerynointegerItems per page. Defaults to 20, maximum 100.
curl "https://use.apiindonesia.id/api/v1/pelabuhan-dunia" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "wpi_number": 31140,
      "name": "Rotterdam",
      "alt_name": null,
      "unlocode": "NLRTM",
      "country": "NL",
      "country_name": "Netherlands",
      "region_name": "Netherlands",
      "water_body": "North Sea; North Atlantic Ocean",
      "lat": 51.9,
      "lng": 4.483333,
      "harbor_size": "Large",
      "harbor_type": "River (Basins)",
      "harbor_use": null,
      "channel_depth_m": 11,
      "max_vessel": {
        "length_m": null,
        "beam_m": null,
        "draft_m": null
      },
      "facilities": {
        "wharves": true,
        "anchorage": false,
        "med_mooring": false,
        "beach_mooring": false,
        "ice_mooring": false,
        "fuel_oil": true,
        "diesel_oil": true,
        "potable_water": true,
        "provisions": true,
        "cranes_fixed": true,
        "cranes_mobile": true,
        "cranes_floating": true
      }
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 20,
    "total_pages": 1
  }
}

GET /api/v1/pelabuhan-dunia/nearby

Nearest world ports. Finds ports around a coordinate, nearest first, with the distance in metres (distance_m). The default radius is 100,000 metres (maximum 500,000) and the default limit is 5 (maximum 50). Can be narrowed with size.

ParameterInRequiredTypeDescription
latqueryyesnumberLatitude of the reference point, e.g. 51.9.
lngqueryyesnumberLongitude of the reference point, e.g. 4.4.
radiusquerynointegerRadius in metres, 1 to 500,000. Defaults to 100,000.
limitquerynointegerMaximum ports returned, 1 to 50. Defaults to 5.
sizequerynostringFilter by harbor size.
curl "https://use.apiindonesia.id/api/v1/pelabuhan-dunia/nearby?lat=51.9&lng=4.4" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "wpi_number": 31140,
      "name": "Rotterdam",
      "alt_name": null,
      "unlocode": "NLRTM",
      "country": "NL",
      "country_name": "Netherlands",
      "region_name": "Netherlands",
      "water_body": "North Sea; North Atlantic Ocean",
      "lat": 51.9,
      "lng": 4.483333,
      "harbor_size": "Large",
      "harbor_type": "River (Basins)",
      "harbor_use": null,
      "channel_depth_m": 11,
      "max_vessel": {
        "length_m": null,
        "beam_m": null,
        "draft_m": null
      },
      "facilities": {
        "wharves": true,
        "anchorage": false,
        "med_mooring": false,
        "beach_mooring": false,
        "ice_mooring": false,
        "fuel_oil": true,
        "diesel_oil": true,
        "potable_water": true,
        "provisions": true,
        "cranes_fixed": true,
        "cranes_mobile": true,
        "cranes_floating": true
      },
      "distance_m": 5718
    }
  ]
}

GET /api/v1/pelabuhan-dunia/negara

Countries with port counts. Countries and territories with their port count, including the number of large and medium harbors. Not paginated.

curl "https://use.apiindonesia.id/api/v1/pelabuhan-dunia/negara" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": [
    {
      "country": "NL",
      "country_name": "Netherlands",
      "ports": 18,
      "large": 2,
      "medium": 4
    }
  ],
  "meta": {
    "total": 195
  }
}

GET /api/v1/pelabuhan-dunia/{wpi}

World port detail. Returns one port by WPI number or UN/LOCODE, with depths, offshore vessel size, pilotage, tugs, dry dock, NAVAREA and the Sailing Directions reference. Values NGA does not report are null.

ParameterInRequiredTypeDescription
wpipathyesstringWPI number or UN/LOCODE, e.g. 31140 or NLRTM.
curl "https://use.apiindonesia.id/api/v1/pelabuhan-dunia/wpi" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "success": true,
  "data": {
    "wpi_number": 31140,
    "name": "Rotterdam",
    "alt_name": null,
    "unlocode": "NLRTM",
    "country": "NL",
    "country_name": "Netherlands",
    "region_name": "Netherlands",
    "water_body": "North Sea; North Atlantic Ocean",
    "lat": 51.9,
    "lng": 4.483333,
    "harbor_size": "Large",
    "harbor_type": "River (Basins)",
    "harbor_use": null,
    "channel_depth_m": 11,
    "max_vessel": {
      "length_m": null,
      "beam_m": null,
      "draft_m": null
    },
    "facilities": {
      "wharves": true,
      "anchorage": false,
      "med_mooring": false,
      "beach_mooring": false,
      "ice_mooring": false,
      "fuel_oil": true,
      "diesel_oil": true,
      "potable_water": true,
      "provisions": true,
      "cranes_fixed": true,
      "cranes_mobile": true,
      "cranes_floating": true
    },
    "shelter": "Fair",
    "tidal_range_m": 1,
    "entrance_width_m": null,
    "depths_m": {
      "channel": 11,
      "anchorage": 11,
      "cargo_pier": 6.4,
      "oil_terminal": 12.5,
      "lng_terminal": null
    },
    "offshore_max_vessel": {
      "length_m": null,
      "beam_m": null,
      "draft_m": null
    },
    "pilotage": {
      "compulsory": "yes",
      "available": "yes"
    },
    "tugs_assistance": "yes",
    "repairs": "Major",
    "dry_dock": "Medium",
    "navarea": "I",
    "sailing_direction": "Sailing Directions Pub. 192 (Enroute) - North Sea",
    "publication_link": "https://msi.geo.nga.mil/api/publications/download?key=16694491/SFH00000/Pub192bk.pdf&type=view",
    "chart": "37243"
  }
}