IP Geolocation
Location and network metadata for an IP address.
Base URL
https://use.api.co.id
Send an IP address (IPv4) in the ip query parameter with the x-api-co-id header. The response contains city, region, country, ISP, and coordinates (where available).
Returned data
- Detailed location: country, city, coordinates.
- Country metadata: calling code, TLD, languages.
- Currency information.
- Continent and region details.
- State/province information.
- 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 parameters
| Name | Type | Description |
|---|---|---|
ipRequired | string | IP address to geolocate (IPv4 format) Example: 103.123.45.67 |
Response fields
| Name | Type | Description |
|---|---|---|
is_successOptional | boolean | Example: true |
messageOptional | string | Example: Success |
dataOptional | object | |
data.ipOptional | string | IP address Example: 103.123.45.67 |
data.countryOptional | string | Country name Example: Indonesia |
data.country_codeOptional | string | Two-letter country code (ISO 3166-1 alpha-2) Example: ID |
data.cityOptional | string | City name Example: Jakarta |
data.regionOptional | string | Region/state name Example: Jakarta |
data.latitudeOptional | number | Latitude coordinate Example: -6.2088 |
data.longitudeOptional | number | Longitude coordinate Example: 106.8456 |
data.timezoneOptional | string | Timezone Example: Asia/Jakarta |
data.currencyOptional | string | Currency code Example: IDR |
data.currency_nameOptional | string | Currency name Example: Indonesian Rupiah |
data.calling_codeOptional | string | Country calling code Example: +62 |
data.tldOptional | string | Top-level domain Example: .id |
data.languagesOptional | string[] | List of languages spoken Example: ["Indonesian","English"] |
data.continentOptional | string | Continent name Example: Asia |
data.continent_codeOptional | string | Two-letter continent code Example: AS |
data.ispOptional | string | Internet Service Provider Example: PT Telekomunikasi Indonesia |
data.organizationOptional | string | Organization name Example: 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" }}Was this page helpful?