Core concepts
Responses
The shape every answer shares: the meta block with cost and balance, list fields for paging, request ids for support, and how times and credits are written.
The Sprouts Data API answers in JSON, with a few exceptions (a CSV export, an event stream). Successful answers share a small set of fields, so code that reads cost, paging and request ids can be written once. Errors have their own shape, described in Errors.
The meta block#
Data answers (search, similar, record lookup, coverage, filter values, relationships, org chart, agent runs and enrichment) carry a meta object:
| Field | Type | What it holds |
|---|---|---|
request_id | string | This request's id. The same value is in the X-Request-Id header. |
as_of | string | When the answer was made, as an ISO 8601 timestamp in UTC. |
credential | string | What made the call: api_key for an API key (and for an MCP client signed in with OAuth), or session for the dashboard. |
credits_charged | number or null | What this request cost, in credits. 0 when nothing was charged (an empty answer, or a retry already paid for). null when the operation is not metered. |
credits_balance | number or null | What the workspace can spend after this request, in credits, excluding credits held for agent runs still in progress. null when not metered or not known just now. |
environment | string | Deprecated. Always live, since there are no test keys. It will be removed; do not rely on it. |
{
"meta": {
"request_id": "3f9c2a7e1b4d4c8e9a51d2e6f0b7c3a9",
"as_of": "2026-11-27T09:14:03.512000Z",
"credential": "api_key",
"credits_charged": 0.595,
"credits_balance": 1243.81,
"environment": "live"
}
}credits_balance is a convenience: when it is null, GET /v1/credits always has the balance. Balance and spend covers both.
List answers#
Answers that return many items share their paging fields:
| Field | What it holds |
|---|---|
results | The items on this page. A few routes call the array items instead (a list's saved items, the Tools API's lists). |
next_cursor | The cursor for the next page, or null on the last page. |
has_more | true exactly when next_cursor is set. Not every list answer carries it; next_cursor alone is always enough. |
total | How many items match in all, where the route counts them. On a search, total_is_estimate: true marks an estimate. |
Search-style routes (search, similar, relationships, org chart people) carry all four, plus meta. Lists of your own things (agent runs, enrichment jobs, usage history, feedback, credit transactions, saved list items) carry the items and next_cursor, and some also has_more and meta. Pagination explains how to follow the cursor on each kind.
A record lookup answers with the same envelope as a search, one entry in results per value you sent. has_more is always false there, because every value is answered on one page.
Request ids#
Every response, success or error, carries an X-Request-Id header. The same id is in meta.request_id on a data answer, and in request_id on an error. Log it alongside your own request logs: it is the fastest way for Sprouts Data support to find a call.
You can also choose the id yourself. Send an X-Request-Id header of 1 to 128 letters, digits or ._:-, and the API uses it and echoes it back. Any other value is replaced with a generated id. A value of your own makes it easy to match the API's logs with yours.
Times, numbers and credits#
- Timestamps are ISO 8601 strings in UTC.
- Credits are decimal numbers, such as
0.595. Read them as decimals, not integers. - Durations in headers, such as
Retry-Afterand the rate-limit reset, are whole seconds. - Unknown fields. A record's fields grow as the index grows, and new fields may be added to any answer. Ignore fields you do not recognize rather than failing on them.
Other content types#
| Answer | Content type | Where |
|---|---|---|
| A CSV file | text/csv | Exports small enough to make at once. Its cost is in the X-Credits-Charged header. |
| A stream of events | text/event-stream | GET /v1/agents/runs/{run_id}/events, an agent run's progress as it happens. |
| An error | application/problem+json | Every refusal. See Errors. |