Guides
Lists and exports
Save companies, people and documents to lists your whole workspace shares, read them back as current records, and export lists or search rows as CSV files.
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.
# Lists and exports
> Save companies, people and documents to lists your whole workspace shares, read them back as current records, and export lists or search rows as CSV files.
- Human-readable page: https://dashboard.sproutsdata.ai/docs/guides/lists-and-exports
- This document: https://dashboard.sproutsdata.ai/docs/agents/guides/lists-and-exports
- Index of every agent document: https://dashboard.sproutsdata.ai/llms.txt
- API base URL: https://api.sproutsdata.ai
## Summary
Saved lists hold records (companies, people or one document category) shared by the whole workspace: every member and API key sees and edits the same lists. Exports write a list, or search rows you pick, as CSV: at once up to 1,000 rows, else as a job to poll and download.
## Rules
- Scopes: `GET /v1/lists` and `GET /v1/lists/{list_id}/items` need `dsp.lists.read`. Create, rename, delete, add and remove need `dsp.lists.write`. `POST /v1/lists/{list_id}/export` needs `dsp.lists.read`. `POST /v1/search/export` needs `dsp.search.read` or `dsp.entities.read`. `GET /v1/exports/{job_id}` and `/file` need any of `dsp.search.read`, `dsp.entities.read`, `dsp.lists.read`.
- `GET /v1/lists`: one page of the standard envelope. Returns `results[]` (`id`, `name`, `category`, `created_by`, `created_at`, `updated_at`, `item_count`), `total`, `has_more` (false), `next_cursor` (null), `meta`, `saved_items` (distinct records across all lists), `saved_items_cap` (null = no cap), `field_tier`.
- `POST /v1/lists` → 201: body `name` (1 to 120 chars, trimmed, required), `category` (optional; one of `company`, `person`, `patent`, `academic_report`, `news_article`, `market_report`, `trend`, `funding_round`, `job_opening`; omitted = set by the first records added). Names are unique per workspace ignoring case: 409 `lists.name_taken`.
- `PATCH /v1/lists/{list_id}` body `{"name": "..."}`. `DELETE /v1/lists/{list_id}` → 204; its items are removed.
- `POST /v1/lists/{list_id}/items` body `{"items": [{"category": "...", "id": "..."}]}`, 1 to 1,000 items. `id` (max 255): company = `company_ref`, domain or LinkedIn page; person = LinkedIn profile URL; document = search `id`. Records are resolved and stored by stable id (duplicates collapse). Answer: `saved_list`, `added`, `already_present`, `suppressed` (Do-Not-Contact, refused), `not_found`, `credits_charged`. An `id` that names nothing parseable: 422 `request.invalid`.
- `DELETE /v1/lists/{list_id}/items` same body; answer `saved_list`, `removed`.
- `GET /v1/lists/{list_id}/items?limit=&cursor=`: newest first; `limit` 1 to 100, default 25; `cursor` max 64 chars from `next_cursor` (null = last page). Records are read again (current). The standard envelope: `results[]`, `total` (records in the list), `has_more`, `next_cursor`, `meta` (`meta.credits_charged`: what the page cost), plus `saved_list` and `field_tier`. Item: `category`, `id`, `added_at`, `added_by`, `available`, `unavailable_reason` (`not_found` | `retrieval_unavailable`), `record`.
- `field_tier`: `unlocked` (whole records) only when the workspace has bought credits AND the credential holds `dsp.entities.read`; otherwise `free` (search-row fields, never charged).
- Reveal charge (operations marked conditional): with `field_tier: unlocked`, each record shown whole that the workspace has not unlocked in the last 90 days costs the record lookup price (default 1 credit); it then stays unlocked 90 days. Applies to adding items, reading items and exports. All or nothing: 402 `credits.insufficient` before anything is added, shown or exported.
- Limits (defaults): 1,000 lists per workspace (409 `lists.item_cap_reached`); 50,000 records per list (409 `lists.item_cap_reached`); 1,000 items per add/remove request (422); a workspace that has not bought credits may have a saved-items cap across all lists (`saved_items_cap`; 409 `lists.item_cap_reached`). Mixed or wrong record kind for the list: 422 `lists.category_mismatch`. Unknown list: 404 `lists.not_found`.
- `POST /v1/lists/{list_id}/export`: optional body `{"offset": 0, "limit": N}` (offset ≥ 0, limit ≥ 1); omitted = whole list, newest first. Pinned to the list as it was when requested.
- `POST /v1/search/export`: body `{"items": [ItemRef, ...]}` (1 to 50,000); rows re-read and written in the order sent.
- Up to 1,000 rows: 200 `text/csv; charset=utf-8` with `Content-Disposition` attachment and headers `X-Export-Row-Count`, `X-Export-Skipped` (not found or Do-Not-Contact), `X-Export-Field-Tier` (`free` | `unlocked`), `X-Credits-Charged` (credits).
- Over 1,000 rows: 202 JSON export job `{job_id, status, rows, skipped, error, created_at, finished_at, expires_at, file_url}`; `status` `queued` | `running` | `done` | `failed`. Poll `GET /v1/exports/{job_id}`; when `done`, download `GET /v1/exports/{job_id}/file` (`file_url`). File kept 24 hours (`expires_at`); after that or for an unknown id: 404 `export.not_found`. Downloading before `done`: 404 `export.not_found`.
- Over 50,000 rows: 422 `export.too_large`; use `offset`/`limit` ranges.
- Export job billing: balance checked when requested (402), charged when the file is ready; if the balance can no longer cover it then, the job fails and nothing is charged. The download carries no `X-Credits-Charged`.
- Do-Not-Contact records are never added (counted in `suppressed`) and never exported (counted in skipped). CSV cells that would be read as formulas are neutralized.
## Steps
1. `POST /v1/lists` with `{"name": "Target accounts", "category": "company"}`; keep `id`.
2. `POST /v1/lists/{id}/items` with the records.
3. `GET /v1/lists/{id}/items` to read them, or `POST /v1/lists/{id}/export`.
4. On export: if the response is `text/csv`, save it; if 202, poll `GET /v1/exports/{job_id}` until `done`, then GET `file_url`.
## Examples
```json
{
"items": [
{ "category": "company", "id": "stripe.com" },
{ "category": "company", "id": "adyen.com" }
]
}
```
## Operations
### GET /v1/lists
All Lists
- URL: `GET https://api.sproutsdata.ai/v1/lists`
- Scopes (any one): `dsp.lists.read`
- Cost: free
Response 200 (application/json): Successful Response
Response fields:
- `field_tier` (string, required): One of: `"free"`, `"unlocked"`.
- `meta` (object, required)
- `as_of` (string (date-time), required)
- `request_id` (string, required)
- `credential` (string): One of: `"api_key"`, `"session"`. Default `"api_key"`.
- `credits_balance` (number or null): What the workspace has available after this request, in credits (credits held for running agent runs excluded). `null` when not metered or not known just now; `GET /v1/credits` always has it.
- `credits_charged` (number or null): What this request cost, in credits. `null` when not metered.
- `environment` (string): Deprecated: always `live` (there are no test keys). Will be removed. One of: `"live"`. Default `"live"`.
- `results` (array of object, required)
- `category` (string or null, required)
- `created_at` (string (date-time), required)
- `created_by` (string or null, required)
- `id` (string, required)
- `item_count` (integer, required)
- `name` (string, required)
- `updated_at` (string (date-time), required)
- `saved_items` (integer, required): Distinct records saved across this workspace's lists.
- `saved_items_cap` (integer or null, required): This workspace's cap; null: none.
- `total` (integer, required): Lists in the workspace. Limits: at least 0.
- `has_more` (boolean): Default `false`.
- `next_cursor` (string 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`).
- 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/lists" \
-H "X-API-Key: $SPROUTS_API_KEY"
```
### POST /v1/lists
Create
- URL: `POST https://api.sproutsdata.ai/v1/lists`
- Scopes (any one): `dsp.lists.write`
- Cost: free
Request body (JSON, required):
- `name` (string, required): Limits: 1 to 120 characters.
- `category` (string or null): The one kind of record the list holds; omitted, the first records set it. One of: `"company"`, `"person"`, `"patent"`, `"academic_report"`, `"news_article"`, `"market_report"`, `"trend"`, `"funding_round"`, `"job_opening"`.
Response 201 (application/json): Successful Response
Response fields:
- `category` (string or null, required)
- `created_at` (string (date-time), required)
- `created_by` (string or null, required)
- `id` (string, required)
- `item_count` (integer, required)
- `name` (string, required)
- `updated_at` (string (date-time), required)
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`).
- 409: Conflicts with what is there: a list name in use, a size limit reached (`lists.*`), or an `Idempotency-Key` already used today for a different request (`idempotency.conflict`).
- 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" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Target accounts",
"category": "company"
}'
```
### 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"
}
]
}'
```
The routes with a path parameter (rename, delete, add, remove and read items, list export, export job and file) are specified in full at https://dashboard.sproutsdata.ai/docs/agents/api-reference/lists and https://dashboard.sproutsdata.ai/docs/agents/api-reference/exports
## Errors to handle
- 402 `credits.insufficient`: reveal charge not covered; nothing added, shown or exported.
- 404 `lists.not_found`, `export.not_found`.
- 409 `lists.name_taken`, `lists.item_cap_reached`.
- 422 `lists.category_mismatch`, `export.too_large`, `request.invalid`.
- 429 `quota.burst_exceeded`: rate limit; wait `Retry-After`.
## See also
- https://dashboard.sproutsdata.ai/docs/agents/api-reference/lists
- https://dashboard.sproutsdata.ai/docs/agents/api-reference/exports
- https://dashboard.sproutsdata.ai/docs/agents/guides/record-lookup
- https://dashboard.sproutsdata.ai/docs/agents/guides/credits