Bulk Convert IP's
This http method allows you to convert multiple IP addresses into their corresponding geolocation data.
Bulk convert IPs
Converts up to 5,000 IPv4 or IPv6 addresses in one request and answers one item per address, in the order sent. An invalid address, or a valid one without a geolocation record, comes back with conversion: null. Every address sent counts toward your quota, valid or not.
post
https://api.ip2geo.dev/convertcurl --request POST \
--url 'https://api.ip2geo.dev/convert' \
--header 'x-api-key: i2g_sk_your_secret_key' \
--header 'content-type: application/json' \
--data '{"ips":["8.8.4.4","1.1.1.1"]}'const response = await fetch('https://api.ip2geo.dev/convert', {
method: 'POST',
headers: {
'x-api-key': 'i2g_sk_your_secret_key',
'content-type': 'application/json'
},
body: JSON.stringify({
"ips": [
"8.8.4.4",
"1.1.1.1"
]
})
})
const { success, message, data } = await response.json()Authorizations
x-api-keystringrequiredin: headerA secret key (
i2g_sk_...) from your server, or a public key (i2g_pk_...) from a browser. A public key only works when the request's Origin header matches the domain it was created for. Browsers set that header themselves, but any other client can set it to anything, so treat a public key as public: it converts addresses on your project's quota and can never read data.Body
application/json, required
ipsstring[]requiredmax items: 5000The IPv4 or IPv6 addresses to convert.
{
"ips": [
"8.8.4.4",
"1.1.1.1"
]
}Responses
200One item per address, in the order sent.
successbooleanrequiredWhether the request was successful.
messagestringrequiredResponse message.
codeintegerrequiredHTTP status code.
dataobject[]requiredOne item per address, in the order sent.
Show child attributes
ipstringrequiredThe address as it was sent.
conversionobject | nullrequiredThe address's geolocation data, or null when the address is invalid or has no geolocation record.
Show child attributes
ipstring | nullThe address that was converted.
typestring | nullThe address family.
Available options:
ipv4ipv6nullis_euboolean | nulltrue when the country is in the European Union (its 27 member states, and the Åland Islands and outermost regions such as Réunion that have a country code of their own), false for any other country, null when the country is unknown.continentobjectShow child attributes
namestring | nullcodestring | nullTwo-letter continent code, lowercase:
af, an, as, eu, na, oc or sa.geoname_idinteger | nullGeoNames ID for the continent.
countryobjectShow child attributes
namestring | nullcodestring | nullISO 3166-1 alpha-2 country code, lowercase.
geoname_idinteger | nullGeoNames ID for the country.
phone_codestring | nullThe country's international calling code, such as
+1, +44 or +7.capitalstring | nulltldstring | nullThe country-code top-level domain.
subdivisionobjectState, province, or region information.
Show child attributes
namestring | nullName of the state/province/region.
codestring | nullISO 3166-2 code for the subdivision, as the datasets write it (e.g., 'CA' for California).
cityobjectShow child attributes
namestring | nullgeoname_idinteger | nullGeoNames ID for the city.
latitudenumber | nulllongitudenumber | nullaccuracy_radiusinteger | nullRadius in kilometers around the coordinates where the IP is likely located.
metro_codeinteger | nullMetro area code (US only).
postal_codestring | nullPostal code, lowercase.
timezoneobjectShow child attributes
namestring | nullIANA time zone.
time_nowstring | nullThe local time in that time zone when the address was converted, written like
10/10/2026, 1:38:38 AM.flagobjectShow child attributes
imgstring | nullA 320 px wide PNG of the flag.
emojistring | nullemoji_unicodestring | nullcurrencyobjectShow child attributes
namestring | nullcodestring | nullISO 4217 currency code.
symbolstring | nullregistered_countryobjectThe country where the IP address is registered (may differ from location country for VPNs, proxies, etc.).
Show child attributes
namestring | nullName of the registered country.
codestring | nullISO 3166-1 alpha-2 code of the registered country, lowercase.
geoname_idinteger | nullGeoNames ID for the registered country.
asnobjectShow child attributes
numberinteger | nullThe autonomous system number.
namestring | nullThe organization that announces the address.
completion_timeobjectShow child attributes
milisecondsnumber | nullHow long the conversion took, in milliseconds.
secondsnumber | nullHow long the conversion took, in seconds.
_reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": true,
"message": "IP addresses converted to geo location data successfully.",
"code": 200,
"data": [
{
"ip": "8.8.4.4",
"conversion": {
"ip": "8.8.4.4",
"type": "ipv4",
"is_eu": false,
"continent": {
"name": "North America",
"code": "na",
"geoname_id": 6255149,
"country": {
"name": "United States",
"code": "us",
"geoname_id": 6252001,
"phone_code": "+1",
"capital": "Washington D.C.",
"tld": ".us",
"subdivision": {
"name": "Massachusetts",
"code": "MA"
},
"city": {
"name": "Westfield",
"geoname_id": 4955190,
"latitude": 42.1293,
"longitude": -72.7522,
"accuracy_radius": 10,
"metro_code": 543,
"postal_code": "01085",
"timezone": {
"name": "America/New_York",
"time_now": "10/10/2026, 1:38:38 AM"
}
},
"flag": {
"img": "https://flagcdn.com/w320/us.png",
"emoji": "🇺🇸",
"emoji_unicode": "U+1F1FA U+1F1F8"
},
"currency": {
"name": "United States Dollar",
"code": "USD",
"symbol": "$"
}
}
},
"registered_country": {
"name": "United States",
"code": "us",
"geoname_id": 6252001
},
"asn": {
"number": 15169,
"name": "Google Llc"
},
"completion_time": {
"miliseconds": 3,
"seconds": 0.003
}
}
}
],
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}400The body is not JSON, ips is missing or not an array, or it holds more than 5,000 addresses.
successbooleanrequiredAlways false for an error.
messagestringrequiredWhat went wrong, in a sentence you can show.
codeintegerrequiredHTTP status code.
dataobject | nullrequiredNull for most errors. A 429 carries
currentUsage, planLimit and plan, and a 400 for invalid conversion ids carries invalidIds._reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": false,
"message": "<string>",
"code": 123,
"data": null,
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}401The x-api-key header is missing, malformed, unknown or disabled, or a public key was sent with an Origin that does not match its domain.
successbooleanrequiredAlways false for an error.
messagestringrequiredWhat went wrong, in a sentence you can show.
codeintegerrequiredHTTP status code.
dataobject | nullrequiredNull for most errors. A 429 carries
currentUsage, planLimit and plan, and a 400 for invalid conversion ids carries invalidIds._reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": false,
"message": "<string>",
"code": 123,
"data": null,
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}429The project has used its plan's conversions for this period. data carries currentUsage, planLimit and plan.
successbooleanrequiredAlways false for an error.
messagestringrequiredWhat went wrong, in a sentence you can show.
codeintegerrequiredHTTP status code.
dataobject | nullrequiredNull for most errors. A 429 carries
currentUsage, planLimit and plan, and a 400 for invalid conversion ids carries invalidIds._reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": false,
"message": "<string>",
"code": 123,
"data": null,
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}500Something failed on our side. Reads are safe to retry; a conversion may already have been counted.
successbooleanrequiredAlways false for an error.
messagestringrequiredWhat went wrong, in a sentence you can show.
codeintegerrequiredHTTP status code.
dataobject | nullrequiredNull for most errors. A 429 carries
currentUsage, planLimit and plan, and a 400 for invalid conversion ids carries invalidIds._reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": false,
"message": "<string>",
"code": 123,
"data": null,
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}503The API is under maintenance. Retry later: https://api.ip2geo.dev/maintenance/status says when it is over.
successbooleanrequiredAlways false for an error.
messagestringrequiredWhat went wrong, in a sentence you can show.
codeintegerrequiredHTTP status code.
dataobject | nullrequiredNull for most errors. A 429 carries
currentUsage, planLimit and plan, and a 400 for invalid conversion ids carries invalidIds._reqobjectrequiredShow child attributes
reqIdstringrequiredUnique request identifier. Quote it when you contact support.
resTimenumberrequiredResponse time in milliseconds.
{
"success": false,
"message": "<string>",
"code": 123,
"data": null,
"_req": {
"reqId": "01a12452-07a8-7b41-a95f-3a2c1d0e9f8a",
"resTime": 2
}
}