Lists and exports
Exports
Download a saved list or chosen search rows as CSV, at once for small exports or through a background job for large ones.
This edition is written for AI agents: complete, explicit and ready to paste. Give it to your agent, or point the agent at its address and it reads the page itself.
# Exports
> Download a saved list or chosen search rows as CSV, at once for small exports or through a background job for large ones.
- Human-readable page: https://dashboard.sproutsdata.ai/docs/api-reference/exports
- This document: https://dashboard.sproutsdata.ai/docs/agents/api-reference/exports
- Index of every agent document: https://dashboard.sproutsdata.ai/llms.txt
- API base URL: https://api.sproutsdata.ai
## Summary
Export a saved list (`POST /v1/lists/{list_id}/export`) or chosen search rows (`POST /v1/search/export`) as CSV. Up to 1,000 rows: the CSV in the answer (200). 1,001 to 50,000 rows: a job (202) to poll with `GET /v1/exports/{job_id}`, then download with `GET /v1/exports/{job_id}/file`.
## Rules
- Scopes: list export needs `dsp.lists.read`; search export needs `dsp.search.read` or `dsp.entities.read`; reading a job or its file needs any one of `dsp.search.read`, `dsp.entities.read`, `dsp.lists.read`.
- Search export body: `items` (1 to 50,000 `{category, id}`), written in the order sent; optional `request_id`.
- List export body (optional): `offset` (default 0) and `limit`; omitted, the whole list, newest first.
- More than 50,000 rows: 422 `export.too_large`.
- 200 answers are `text/csv; charset=utf-8` with headers `X-Export-Row-Count`, `X-Export-Skipped`, `X-Export-Field-Tier` (`full` or `free`) and `X-Credits-Charged`.
- 202 answers are a job: `job_id`, `status` (`queued`, `running`, `done`, `failed`), `rows`, `skipped`, `error`, `created_at`, `finished_at`, `expires_at`, `file_url` (set once `done`).
- Poll `GET /v1/exports/{job_id}` until `done` or `failed`, then `GET` the `file_url` (`/v1/exports/{job_id}/file`). The file before `done`, or after it expired: 404 `export.not_found`.
- A finished file is kept 24 hours (`expires_at`).
- Do-Not-Contact records are removed; spreadsheet formula injection is neutralized.
### Conditional billing
- Whole records (`full`) only for a workspace that has bought credits, calling with a credential that holds `dsp.entities.read`; otherwise `free` (search-row fields) and no charge.
- With `full`: the lookup price (1 credit by default) per record not unlocked by the workspace in the last 90 days, all or nothing; 402 `credits.insufficient` if the balance cannot pay.
- CSV at once: charged before the CSV is returned; `X-Credits-Charged` says how much. Job: the balance is checked at start, the charge is made when the file is ready. Downloading is free.
## Operations
### POST /v1/search/export
Export Search
- URL: `POST https://api.sproutsdata.ai/v1/search/export`
- Scopes (any one): `dsp.entities.read`, `dsp.search.read`
- Cost: free, except records shown whole that the workspace hasn't unlocked in the last 90 days (1 credit each)
Search rows the client picked, read again and written in the order sent.
Request body (JSON, required):
- `items` (array of object, required): Limits: 1 to 50000 items.
- `category` (string, required): What a returned row is. The same names as ``SearchCategory``. One of: `"company"`, `"person"`, `"patent"`, `"academic_report"`, `"news_article"`, `"market_report"`, `"trend"`, `"funding_round"`, `"job_opening"`.
- `id` (string, required): A company's `company_ref`, domain or LinkedIn page; a person's LinkedIn profile URL; a document's `id` from search. Limits: 1 to 255 characters.
- `request_id` (string or null): Limits: at most 128 characters.
Response 200 (application/json): The CSV, when small enough to make at once.
Errors:
- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 429: Too many requests for this key or workspace (`quota.burst_exceeded`). See `Retry-After`.
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
Example request:
```bash
curl -X POST "https://api.sproutsdata.ai/v1/search/export" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-o export.csv \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"category": "company",
"id": "stripe.com"
},
{
"category": "company",
"id": "adyen.com"
}
]
}'
```
### POST /v1/lists/{list_id}/export
Export List
- URL: `POST https://api.sproutsdata.ai/v1/lists/{list_id}/export`
- Scopes (any one): `dsp.lists.read`
- Cost: free, except records shown whole that the workspace hasn't unlocked in the last 90 days (1 credit each)
The list as it is now, newest first (``offset`` / ``limit`` for a range).
Path parameters:
- `list_id` (string, required): Limits: 1 to 64 characters.
Response 200 (application/json): The CSV, when small enough to make at once.
Errors:
- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 422: The request is invalid (`request.invalid`), or its cursor is (`pagination.*`).
- 429: Too many requests for this key or workspace (`quota.burst_exceeded`). See `Retry-After`.
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
Example request:
```bash
curl -X POST "https://api.sproutsdata.ai/v1/lists/0614e3fd-5c2b-4c8e-9a51-7a3d2e1b9f40/export" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-o export.csv \
-H "Content-Type: application/json" \
-d '{
"limit": 1000
}'
```
### GET /v1/exports/{job_id}
Get Job
- URL: `GET https://api.sproutsdata.ai/v1/exports/{job_id}`
- Scopes (any one): `dsp.entities.read`, `dsp.lists.read`, `dsp.search.read`
- Cost: free
Path parameters:
- `job_id` (string, required): Limits: 1 to 64 characters.
Response 200 (application/json): Successful Response
Response fields:
- `created_at` (string (date-time), required)
- `job_id` (string, required)
- `status` (string, required): One of: `"queued"`, `"running"`, `"done"`, `"failed"`.
- `error` (string or null)
- `expires_at` (string (date-time) or null)
- `file_url` (string or null)
- `finished_at` (string (date-time) or null)
- `rows` (integer or null)
- `skipped` (integer or null)
Errors:
- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 422: Validation Error
- 429: Too many requests for this key or workspace (`quota.burst_exceeded`). See `Retry-After`.
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
Example request:
```bash
curl "https://api.sproutsdata.ai/v1/exports/c7a2e9d4-1b3f-4a6e-8d5c-9e0f1a2b3c4d" \
-H "X-API-Key: $SPROUTS_API_KEY"
```
### GET /v1/exports/{job_id}/file
Download
- URL: `GET https://api.sproutsdata.ai/v1/exports/{job_id}/file`
- Scopes (any one): `dsp.entities.read`, `dsp.lists.read`, `dsp.search.read`
- Cost: free
Path parameters:
- `job_id` (string, required): Limits: 1 to 64 characters.
Response 200 (application/json): The CSV, when small enough to make at once.
Errors:
- 401: No credential, or one that does not verify (`auth.unauthorized`).
- 403: The credential lacks the scope this route needs (`auth.insufficient_scope`), or the signed-in user has not chosen a workspace (`auth.workspace_required`).
- 404: No such resource for this workspace (`*.not_found`), or no such route (`route.not_found`).
- 422: Validation Error
- 429: Too many requests for this key or workspace (`quota.burst_exceeded`). See `Retry-After`.
- 503: A service this request needs is unavailable, or the API is at capacity. See `Retry-After`.
Example request:
```bash
curl "https://api.sproutsdata.ai/v1/exports/c7a2e9d4-1b3f-4a6e-8d5c-9e0f1a2b3c4d/file" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-o export.csv
```
## See also
- https://dashboard.sproutsdata.ai/docs/agents/guides/lists-and-exports
- https://dashboard.sproutsdata.ai/docs/agents/api-reference/lists