Lookup a specific IPv4 or IPv6 address. Append the IP to the path, for example /134.201.250.155. Use fields to limit the response to only the metadata an agent needs.
{
"fields": {
"description": "Comma-separated fields to include, e.g. ip,type,country_name,region_name,city,latitude,longitude,connection,security.",
"required": false,
"type": "string"
},
"hostname": {
"description": "Set to 1 to include hostname data when available.",
"required": false,
"type": "integer"
},
"language": {
"description": "Optional response language code supported by IPstack.",
"required": false,
"type": "string"
},
"security": {
"description": "Set to 1 to include IPstack security fields when the upstream plan supports them.",
"required": false,
"type": "integer"
}
}{
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"connection": {
"type": [
"object",
"null"
]
},
"continent_code": {
"type": [
"string",
"null"
]
},
"continent_name": {
"type": [
"string",
"null"
]
},
"country_code": {
"type": [
"string",
"null"
]
},
"country_name": {
"type": [
"string",
"null"
]
},
"currency": {
"type": [
"object",
"null"
]
},
"ip": {
"type": "string"
},
"latitude": {
"type": [
"number",
"null"
]
},
"location": {
"type": [
"object",
"null"
]
},
"longitude": {
"type": [
"number",
"null"
]
},
"region_code": {
"type": [
"string",
"null"
]
},
"region_name": {
"type": [
"string",
"null"
]
},
"security": {
"type": [
"object",
"null"
]
},
"time_zone": {
"type": [
"object",
"null"
]
},
"type": {
"type": "string"
},
"zip": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}{
"path": "/134.201.250.155",
"query": {
"fields": "ip,type,country_name,region_name,city,latitude,longitude,connection"
}
}{
"city": "Los Angeles",
"connection": {
"asn": 25876,
"isp": "Los Angeles Department of Water & Power"
},
"country_code": "US",
"country_name": "United States",
"ip": "134.201.250.155",
"latitude": 34.06555,
"longitude": -118.24054,
"region_name": "California",
"type": "ipv4"
}