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

# Export Content

> Export your content translations as JSON, filtered by language, tags, and orders

Export all content translations for your account. You can filter by target language(s), tag(s), and order ID(s). Single-language exports return a flat key-value map; multi-language exports return a map grouped by language code.

<RequestExample>
  ```bash cURL (single language) theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/content/export?targetLanguage=tr" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```bash cURL (multiple languages, bracket syntax) theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/content/export?targetLanguages[]=tr&targetLanguages[]=en" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```bash cURL (multiple languages, repeated-key syntax) theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/content/export?targetLanguages=tr&targetLanguages=en" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```bash cURL (with tag and order filter) theme={null}
  curl -X GET "https://api-integration.ollang.com/integration/content/export?targetLanguage=tr&tags[]=ui&orderIds[]=60b8d6f1e1b9b1d8c6c0d8e1" \
    -H "X-Api-Key: <your-api-key>"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams();
  params.append("targetLanguages[]", "tr");
  params.append("targetLanguages[]", "en");
  params.append("tags[]", "ui");

  const response = await fetch(
    `https://api-integration.ollang.com/integration/content/export?${params}`,
    {
      method: "GET",
      headers: {
        "X-Api-Key": "<your-api-key>",
      },
    },
  );

  const data = await response.json();
  ```

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

  params = {
      "targetLanguages[]": ["tr", "en"],
      "tags[]": ["ui"],
  }

  response = requests.get(
      "https://api-integration.ollang.com/integration/content/export",
      params=params,
      headers={"X-Api-Key": "<your-api-key>"},
  )

  data = response.json()
  ```
</RequestExample>

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard

## Query Parameters

<ParamField query="targetLanguage" type="string">
  Filter by a single target language code (e.g., `tr`). Use `targetLanguages`
  for multi-language export. Do not send both `targetLanguage` and
  `targetLanguages` in the same request — pick one.
</ParamField>

<ParamField query="targetLanguages" type="string[]">
  Filter by one or more target language codes. When multiple languages are
  provided, the response is grouped by language. Two syntaxes are accepted
  and treated equivalently:

  * Bracket form: `?targetLanguages[]=tr&targetLanguages[]=en`
  * Repeated-key form: `?targetLanguages=tr&targetLanguages=en`

  A single value (`?targetLanguages=tr`) is also accepted and is coerced into
  a one-element array.
</ParamField>

<ParamField query="tag" type="string">
  Filter by a single tag.
</ParamField>

<ParamField query="tags" type="string[]">
  Filter by one or more tags. Returns content terms that have at least one of
  the specified tags. Accepts both `?tags[]=ui&tags[]=marketing` and
  `?tags=ui&tags=marketing`.
</ParamField>

<ParamField query="orderIds" type="string[]">
  Filter by one or more order IDs. Only content terms associated with the
  specified orders will be included. Accepts both `?orderIds[]=a&orderIds[]=b`
  and `?orderIds=a&orderIds=b`.
</ParamField>

## Response

The response format depends on how many languages are requested:

**Single language** — flat key-value map where keys are source texts and values are translations:

```json theme={null}
{
  "Good morning": "Günaydın",
  "Sign in": "Giriş Yap",
  "Dashboard": "Pano"
}
```

**Multiple languages** — map keyed by language code, each containing a flat key-value map:

```json theme={null}
{
  "tr": {
    "Good morning": "Günaydın",
    "Sign in": "Giriş Yap"
  },
  "en": {
    "Good morning": "Good morning",
    "Sign in": "Sign in"
  }
}
```

<ResponseExample>
  ```json 200 (single language) theme={null}
  {
    "Good morning": "Günaydın",
    "Sign in": "Giriş Yap",
    "Dashboard": "Pano",
    "Settings": "Ayarlar"
  }
  ```

  ```json 200 (multiple languages) theme={null}
  {
    "tr": {
      "Good morning": "Günaydın",
      "Sign in": "Giriş Yap"
    },
    "es": {
      "Good morning": "Buenos días",
      "Sign in": "Iniciar sesión"
    }
  }
  ```

  ```json 200 (empty - no matching content) theme={null}
  {}
  ```

  ```json 400 theme={null}
  {
    "statusCode": 400,
    "message": [
      "each value in targetLanguages must be a string"
    ],
    "error": "Bad Request"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Unauthorized",
    "message": "Invalid or missing API key",
    "code": "UNAUTHORIZED"
  }
  ```
</ResponseExample>
