We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
IP Address API
Retrieve detailed information about IPv4 addresses
API Endpoints
JSON Endpoint
GET
/api/v1/ipv4/json?ip={ip}
Returns IP information in JSON format. Query parameters (such as custom fields) are appended as GET request parameters.
Parameter | Required | Description |
---|---|---|
ip
|
Yes | IPv4 address to lookup (e.g. 8.8.8.8). Private IPs will return 403 error. |
key
|
Yes (for full access) | Access key for paid tariffs. |
fields
|
No | Bitmask for field selection. Use fields generator to calculate. Paid tariffs only. |
CSV Endpoint
GET
/api/v1/ipv4/csv?ip={ip}
Returns IP information in CSV format. Paid tariffs only.
Parameter | Required | Description |
---|---|---|
ip
|
Yes | IPv4 address to lookup (e.g. 8.8.8.8). Private IPs will return 400 error. |
key
|
Yes | Access key. |
fields
|
No | Bitmask for field selection. Use fields generator to calculate. |
Returned data
You can select everything at once (without specifying the fields parameter), or generate a set of fields in the response to suit your needs.
Data section of response
Parameter | Type | Description | Example |
---|---|---|---|
as_description
|
string | AS name (RIR) or other AS description. Empty for IP blocks not being announced in BGP tables. | |
as_domain
|
string | Domain owned by the owner of the AS. | google.com |
asn
|
integer | AS number. Zero for IP blocks not being announced in BGP tables. | 15169 |
bgp_prefix
|
string | A prefix announced in BGP consists of the IPv4 address block being announced, mostly specific for queried IP. Null for IP blocks not being announced in BGP tables. | 8.8.8.0/24 |
calling_code
|
string | A unique sequence of numbers (typically 1-3 digits) that identifies a country or region within the international telephone numbering plan. | 1 |
cidr
|
string | An IPv4 prefix assigned to an organization, often including aggregated BGP prefixes. | 8.8.8.0/24 |
city
|
string | City corresponding to this IP according to geodatabases. Empty if information is missing. | Mountain View |
continent
|
string | Continent name corresponding to this IP according to geodatabases. Empty if information is missing. | North America |
continent_code
|
string | Two-letter continent code for continent name. | NA |
country
|
string | Country name. | United States |
country_code
|
string | Two-letter country code ISO 3166-1 alpha-2. | US |
currency
|
string | National currency. | USD |
district
|
string | District of the city. Empty if information is missing. | Downtown |
hosting
|
bool | Queried IPv4 from hosting, colocated or data center. | true |
isp
|
string | ISP name. | Google LLC |
lat
|
float | Latitude. | 37.4222984313965 |
lon
|
float | Longitude. | -122.084999084473 |
mobile
|
bool | Queried IPv4 from mobile (cellular) connection. | false |
proxy
|
bool | Queried IPv4 from proxy, VPN or Tor exit address. | false |
region
|
string | Country region code. | CA |
region_name
|
string | Country region name. | California |
timezone
|
string | Timezone name. | America/Los_Angeles |
timezone_offset
|
integer | Timezone offset in seconds relative to UTC. | -25200 |
zip
|
string | Postal code. | 94043 |
Data section is missing in errors case. String data may be empty when information is missing.
Error Handling
Common Errors
Code | Status | Description |
---|---|---|
400 | Bad Request | Invalid IP format or missing parameters, private IP address (RFC 1918). |
403 | Forbidden | Invalid API key. |
422 | Invalid IP | Incorrect IPv4 address. |
429 | Too Many Requests | Rate limit exceeded. |
500 | Internal server error | Infrastructure failure. |