Batch API

Our /batch API endpoint allows you to group up to 100 IPinfo API requests into a single request. This can really speed up processing of bulk IP lookups, but can also be useful if you want to lookup information cross our different APIs.

To make a batch request you need to POST a JSON array containing all of the IPinfo API URLs you'd like to get the data for. The response will be a JSON object with the URLs as keys, and the responses as the values. Here's an example that uses curl and the batch endpoint to get the country information for 2 different IPs with a single API request:

curl -XPOST -H "Content-Type: application/json" \
 --data '["", ""]' \$TOKEN
  "": "US",
  "": "US"

Note that for the purposes of request volume tracking the call to /batch isn't counted, but all of the URLs within the call are, so the example above counts as 2 requests, and a single call to /batch with 100 URLs would count as 100 requests.

The batch endpoint works across all of our APIs, so you can use it with our ASN, IP ranges and hosted domains endpoints too.