Skip to main content

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 function allows you to convert multiple IP addresses in a single request, making it efficient for batch processing. You can provide an array of IP addresses, and the function will return their corresponding geolocation data.
You should authenticate/initialize Ip2Geo before using this method.
import { ConvertIPs } from '@ip2geo/sdk'

const ipAddresses = [
    '8.8.8.8',
    '8.8.4.4',
    '1.1.1.1',
    '9.9.9.9',
    '4.4.4.4',
    '3.3.3.3'
]

const { data, success, message } = await ConvertIPs({
    ips: ipAddresses
})

Parameters

ips
Array<string>
required
An array of IPv4 or IPv6 addresses to convert. Maximum 5000 IPs per request.

Response

success
boolean
Whether the request was successful.
message
string
Response message describing the result.
code
number
HTTP status code.
data
Array<{ ip: string, conversion: Ip | null }>
An array of conversion results. Each item contains:
  • ip: The IP address that was converted.
  • conversion: The geolocation data for the IP (see Ip Interface). Returns null if the conversion failed for that IP Response Interface.
_req
object
Request metadata containing:
  • reqId: Unique request identifier.
  • resTime: Response time in milliseconds.