# Activating exports (/en/activation)

<Callout title="For managed customers">
This page is for projects that DeepScout manages. Self-service projects always have exports. See [Download exports](/en/api/exports.md).
</Callout>

## Activation [#activation]

Exports are enabled in the app under [Settings → Exports](https://reports.deepscout.cz/nastaveni). Simply click **Enable exports** and select the format (JSON or XML). After activation, all default datasets are generated automatically — this may take about 15 minutes.

{/* TODO: add screenshots from Reports UI */}

## API key [#api-key]

To access exports you need an API key, which you can find under [Settings → API](https://reports.deepscout.cz/nastaveni).

## Accessing data [#accessing-data]

After activation, data is available at the address below. Send the API key in the `Authorization` header. The response redirects to a temporary file URL, so use `-L` with `curl`.

```
GET https://api.deepscout.ai/v1/exports/{dataset}
Authorization: Bearer YOUR_API_KEY
```

```bash
curl -L https://api.deepscout.ai/v1/exports/all_products_with_details \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o all_products_with_details.jsonl.gz
```

The older `?token=YOUR_API_KEY` parameter still works, but it is deprecated.

## Data updates [#data-updates]

We update the exports after each data processing, usually every 8 hours. The API always returns the last file.

## Errors [#errors]

| Status | Meaning |
|---|---|
| `401` | The API key is not valid. |
| `403` | Exports are not enabled, or the project is stopped. |
| `404` | The dataset is not enabled in the project, or the file is not ready yet. |
| `503` | Maintenance. Try again later. |

## Formats [#formats]

| Format | Description |
|---|---|
| **JSON** | JSONL — one JSON object per line. Default format. |
| **XML** | XML feed. |
