<!-- Agent Datasets docs · REST quickstart · canonical: https://www.agentdatasets.com/docs/rest-quickstart · rendered from https://www.agentdatasets.com -->

# REST quickstart

The REST API is a thin HTTP twin of the MCP tool surface: same service layer underneath, same envelope on top. Use it for the parts of a system that are not agents — a scheduled job, a dashboard, a language without an MCP client.

## One call

Every request carries the `X-API-KEY` header from the [dashboard](/dashboard/keys), and every path hangs off the same base URL. Here is a complete first call, taken straight from the published specification:

## What comes back

The body is the same three-part envelope the MCP tools return: `data` for the answer, `meta` for provenance that holds across the whole result, `pagination` for cursor state. A tool that returns a single object rather than a list sends `pagination` as `null`.

Two habits will save you: parse the numeric strings with a decimal type rather than a float, and read `unit`, `currency`, and `as_of` off the values instead of assuming them. Both are contract-wide, and both are spelled out in [Errors and the envelope](/docs/errors).

## Paging

Results are bounded. When more rows matched than the page returned, `pagination.has_more` is `true` and `pagination.next_cursor` holds an opaque token; pass it back as the `cursor` query parameter with **every other parameter unchanged** to get the next page. Stop when `has_more` is `false`.

Cursors are positions in a total order, not row ids, so a restatement between calls cannot make a page silently skip rows. A malformed or wrong-shaped cursor is rejected as `bad_parameter` rather than quietly returning nothing.

## When something goes wrong

Failures come back as `{"error": {...}}` with a stable machine `code`, and the same code arrives on the MCP side inside the tool error. Branch on the code, never on the message text — the [error reference](/docs/errors) lists every one with its HTTP status.

## Every endpoint

The full generated reference lives at [REST reference](/docs/rest): base URL, authentication, and each category's endpoints with their parameters and response schemas. The specification it is built from is the same document the API itself serves, so the reference cannot drift from the running service.

Advertised categories today:
