Filtering Response Fields
You can choose to request only a single field to be returned in the API response or to get multiple fields pass a "fields" query parameter with the names of the specific fields you need.

Selecting Multiple Fields

Looking up the location and mobile carrier information associated with an IP Address
1
curl 'https://api.ipdata.co/69.78.70.144?api-key=test&fields=ip,city,region,country_name,continent_name,carrier'
Copied!
Sample Response
1
{
2
"ip": "69.78.70.144",
3
"city": "Farmersville",
4
"region": "Texas",
5
"country_name": "United States",
6
"continent_name": "North America",
7
"carrier": {
8
"name": "Verizon",
9
"mcc": "310",
10
"mnc": "004"
11
}
12
}
Copied!

Selecting a Single Field

Looking up the calling IP's country name
1
curl https://api.ipdata.co/country_name?api-key=test
Copied!
Looking up a specific IP's country name
1
curl https://api.ipdata.co/3.3.3.3/country_name?api-key=test
Copied!
Sample Response
1
United States
Copied!
The available fields are;
  • ip
  • is_eu
  • city
  • region
  • region_code
  • country_name
  • country_code
  • continent_name
  • continent_code
  • latitude
  • longitude
  • asn
  • postal
  • calling_code
  • flag
  • emoji_flag
  • emoji_unicode
  • carrier
  • languages
  • currency
  • time_zone
  • threat
  • count
For a description of every field see Our Data Table.
Last modified 1yr ago