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

# Exports

> Export every store that matches your filters to one CSV file and download it from a short-lived link.

Pull a whole filtered market in one file. Send the filters you use with `POST /v1/stores/search`, and Shoplist writes every matching store to a CSV file inside a ZIP archive. Poll the export, then download the file from a signed link. Use a team API key or partner OAuth token with the `exports:write` scope. An export belongs to the person who created the API key or approved the OAuth connection.

## Start an export

Use `POST /v1/exports` with an `Idempotency-Key` and the most credits the export may spend in `max_credits`. `filters` takes the store search filters; send `{}` to export every open store. `include` picks the store groups whose columns the file holds, and `max_rows` caps the row count below your plan limit.

```bash curl theme={null}
curl -sS -i \
  -H "Authorization: Bearer ${SHOPLIST_API_KEY}" \
  -H "Idempotency-Key: us-apps-2026-12-01" \
  --json '{"filters":{"countries":["US"]},"include":["location","apps"],"max_rows":1000,"max_credits":1000}' \
  https://api.shoplist.co/v1/exports
```

The API answers `202` with the export while a background job writes the file.

```json POST /v1/exports 202 theme={null}
{
    "data": {
        "object": "export",
        "id": "5f0c6a8e-3b7d-5c41-9a2e-6d1b8f4c2a90",
        "status": "queued",
        "format": "csv_zip",
        "estimated_rows": 1240,
        "row_limit": 1000,
        "rows_written": null,
        "credits": { "reserved": 1000, "charged": null, "refunded": 0 },
        "created_at": "2026-12-01T12:00:00.000Z",
        "finished_at": null,
        "download": null,
        "failure": null
    }
}
```

## Check the export

Poll `GET /v1/exports/{id}` every few seconds until `status` is `completed` or `failed`.

```bash curl theme={null}
curl -sS -i \
  -H "Authorization: Bearer ${SHOPLIST_API_KEY}" \
  https://api.shoplist.co/v1/exports/5f0c6a8e-3b7d-5c41-9a2e-6d1b8f4c2a90
```

| Status | Meaning |
| - | - |
| `queued` | Shoplist accepted the export and reserved its credits. |
| `running` | The job is writing the file. |
| `completed` | The file is ready. `download` holds the link and `rows_written` the count. |
| `failed` | The export stopped. `failure.code` says why, and unused credits return. |

An export that takes longer than usual to finish carries `"delayed": true`. Keep polling; it still completes or fails.

```json GET /v1/exports/5f0c6a8e-3b7d-5c41-9a2e-6d1b8f4c2a90 200 theme={null}
{
    "data": {
        "object": "export",
        "id": "5f0c6a8e-3b7d-5c41-9a2e-6d1b8f4c2a90",
        "status": "completed",
        "format": "csv_zip",
        "estimated_rows": 1240,
        "row_limit": 1000,
        "rows_written": 1000,
        "credits": { "reserved": 1000, "charged": 1000, "refunded": 0 },
        "created_at": "2026-12-01T12:00:00.000Z",
        "finished_at": "2026-12-01T12:01:30.000Z",
        "download": {
            "url": "https://downloads.shoplist.example/exports/export.zip?signature=example",
            "expires_at": "2026-12-01T12:20:00.000Z"
        },
        "failure": null
    }
}
```

## Download the file

Fetch `data.download.url` with any HTTP client, for example `curl -sS -o stores.zip "<download url>"`, and send no `Authorization` header with it. The link lasts 15 minutes. Each `GET /v1/exports/{id}` returns a fresh link, so request the export again when a link expires. On a completed export the link can be null for a moment or when the file is unavailable; poll again.

The ZIP holds one CSV file. Rows follow store ID order, the same order as `POST /v1/stores/search` with `"sort": "id"`. The job reads stores when it runs, so the file reflects the data at that time and can hold fewer rows than `estimated_rows`. The file starts with the identity columns, then adds the columns of each group in `include`, in the order of the CSV columns table below. List cells join their values with `|`. Each app in `apps.items` is a JSON object.

## Credits

An export costs one credit per row written, with a minimum of 10 credits. An export that writes no rows costs nothing. When you start an export, Shoplist reserves credits for the estimated rows up to `row_limit`. When the export finishes, Shoplist charges for the rows written and refunds the rest of the reservation. Your plan sets the most rows one export can write. Exports are paid in credits and do not count toward the [unique-store allowance](/docs/usage.md).

## Retries

An `Idempotency-Key` belongs to your team, as on every `/v1` endpoint. Sending the same idempotency key and body again with any authorized team API key or OAuth token returns the same export, with no second charge or job. The same key with a different body returns `422 idempotency_key_reused`. When the export service is busy, the API answers `503 service_unavailable` with `Retry-After`; retry the same request with the same key. A `402 insufficient_credits` answer is final for its key: after adding credits, send the request with a new `Idempotency-Key`.

| Code | Status | Meaning |
| - | - | - |
| `empty_selection` | 422 | No stores match the filters. Nothing was charged. |
| `spending_cap_exceeded` | 402 | The estimate needs more credits than `max_credits`. `detail` names the count. |
| `insufficient_credits` | 402 | Too few credits. Add credits, then use a new `Idempotency-Key`. |
| `plan_required` | 402 | Your plan does not include exports. |
| `key_owner_unavailable` | 403 | The key creator or connection approver is unavailable on the team. |
| `not_found` | 404 | No export of your team has this ID. |

## Export object

| Field | Description |
| - | - |
| `object` | The resource type. |
| `id` | The export identifier. Shoplist derives it from your team and the Idempotency-Key that created the export. |
| `status` | The export state: queued, running, completed, or failed. |
| `format` | The file format: a ZIP archive that holds one CSV file of stores. |
| `estimated_rows` | The number of stores that matched the filters when the export was created. |
| `row_limit` | The most rows this export writes: max\_rows or the plan limit, whichever is lower. |
| `rows_written` | The number of store rows in the file, or null until the export completes. |
| `credits` | The credits this export reserved, charged, and refunded. |
| `credits.reserved` | The credits reserved when the export was created. |
| `credits.charged` | The credits charged for the rows written, or null until the export completes or fails. |
| `credits.refunded` | The reserved credits returned to the team. |
| `created_at` | The UTC time when the export was created. |
| `finished_at` | The UTC time when the export completed or failed, or null until then. |
| `download` | The download link of a completed export, or null otherwise. Each request returns a fresh link. On a completed export it can be null for a moment or while the file is unavailable; request the export again. |
| `download.url` | The signed HTTPS link to the ZIP file. |
| `download.expires_at` | The UTC time when the link stops working. |
| `failure` | Why a failed export failed, or null otherwise. |
| `failure.code` | The machine-readable reason the export failed. |
| `delayed` | Present and true when the export is taking longer than usual to finish. |

## CSV columns

| Group | Columns |
| - | - |
| `identity` | `object`, `id`, `domain`, `name`, `status`, `url`, `other_domains`, `myshopify_domain`, `shopify_shop_id`, `description`, `logo_url`, `category`, `subcategory`, `first_recorded_at`, `last_checked_at` |
| `location` | `location.country`, `location.state`, `location.city`, `location.currency`, `location.ships_to_countries` |
| `company` | `company.employees.count`, `company.employees.min`, `company.employees.max`, `company.employees.label`, `company.estimated_annual_revenue.label`, `company.estimated_annual_revenue.min_usd`, `company.estimated_annual_revenue.max_usd`, `company.founded_year`, `company.address`, `company.description`, `company.linkedin_followers`, `company.built_by_agency`, `company.funding.total_usd`, `company.funding.latest_round`, `company.funding.latest_amount_usd`, `company.funding.latest_on` |
| `traffic` | `traffic.score`, `traffic.rank_tier`, `traffic.rank_tier_year_ago`, `traffic.rank_trend`, `traffic.rank_month`, `traffic.ranked_market_countries`, `traffic.mobile_visit_share` |
| `apps` | `apps.total`, `apps.returned`, `apps.truncated`, `apps.items` |
| `contact_channels` | `contact_channels.primary_email`, `contact_channels.emails`, `contact_channels.primary_phone`, `contact_channels.phones`, `contact_channels.checked_at` |
| `social` | `social.instagram_url`, `social.instagram_followers`, `social.facebook_url`, `social.tiktok_url`, `social.x_url`, `social.youtube_url`, `social.pinterest_url`, `social.linkedin_url` |
| `storefront` | `storefront.shopify_plus`, `storefront.storefront_type`, `storefront.theme.name`, `storefront.theme.version`, `storefront.theme.is_paid`, `storefront.payment_methods`, `storefront.accepted_cards`, `storefront.shop_pay_installments`, `storefront.checkout_apps`, `storefront.product_count`, `storefront.collection_count`, `storefront.core_web_vitals.status`, `storefront.core_web_vitals.lcp_ms`, `storefront.core_web_vitals.inp_ms`, `storefront.core_web_vitals.cls` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.