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>",
        "type": "ipv4",
        "is_eu": true,
        "continent": {
          "name": "<string>",
          "code": "<string>",
          "country": {
            "name": "<string>",
            "code": "<string>",
            "phone_code": "<string>",
            "capital": "<string>",
            "tld": "<string>",
            "city": {
              "name": "<string>",
              "latitude": 123,
              "longitude": 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>"
            }
          }
        },
        "asn": {
          "number": 123,
          "name": "<string>"
        },
        "completion_time": {
          "miliseconds": 123,
          "seconds": 123
        }
      }
    }
  ],
  "_req": {
    "reqId": "<string>",
    "resTime": 123
  }
}
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 API key here. Example: x-api-key: sk_live_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