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

# Export Data

Data in Literal AI can be exported at any time, as the data is always yours. Exporting data can be useful to train or fine-tune LLM models on production threads. You can export the data via the SDKs. There is also an export button on Literal AI, which shows you how to export the data via the SDKs.

Here's an example of how to export all Threads:

<CodeGroup>
  ```python Python theme={null}
  import os
  from literalai import LiteralClient

  client = LiteralClient(api_key=os.getenv("LITERAL_API_KEY"))

  has_next_page = True
  after = None

  filters = [
      {
          "field": "createdAt",
          "operator": "gte",
          "value": "2024-04-30T13:24:38.994Z"
      }
  ]

  order_by = {
      "column": "createdAt",
      "direction": "DESC"
  }

  threads = []
  while has_next_page:
      response = client.api.get_threads(
          filters=filters,
          order_by=order_by,
          after=after
      )
      threads.extend(response.data)
      has_next_page = response.page_info.has_next_page
      after = response.page_info.end_cursor

  ```

  ```typescript TypeScript theme={null}
  import { LiteralClient } from '@literalai/client';

  const client = new LiteralClient({apiKey: process.env["LITERAL_API_KEY"]});

  let hasNextPage = true;
  let after = null;

  while (hasNextPage) {
    const response = await client.api.getThreads({
      first: 20,
      after,
      filters: [
    {
      "field": "createdAt",
      "operator": "gte",
      "value": "2024-04-30T13:24:38.994Z"
    }
  ],
      orderBy: {
    "column": "createdAt",
    "direction": "DESC"
  }
    });

    console.log(response);
    hasNextPage = response.pageInfo.hasNextPage;
    after = response.pageInfo.endCursor;
  }
  ```
</CodeGroup>

### Exporting OpenTelemetry Data

For paying customers, Literal AI offers the ability to export data in the OpenTelemetry format, providing a standardized way to collect and analyze telemetry data from your LLM applications.
