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 retrieve a single conversion by its unique identifier, see an example below:
You should authenticate/initialize Ip2Geo before using this method.
import { GetConversion } from '@ip2geo/sdk'
const conversionId = 'your-conversion-uuid'
const { data, success, message } = await GetConversion({
conversionId: conversionId
})
With Select Fields
You can select specific fields from the conversion data object using the select parameter:
import { GetConversion, SELECT } from '@ip2geo/sdk'
const { data, success, message } = await GetConversion({
conversionId: 'your-conversion-uuid',
select: [
SELECT.COUNTRY_NAME,
SELECT.COUNTRY_CODE,
SELECT.ASN_NAME
]
})
// Response data structure:
// {
// data: {
// continent: {
// country: {
// name: 'United States',
// code: 'US'
// }
// },
// asn: {
// name: 'Cloudflare'
// }
// }
// }
TypeScript
Ruby
Python
PHP
Parameters
The unique identifier (UUID) of the conversion to retrieve.
Select specific data fields to return. If not specified, all data fields are returned. See SELECT Constants for all available fields. Response
Whether the request was successful.
Response message describing the result.
data
Conversion | Partial<Conversion> | null
The conversion data. If select was specified, only the selected fields are returned. Returns null if the conversion was not found.
Request metadata containing:
reqId: Unique request identifier.
resTime: Response time in milliseconds.
Parameters
The unique identifier (UUID) of the conversion to retrieve.
Select specific data fields to return. If not specified, all data fields are returned. See SELECT Constants for all available fields. Response
Whether the request was successful.
Response message describing the result.
The conversion data. If select was specified, only the selected data fields are returned. Returns nil if the conversion was not found.
Request metadata containing:
‘reqId’: Unique request identifier.
‘resTime’: Response time in milliseconds.
Parameters
The unique identifier (UUID) of the conversion to retrieve.
Select specific data fields to return. If not specified, all data fields are returned. See SELECT Constants for all available fields. Response
Whether the request was successful.
Response message describing the result.
The conversion data. If select was specified, only the selected data fields are returned. Returns None if the conversion was not found.
Request metadata containing:
‘reqId’: Unique request identifier.
‘resTime’: Response time in milliseconds.
Parameters
The unique identifier (UUID) of the conversion to retrieve.
Select specific data fields to return. If not specified, all data fields are returned. See SELECT Constants for all available fields. Response
Whether the request was successful.
Response message describing the result.
The conversion data. If select was specified, only the selected data fields are returned. Returns null if the conversion was not found.
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.