IP Geolocation
Lokasi dan metadata jaringan dari alamat IP.
Base URL
https://use.api.co.id
Kirim alamat IP (IPv4) lewat query ip dengan header x-api-co-id. Response berisi kota, wilayah, negara, ISP, dan koordinat (jika tersedia).
Data yang dikembalikan
- Lokasi detail: negara, kota, koordinat.
- Metadata negara: kode telepon, TLD, bahasa.
- Informasi mata uang.
- Detail benua dan region.
- Informasi provinsi/state.
- ISP.
Get IP Geolocation
GET/location/ip-geolocation
Get detailed geolocation information for an IP address including country, city, coordinates, country metadata, currency information, continent and region details.
Query parameter
| Nama | Tipe | Keterangan |
|---|---|---|
ipWajib | string | IP address to geolocate (IPv4 format) Contoh: 103.123.45.67 |
Field response
| Nama | Tipe | Keterangan |
|---|---|---|
is_successOpsional | boolean | Contoh: true |
messageOpsional | string | Contoh: Success |
dataOpsional | object | |
data.ipOpsional | string | IP address Contoh: 103.123.45.67 |
data.countryOpsional | string | Country name Contoh: Indonesia |
data.country_codeOpsional | string | Two-letter country code (ISO 3166-1 alpha-2) Contoh: ID |
data.cityOpsional | string | City name Contoh: Jakarta |
data.regionOpsional | string | Region/state name Contoh: Jakarta |
data.latitudeOpsional | number | Latitude coordinate Contoh: -6.2088 |
data.longitudeOpsional | number | Longitude coordinate Contoh: 106.8456 |
data.timezoneOpsional | string | Timezone Contoh: Asia/Jakarta |
data.currencyOpsional | string | Currency code Contoh: IDR |
data.currency_nameOpsional | string | Currency name Contoh: Indonesian Rupiah |
data.calling_codeOpsional | string | Country calling code Contoh: +62 |
data.tldOpsional | string | Top-level domain Contoh: .id |
data.languagesOpsional | string[] | List of languages spoken Contoh: ["Indonesian","English"] |
data.continentOpsional | string | Continent name Contoh: Asia |
data.continent_codeOpsional | string | Two-letter continent code Contoh: AS |
data.ispOpsional | string | Internet Service Provider Contoh: PT Telekomunikasi Indonesia |
data.organizationOpsional | string | Organization name Contoh: PT Telekomunikasi Indonesia |
Request
curl -X GET "https://use.api.co.id/location/ip-geolocation?ip=103.123.45.67" \ -H "x-api-co-id: $API_CO_ID_KEY"Response
{ "is_success": true, "message": "Success", "data": { "ip": "103.123.45.67", "country": "Indonesia", "country_code": "ID", "city": "Jakarta", "region": "Jakarta", "latitude": -6.2088, "longitude": 106.8456, "timezone": "Asia/Jakarta", "currency": "IDR", "currency_name": "Indonesian Rupiah", "calling_code": "+62", "tld": ".id", "languages": [ "Indonesian", "English" ], "continent": "Asia", "continent_code": "AS", "isp": "PT Telekomunikasi Indonesia", "organization": "PT Telekomunikasi Indonesia" }}Apakah halaman ini membantu?