POST /v1/batch takes an ordered array of IPs and returns results in the same order, with per-IP error objects for the ones that don't parse. One authenticated call charges your quota once.
curl -X POST https://api.ip-atlas.io/v1/batch \ -H "X-API-Key: ipa_live_..." \ -H "Content-Type: application/json" \ -d '{"ips":["8.8.8.8","1.1.1.1","not-an-ip"]}'
{
"results": [
{"ip":"8.8.8.8","country":"US","asn":15169, ...},
{"ip":"1.1.1.1","country":"AU","asn":13335, ...},
{"ip":"not-an-ip","error":"invalid IP address"}
]
}
results[i] corresponds to ips[i].429 with no partial results. You never pay for half a batch.Append geo/ASN to every line of yesterday's access log. 1M lines = 10,000 batch calls.
Resolve thousands of signup IPs during a fraud review without 10,000 individual RTTs.
Moving off another IP API? Enrich your historical data in big batches with clean rate limiting.
import { IPAtlas } from '@trellisdigitalservices/ip-atlas'; const c = new IPAtlas({ apiKey: 'ipa_live_...' }); // Read IPs from a file, chunk, enrich, write. const chunks = chunk(ips, 100); for (const c100 of chunks) { const batch = await c.lookupBatch(c100); for (const r of batch.results) { /* ... */ } }