Skip to main content
POST
/
convert
Ip2Geo - Bulk Convert IPs
curl --request POST \
  --url https://api.ip2geo.dev/convert \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "ips": [
    "<string>"
  ]
}
'
{
  "success": true,
  "message": "<string>",
  "code": 123,
  "data": [
    {
      "ip": "<string>",
      "conversion": {
        "ip": "<string>",
        "is_eu": true,
        "continent": {
          "name": "<string>",
          "code": "<string>",
          "geoname_id": 123,
          "country": {
            "name": "<string>",
            "code": "<string>",
            "geoname_id": 123,
            "phone_code": "<string>",
            "capital": "<string>",
            "tld": "<string>",
            "subdivision": {
              "name": "<string>",
              "code": "<string>"
            },
            "city": {
              "name": "<string>",
              "geoname_id": 123,
              "latitude": 123,
              "longitude": 123,
              "accuracy_radius": 123,
              "metro_code": 123,
              "postal_code": "<string>",
              "timezone": {
                "name": "<string>",
                "time_now": "<string>"
              }
            },
            "flag": {
              "img": "<string>",
              "emoji": "<string>",
              "emoji_unicode": "<string>"
            },
            "currency": {
              "name": "<string>",
              "code": "<string>",
              "symbol": "<string>"
            }
          }
        },
        "registered_country": {
          "name": "<string>",
          "code": "<string>",
          "geoname_id": 123
        },
        "asn": {
          "number": 123,
          "name": "<string>"
        },
        "completion_time": {
          "miliseconds": 123,
          "seconds": 123
        }
      }
    }
  ],
  "_req": {
    "reqId": "<string>",
    "resTime": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.ip2geo.dev/llms.txt

Use this file to discover all available pages before exploring further.

This method can convert up to 5000 IP addresses in a single request. If you need to convert more than 5000 IPs, consider splitting your requests into smaller batches to avoid exceeding this limit.

Authorizations

x-api-key
string
header
required

Use your Ip2Geo secret key (i2g_sk_...) for server-side requests, or public key (i2g_pk_...) for client-side requests. Example: x-api-key: i2g_sk_abc123.

Body

application/json
ips
string[]
required

Array of IPv4 or IPv6 addresses to lookup.

Maximum array length: 5000

Response

Successful geolocation lookup.

success
boolean
required

Whether the request was successful.

message
string
required

Response message.

code
integer
required

HTTP status code.

data
object[]
required
_req
object
required