Skip to main content
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

Return only specific fields for each conversion:
import { ListConversions, SELECT } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions({
    select: [
        SELECT.CONVERSION.UNIQUE_ID,
        SELECT.CONVERSION.STATUS,
        SELECT.CONVERSION.CREATED_AT
    ]
})

With Nested Data Fields

You can select specific nested fields from the data object instead of fetching the entire object:
import { ListConversions, SELECT } from '@ip2geo/sdk'

const { data, success, message } = await ListConversions({
    select: [
        SELECT.CONVERSION.UNIQUE_ID,
        SELECT.DATA.CONTINENT.COUNTRY.NAME,
        SELECT.DATA.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>
An array of property names to return for each conversion. Supports both top-level fields and nested data fields using dot notation. If not specified, all properties are returned.
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.

SELECT Constants

Use the SELECT.CONVERSION object for top-level field selection:
ConstantValue
SELECT.CONVERSION.IDid
SELECT.CONVERSION.UNIQUE_IDuniqueId
SELECT.CONVERSION.DATAdata
SELECT.CONVERSION.STATUSstatus
SELECT.CONVERSION.STARTED_ATstartedAt
SELECT.CONVERSION.COMPLETED_ATcompletedAt
SELECT.CONVERSION.CREATED_ATcreatedAt
SELECT.CONVERSION.CREDITEDcredited
SELECT.CONVERSION.CONVERT_ONLYconvertOnly

SELECT.DATA Constants

Use the SELECT.DATA object for nested data field selection:
ConstantValue
SELECT.DATA.IPdata.ip
SELECT.DATA.TYPEdata.type
SELECT.DATA.IS_EUdata.is_eu
SELECT.DATA.CONTINENT.NAMEdata.continent.name
SELECT.DATA.CONTINENT.CODEdata.continent.code
SELECT.DATA.CONTINENT.GEONAME_IDdata.continent.geoname_id
SELECT.DATA.CONTINENT.COUNTRY.NAMEdata.continent.country.name
SELECT.DATA.CONTINENT.COUNTRY.CODEdata.continent.country.code
SELECT.DATA.CONTINENT.COUNTRY.GEONAME_IDdata.continent.country.geoname_id
SELECT.DATA.CONTINENT.COUNTRY.PHONE_CODEdata.continent.country.phone_code
SELECT.DATA.CONTINENT.COUNTRY.CAPITALdata.continent.country.capital
SELECT.DATA.CONTINENT.COUNTRY.TLDdata.continent.country.tld
SELECT.DATA.CONTINENT.COUNTRY.SUBDIVISION.NAMEdata.continent.country.subdivision.name
SELECT.DATA.CONTINENT.COUNTRY.SUBDIVISION.CODEdata.continent.country.subdivision.code
SELECT.DATA.CONTINENT.COUNTRY.CITY.NAMEdata.continent.country.city.name
SELECT.DATA.CONTINENT.COUNTRY.CITY.GEONAME_IDdata.continent.country.city.geoname_id
SELECT.DATA.CONTINENT.COUNTRY.CITY.LATITUDEdata.continent.country.city.latitude
SELECT.DATA.CONTINENT.COUNTRY.CITY.LONGITUDEdata.continent.country.city.longitude
SELECT.DATA.CONTINENT.COUNTRY.CITY.ACCURACY_RADIUSdata.continent.country.city.accuracy_radius
SELECT.DATA.CONTINENT.COUNTRY.CITY.METRO_CODEdata.continent.country.city.metro_code
SELECT.DATA.CONTINENT.COUNTRY.CITY.POSTAL_CODEdata.continent.country.city.postal_code
SELECT.DATA.CONTINENT.COUNTRY.CITY.TIMEZONE.NAMEdata.continent.country.city.timezone.name
SELECT.DATA.CONTINENT.COUNTRY.CITY.TIMEZONE.TIME_NOWdata.continent.country.city.timezone.time_now
SELECT.DATA.CONTINENT.COUNTRY.FLAG.IMGdata.continent.country.flag.img
SELECT.DATA.CONTINENT.COUNTRY.FLAG.EMOJIdata.continent.country.flag.emoji
SELECT.DATA.CONTINENT.COUNTRY.FLAG.EMOJI_UNICODEdata.continent.country.flag.emoji_unicode
SELECT.DATA.CONTINENT.COUNTRY.CURRENCY.NAMEdata.continent.country.currency.name
SELECT.DATA.CONTINENT.COUNTRY.CURRENCY.CODEdata.continent.country.currency.code
SELECT.DATA.CONTINENT.COUNTRY.CURRENCY.SYMBOLdata.continent.country.currency.symbol
SELECT.DATA.REGISTERED_COUNTRY.NAMEdata.registered_country.name
SELECT.DATA.REGISTERED_COUNTRY.CODEdata.registered_country.code
SELECT.DATA.REGISTERED_COUNTRY.GEONAME_IDdata.registered_country.geoname_id
SELECT.DATA.ASN.NUMBERdata.asn.number
SELECT.DATA.ASN.NAMEdata.asn.name
SELECT.DATA.COMPLETION_TIME.MILISECONDSdata.completion_time.miliseconds
SELECT.DATA.COMPLETION_TIME.SECONDSdata.completion_time.seconds