Bulk Convert IP's

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

ipsArray<string>required

An array of IPv4 or IPv6 addresses to convert. Maximum 5000 IPs per request.

Response

successboolean

Whether the request was successful.

messagestring

Response message describing the result.

codenumber

HTTP status code.

dataArray<{ 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). It is null when the address is invalid, has no geolocation data (private, reserved and unassigned addresses have none) or failed; every address counts toward your quota. See the Response Interface.
_reqobject

Request metadata containing:

  • reqId: Unique request identifier.
  • resTime: Response time in milliseconds.
Get Started

Convert IPs into accurate location data in milliseconds.

Sign up today and get 1,000 free monthly conversions, and discover why developers trust us for fast, reliable, and affordable IP conversions.