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 list your conversions with pagination, filtering, and field selection, 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

offset
number
default:"0"
The number of conversions to skip for pagination.
limit
number
default:"50"
The maximum number of conversions to return. Maximum value is 50.
select
Array<SelectField>
Select specific data fields to return. If not specified, all data fields are returned. See SELECT Constants for all available fields.
Filter conversions by IP address.

Response

success
boolean
Whether the request was successful.
message
string
Response message describing the result.
code
number
HTTP status code.
data
object | 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
_req
object
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.