Base URL
Endpoints Overview
Method | Endpoint | Description |
---|---|---|
GET | /ip/{ip_address} | Get location data for a specific IP address |
GET | /ip/ | Get location data for the requesting IP address |
POST | /ip/ | Get location data via POST request with JSON body |
GET /ip/
Get detailed location information for a specific IP address.URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ip_address | string | Yes | The IP address to look up (IPv4 or IPv6) |
Example Request
Response Format
Response Fields
Root Level
Field | Type | Description |
---|---|---|
ip | string | The IP address that was looked up |
timestamp | string | ISO 8601 timestamp of the request |
api_version | string | Current API version |
error | string | Error message (only present on errors) |
Country Information
Field | Type | Description |
---|---|---|
country.iso_code | string | Two-letter country ISO code |
country.name | string | Country name in English |
country.names | object | Country names in multiple languages |
country.confidence | integer | Confidence score (0-100) |
Continent Information
Field | Type | Description |
---|---|---|
continent.code | string | Two-letter continent code |
continent.name | string | Continent name in English |
continent.names | object | Continent names in multiple languages |
City Information
Field | Type | Description |
---|---|---|
city.name | string | City name in English |
city.names | object | City names in multiple languages |
city.confidence | integer | Confidence score (0-100) |
Postal Information
Field | Type | Description |
---|---|---|
postal.code | string | Postal/ZIP code |
postal.confidence | integer | Confidence score (0-100) |
Location Information
Field | Type | Description |
---|---|---|
location.latitude | float | Latitude coordinate |
location.longitude | float | Longitude coordinate |
location.accuracy_radius | integer | Accuracy radius in meters |
location.time_zone | string | Timezone identifier |
Subdivision Information
Field | Type | Description |
---|---|---|
subdivisions[].iso_code | string | Subdivision ISO code |
subdivisions[].name | string | Subdivision name in English |
subdivisions[].names | object | Subdivision names in multiple languages |
subdivisions[].confidence | integer | Confidence score (0-100) |
ASN Information
Field | Type | Description |
---|---|---|
asn.autonomous_system_number | integer | Autonomous System Number |
asn.autonomous_system_organization | string | ASN organization name |
GET /ip/
Get location data for the IP address making the request.Example Request
Response Format
Same as the specific IP endpoint, but theip
field will contain the requesting IP address.
POST /ip/
Get location data via POST request with JSON body.Request Body
Example Request
Response Format
Same as the GET endpoint.Error Responses
Invalid IP Address (400)
Not Found (404)
Internal Server Error (500)
HTTP Status Codes
Code | Description |
---|---|
200 | Success - Location data returned |
400 | Bad Request - Invalid IP address |
404 | Not Found - IP not in database |
500 | Internal Server Error |
Rate Limits
No rate limits! You can make unlimited requests to our API.CORS Headers
All endpoints include the following CORS headers:Data Accuracy
Confidence Scores
- 90-100: Very high confidence
- 70-89: High confidence
- 50-69: Medium confidence
- 30-49: Low confidence
- 0-29: Very low confidence
Accuracy Radius
Theaccuracy_radius
field indicates the radius in meters within which the IP address is likely located. Smaller values indicate higher accuracy.
Data Availability
Not all fields may be available for every IP address:- Country data: Available for most IP addresses
- City data: Available for many residential and business IPs
- ASN data: Available for most IP addresses
- Coordinates: Available when city data is present
Best Practices
IP Address Validation
Always validate IP addresses before sending them to the API:Error Handling
Always implement proper error handling:Caching
Consider caching results for frequently requested IP addresses:Ready to test the API? Check out our examples for code samples in multiple programming languages.