> ## 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.

# List Conversions

This function allows you to list your conversions with pagination, filtering, and field selection, see an example below:

<Warning>
  You should authenticate/initialize <a href="/sdk/init">Ip2Geo</a> before using this method.
</Warning>

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { ListConversions } from '@ip2geo/sdk'

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

  ```ruby Ruby theme={null}
  result = Ip2Geo.list_conversions

  # {
  #     'success' => true,
  #     'code' => 200,
  #     'message' => 'Success',
  #     'data' => {
  #         'conversions' => [...],
  #         'hasMore' => true,
  #         'totalCount' => 100
  #     },
  #     '_req' => { 'reqId' => '...', 'resTime' => 123 }
  # }
  ```

  ```python Python theme={null}
  import ip2geo

  result = ip2geo.list_conversions()

  # {
  #     'success': True,
  #     'code': 200,
  #     'message': 'Success',
  #     'data': {
  #         'conversions': [...],
  #         'hasMore': True,
  #         'totalCount': 100
  #     },
  #     '_req': { 'reqId': '...', 'resTime': 123 }
  # }
  ```

  ```php PHP theme={null}
  <?php

  use Ip2Geo\Ip2Geo;

  $result = Ip2Geo::listConversions();

  // [
  //     'success' => true,
  //     'code' => 200,
  //     'message' => 'Success',
  //     'data' => [
  //         'conversions' => [...],
  //         'hasMore' => true,
  //         'totalCount' => 100,
  //     ],
  //     '_req' => ['reqId' => '...', 'resTime' => 123],
  // ]
  ```
</CodeGroup>

### With Pagination

You can paginate through conversions using <code>offset</code> and <code>limit</code>:

<CodeGroup>
  ```typescript TypeScript theme={null}
  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
  ```

  ```ruby Ruby theme={null}
  result = Ip2Geo.list_conversions(offset: 0, limit: 20)

  # Access pagination info
  puts result['data']['conversions']   # Array of conversions
  puts result['data']['hasMore']       # true if there are more conversions
  puts result['data']['totalCount']    # Total number of conversions
  ```

  ```python Python theme={null}
  result = ip2geo.list_conversions(offset=0, limit=20)

  # Access pagination info
  print(result['data']['conversions'])   # List of conversions
  print(result['data']['hasMore'])       # True if there are more conversions
  print(result['data']['totalCount'])    # Total number of conversions
  ```

  ```php PHP theme={null}
  <?php

  $result = Ip2Geo::listConversions(offset: 0, limit: 20);

  // Access pagination info
  print_r($result['data']['conversions']);   // Array of conversions
  var_dump($result['data']['hasMore']);      // true if there are more conversions
  echo $result['data']['totalCount'];        // Total number of conversions
  ```
</CodeGroup>

### With IP Search

Filter conversions by IP address:

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { ListConversions } from '@ip2geo/sdk'

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

  ```ruby Ruby theme={null}
  result = Ip2Geo.list_conversions(ip_search: '8.8.8.8')
  ```

  ```python Python theme={null}
  result = ip2geo.list_conversions(ip_search='8.8.8.8')
  ```

  ```php PHP theme={null}
  <?php

  $result = Ip2Geo::listConversions(ipSearch: '8.8.8.8');
  ```
</CodeGroup>

### With Select Fields

Select specific fields from the conversion <code>data</code> object:

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { ListConversions, SELECT } from '@ip2geo/sdk'

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

  ```ruby Ruby theme={null}
  result = Ip2Geo.list_conversions(
      select: [
          Ip2Geo.select[:COUNTRY_NAME],
          Ip2Geo.select[:COUNTRY_CODE],
          Ip2Geo.select[:ASN_NAME]
      ]
  )
  ```

  ```python Python theme={null}
  result = ip2geo.list_conversions(
      select=[
          ip2geo.SELECT['COUNTRY_NAME'],
          ip2geo.SELECT['COUNTRY_CODE'],
          ip2geo.SELECT['ASN_NAME'],
      ]
  )
  ```

  ```php PHP theme={null}
  <?php

  $result = Ip2Geo::listConversions(
      select: [
          Ip2Geo::SELECT['COUNTRY_NAME'],
          Ip2Geo::SELECT['COUNTRY_CODE'],
          Ip2Geo::SELECT['ASN_NAME'],
      ],
  );
  ```
</CodeGroup>

<Tabs>
  <Tab title="TypeScript">
    ### Parameters

    <ParamField path="offset" type="number" default="0">
      The number of conversions to skip for pagination.
    </ParamField>

    <ParamField path="limit" type="number" default="50">
      The maximum number of conversions to return. Maximum value is 50.
    </ParamField>

    <ParamField path="select" type="Array<SelectField>">
      Select specific data fields to return. If not specified, all data fields are returned. See <a href="/constants/select">SELECT Constants</a> for all available fields.
    </ParamField>

    <ParamField path="ipSearch" type="string">
      Filter conversions by IP address.
    </ParamField>

    ### Response

    <ResponseField name="success" type="boolean">
      Whether the request was successful.
    </ResponseField>

    <ResponseField name="message" type="string">
      Response message describing the result.
    </ResponseField>

    <ResponseField name="code" type="number">
      HTTP status code.
    </ResponseField>

    <ResponseField name="data" type="object | null">
      The response data containing:

      * <code>conversions</code>: Array of conversion objects (or partial objects if <code>select</code> was used)
      * <code>hasMore</code>: Boolean indicating if there are more conversions to fetch
      * <code>totalCount</code>: Total number of conversions matching the query
    </ResponseField>

    <ResponseField name="_req" type="object">
      Request metadata containing:

      * <code>reqId</code>: Unique request identifier.
      * <code>resTime</code>: Response time in milliseconds.
    </ResponseField>
  </Tab>

  <Tab title="Ruby">
    ### Parameters

    <ParamField path="offset" type="Integer" default="0">
      The number of conversions to skip for pagination.
    </ParamField>

    <ParamField path="limit" type="Integer" default="50">
      The maximum number of conversions to return. Maximum value is 50.
    </ParamField>

    <ParamField path="select" type="Array<String>">
      Select specific data fields to return. If not specified, all data fields are returned. See <a href="/constants/select">SELECT Constants</a> for all available fields.
    </ParamField>

    <ParamField path="ip_search" type="String">
      Filter conversions by IP address.
    </ParamField>

    ### Response

    <ResponseField name="success" type="Boolean">
      Whether the request was successful.
    </ResponseField>

    <ResponseField name="message" type="String">
      Response message describing the result.
    </ResponseField>

    <ResponseField name="code" type="Integer">
      HTTP status code.
    </ResponseField>

    <ResponseField name="data" type="Hash | nil">
      The response data containing:

      * <code>'conversions'</code>: Array of conversion hashes (or partial hashes if <code>select</code> was used)
      * <code>'hasMore'</code>: Boolean indicating if there are more conversions to fetch
      * <code>'totalCount'</code>: Total number of conversions matching the query
    </ResponseField>

    <ResponseField name="_req" type="Hash">
      Request metadata containing:

      * <code>'reqId'</code>: Unique request identifier.
      * <code>'resTime'</code>: Response time in milliseconds.
    </ResponseField>
  </Tab>

  <Tab title="Python">
    ### Parameters

    <ParamField path="offset" type="int" default="0">
      The number of conversions to skip for pagination.
    </ParamField>

    <ParamField path="limit" type="int" default="50">
      The maximum number of conversions to return. Maximum value is 50.
    </ParamField>

    <ParamField path="select" type="list[str]">
      Select specific data fields to return. If not specified, all data fields are returned. See <a href="/constants/select">SELECT Constants</a> for all available fields.
    </ParamField>

    <ParamField path="ip_search" type="str">
      Filter conversions by IP address.
    </ParamField>

    ### Response

    <ResponseField name="success" type="bool">
      Whether the request was successful.
    </ResponseField>

    <ResponseField name="message" type="str">
      Response message describing the result.
    </ResponseField>

    <ResponseField name="code" type="int">
      HTTP status code.
    </ResponseField>

    <ResponseField name="data" type="dict | None">
      The response data containing:

      * <code>'conversions'</code>: List of conversion dicts (or partial dicts if <code>select</code> was used)
      * <code>'hasMore'</code>: Boolean indicating if there are more conversions to fetch
      * <code>'totalCount'</code>: Total number of conversions matching the query
    </ResponseField>

    <ResponseField name="_req" type="dict">
      Request metadata containing:

      * <code>'reqId'</code>: Unique request identifier.
      * <code>'resTime'</code>: Response time in milliseconds.
    </ResponseField>
  </Tab>

  <Tab title="PHP">
    ### Parameters

    <ParamField path="offset" type="int" default="0">
      The number of conversions to skip for pagination.
    </ParamField>

    <ParamField path="limit" type="int" default="50">
      The maximum number of conversions to return. Maximum value is 50.
    </ParamField>

    <ParamField path="select" type="array">
      Select specific data fields to return. If not specified, all data fields are returned. See <a href="/constants/select">SELECT Constants</a> for all available fields.
    </ParamField>

    <ParamField path="ipSearch" type="string">
      Filter conversions by IP address.
    </ParamField>

    ### Response

    <ResponseField name="success" type="bool">
      Whether the request was successful.
    </ResponseField>

    <ResponseField name="message" type="string">
      Response message describing the result.
    </ResponseField>

    <ResponseField name="code" type="int">
      HTTP status code.
    </ResponseField>

    <ResponseField name="data" type="array | null">
      The response data containing:

      * <code>'conversions'</code>: Array of conversion arrays (or partial arrays if <code>select</code> was used)
      * <code>'hasMore'</code>: Boolean indicating if there are more conversions to fetch
      * <code>'totalCount'</code>: Total number of conversions matching the query
    </ResponseField>

    <ResponseField name="_req" type="array">
      Request metadata containing:

      * <code>'reqId'</code>: Unique request identifier.
      * <code>'resTime'</code>: Response time in milliseconds.
    </ResponseField>
  </Tab>
</Tabs>

For all available <code>SELECT</code> constants and their values, see the <a href="/constants/select">SELECT Constants</a> reference.
