Logo

Bulk Lookup of IP Locations

The bulk lookup endpoint allows you to retrieve location information for multiple IP addresses in a single request. This is ideal for applications that need to process large numbers of IPs efficiently.

HTTP Request

https://api.ipflare.io/bulk-lookup

Headers

HeaderDescription
X-API-KeyThe API key required to authenticate requests. You can obtain your API key from the API Keys page.

Body

FieldDescription
ipsA comma-separated list of IP addresses for which you want to retrieve location information.
Maximum of 500 IPs per request.

URL Query Parameters (Optional)

ParameterDescription
fieldsA comma-separated list of fields to include in the response. Available fields: asn, isp.
1const res = await fetch("https://api.ipflare.io/bulk-lookup", {
2 method: "POST",
3 headers: {
4 "X-API-Key": 'YOUR_API_KEY',
5 "Content-Type": "application/json",
6 },
7 // Max 500 IP's per request
8 body: JSON.stringify({
9 ips: [
10 "104.174.125.138",
11 "not_a_valid_IP",
12 "2001:fb1:c0:2dfd:8965:bc32:5b49:7ea9",
13 ],
14 }),
15 });
16
17const geoData = await res.json();

Response Fields

FieldDescription
resultsArray of IP Geolocation or IP Geolocation Error

Success Response Fields

FieldDescription
ipIP address
status'success'
dataIP Geolocation data

Error Response Fields

FieldDescription
error_messageError message
ipIP address
status'error'

View example response

Error Codes

FieldDescription
INVALID_IP_ADDRESSThe provided IP address is invalid.
RESERVED_IP_ADDRESSThe provided IP address is reserved and cannot be used.
GEOLOCATION_NOT_FOUNDGeolocation information for the provided IP address could not be found.
QUOTA_EXCEEDEDThe request quota has been exceeded.
INTERNAL_SERVER_ERRORAn internal server error occurred.
NO_API_KEY_PROVIDEDNo API key was provided in the request.
UNAUTHORIZEDThe provided API key is not authorized.

View example error response