Endpoints
All endpoints return JSON. Lookups use GET, and batch uses POST.
Base URL: https://api.ipzentra.com. Send your key in the X-Api-Key header with every request.
Look up an IP address
/v1/{ip}Returns everything we know about one IPv4 or IPv6 address.
Check an IP against expected countries
/v1/check?ip={ip}&country=IN,SGReturns the full lookup plus expected and country_match. Use it when you only accept visitors from certain countries.
| Parameter | Required | Description |
|---|---|---|
ip | Yes | The IPv4 or IPv6 address to check. |
country | Yes | One or more two-letter country codes separated by commas, for example IN,SG. |
Look up many IPs at once
/v1/batchSend up to 100 IP addresses in one request as a JSON body. Results come back in the same order, with the same fields as a single lookup. Add country to get country_match for every IP. Each valid IP counts as one lookup against your daily quota, and invalid IPs are not charged. If a batch is larger than the lookups left today, the whole request is refused with 429 and nothing is charged.
curl -X POST -H "X-Api-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"ips":["49.207.48.1","8.8.8.8","not-an-ip"],"country":"IN"}' \
https://api.ipzentra.com/v1/batch
{"count":3,"ok":2,"results":[
{"ip":"49.207.48.1","expected":["IN"],"country_match":true,"country_code":"IN", ...},
{"ip":"8.8.8.8","expected":["IN"],"country_match":false,"country_code":"US", ...},
{"ip":"not-an-ip","error":"bad_ip","message":"Invalid IP address"}]}
Look up the caller
/v1/Returns the lookup for the address the request came from. Handy for testing your setup.
Service status
/healthA public status check that needs no key, ideal for uptime monitors. It does not count against your lookups.