Skip to main content

Endpoint

POST /v1/ip
Cost: 1 credit per request

Request body

{
  "ip": "8.8.8.8"
}
FieldTypeRequiredDescription
ipstringYesIPv4 or IPv6 address to look up

Example request

curl -X POST https://api.datalinkapis.com/v1/ip \
  -H "Authorization: Bearer dl_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "ip": "8.8.8.8" }'

Response

{
  "ip": "8.8.8.8",
  "valid": true,
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4056,
  "longitude": -122.0775,
  "timezone": "America/Los_Angeles",
  "isp": "Google LLC",
  "asn": "AS15169",
  "is_vpn": false,
  "is_proxy": false,
  "is_tor": false,
  "is_datacenter": true,
  "threat_score": 10,
  "credits_used": 1
}

Response fields

FieldTypeDescription
ipstringThe IP address that was checked
validbooleanWhether the IP is a valid, routable address
countrystringCountry name
country_codestringISO 3166-1 alpha-2 country code
regionstringRegion or state
citystringCity
latitudenumberLatitude coordinate
longitudenumberLongitude coordinate
timezonestringIANA timezone identifier
ispstringInternet Service Provider name
asnstringAutonomous System Number
is_vpnbooleanWhether the IP is associated with a VPN service
is_proxybooleanWhether the IP is a known proxy
is_torbooleanWhether the IP is a Tor exit node
is_datacenterbooleanWhether the IP belongs to a datacenter or cloud provider
threat_scoreintegerComposite threat score 0–100. Higher = higher risk.
credits_usedintegerCredits deducted — always 1 for this endpoint

Use cases

  • Fraud prevention — flag signups or transactions from VPNs, Tor, or high-risk proxies
  • Geo-restriction — enforce regional access controls
  • Location personalisation — serve localised content based on country or timezone