> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Custom Records

> Records of a custom emission factor database version

[← Custom Emission Factors](/api-reference/custom-emission-factors/overview)

The records of a version, sorted by name by default, with search and offset paging.

<Warning>
  **Beta.** Part of the custom emission factors API, currently in beta. The contract may still change before general
  availability.
</Warning>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET "https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/records?search=packaging&limit=50" \
    -H "x-api-key: ${DCYCLE_API_KEY}" \
    -H "x-organization-id: ${DCYCLE_ORG_ID}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os

  import requests

  response = requests.get(
      "https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/records?search=packaging&limit=50",
      headers={
          "x-api-key": os.environ["DCYCLE_API_KEY"],
          "x-organization-id": os.environ["DCYCLE_ORG_ID"],
      },
      timeout=30,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const response = await axios.get('https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions/7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d/records?search=packaging&limit=50', {
    headers: {
      'x-api-key': process.env.DCYCLE_API_KEY,
      'x-organization-id': process.env.DCYCLE_ORG_ID,
    },
  });
  console.log(response.status, response.data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "items": [
      {
        "id": "c3d4e5f6-a7b8-9012-cdef-ab3456789012",
        "name": "Mixed packaging - Ecoveza plant",
        "unit_id": "61743a63-ff70-459c-9567-5eee8f7dfd5c",
        "source_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
        "tag": "simple",
        "additional_docs": null,
        "evidence": [],
        "uncertainty_grade": "0",
        "is_biogenic": false,
        "renewable_percentage": null,
        "enabled": true,
        "activity_categories": [
          "wastes"
        ],
        "factors": [
          {
            "id": "1e2d3c4b-5a69-4788-9a0b-1c2d3e4f5a6b",
            "source_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
            "concept_id": "2f3e4d5c-6b7a-4899-8a0b-2c3d4e5f6a7b",
            "from_unit_id": "61743a63-ff70-459c-9567-5eee8f7dfd5c",
            "to_unit_id": "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e",
            "formula": "x * 0.21",
            "start_date": "1970-01-01",
            "end_date": null,
            "gas_type": "co2e"
          }
        ]
      }
    ],
    "total": 1,
    "offset": 0,
    "limit": 50
  }
  ```
</ResponseExample>

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

<ParamField path="database_id" type="uuid" required>
  The database id.

  **Example:** `5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b`
</ParamField>

<ParamField path="source_id" type="uuid" required>
  The version id (`id` of the version).

  **Example:** `7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d`
</ParamField>

<ParamField query="search" type="string">
  Records whose name contains this text, ignoring case and accents.

  **Example:** `packaging`
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Records to skip.
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Records to return, between 1 and 200.
</ParamField>

<ParamField query="sort_by" type="string">
  **Available values:** `name`, `category`, `unit_id`, `co2e`, `co2`, `ch4`, `n2o`, `has_attachments`.
</ParamField>

<ParamField query="sort_order" type="string" default="asc">
  **Available values:** `asc`, `desc`.
</ParamField>

## Response

<ResponseField name="items" type="array[object]">The records, with the fields of [Get Record](/api-reference/custom-emission-factors/get-record).</ResponseField>
<ResponseField name="total" type="integer">Records matching the filters.</ResponseField>
<ResponseField name="offset" type="integer">The `offset` applied.</ResponseField>
<ResponseField name="limit" type="integer">The `limit` applied.</ResponseField>

## Common Errors

### 401 Unauthorized

Missing or invalid API key.

### 403 Forbidden

`LOGGED_USER_NOT_MEMBER`: the API key's user is not a member of the organization in `x-organization-id`.

### 404 Not Found

`CUSTOM_DATABASE_NOT_FOUND` or `CUSTOM_VERSION_NOT_FOUND`: not visible to your organization.

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Get Record" icon="magnifying-glass" href="/api-reference/custom-emission-factors/get-record">
    One record by id
  </Card>

  <Card title="Create Record" icon="plus" href="/api-reference/custom-emission-factors/create-record">
    A new emission factor
  </Card>
</CardGroup>
