List Conversions

This function allows you to list your conversions with pagination, filtering, and field selection. Conversions are kept for twelve months after the month they were made, then deleted, so older ones are no longer returned. See an example below:

You should authenticate/initialize Ip2Geo before using this method.

import { ListConversions } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions()

With Pagination

You can paginate through conversions using offset and limit:

import { ListConversions } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions({
    offset: 0,
    limit: 20
})

// Access pagination info
console.log(data.conversions)   // Array of conversions
console.log(data.hasMore)       // true if there are more conversions
console.log(data.totalCount)    // Total number of conversions

Filter conversions by IP address:

import { ListConversions } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions({
    ipSearch: '8.8.8.8'
})

With Select Fields

Select specific fields from the conversion data object:

import { ListConversions, SELECT } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions({
    select: [
        SELECT.COUNTRY_NAME,
        SELECT.COUNTRY_CODE,
        SELECT.ASN_NAME
    ]
})

Parameters

offsetnumberdefault: 0

The number of conversions to skip for pagination.

limitnumberdefault: 50

The maximum number of conversions to return. Maximum value is 50.

selectArray<SelectField>

Select the fields to return. Geolocation fields, the SELECT Constants, are read under data, and the stored fields (id, uniqueId, status, startedAt, completedAt, createdAt) can be named as they are. uniqueId always comes along, so every row can be matched to its conversion. If not specified, every field is returned.

ipSearchstring

Filter conversions by IP address.

Response

successboolean

Whether the request was successful.

messagestring

Response message describing the result.

codenumber

HTTP status code.

dataobject | null

The response data containing:

  • conversions: Array of conversion objects (or partial objects if select was used)
  • hasMore: Boolean indicating if there are more conversions to fetch
  • totalCount: Total number of conversions matching the query
_reqobject

Request metadata containing:

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

For all available SELECT constants and their values, see the SELECT Constants reference.

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.