From key to first query.
Five steps: create a scoped key, list datasets, read a schema, query records, connect an agent. API and MCP access is live: sign up at app.data.co and follow the steps below with your own key.
The flow
- 1
Create a key
In app.data.co › Marketplace › API Keys, create a key with the scopes you need — for example datasets:read, datasets:query and legal:read. The raw key, dc_live_<prefix>_<secret>, is shown once. Store it in your secret manager.
- 2
List datasets
GET /v1/datasets returns catalog metadata, each dataset's pricing tier, whether your plan is entitled to it, and the status of every access channel: rest, mcp, download and web.
- 3
Read the schema
GET /v1/datasets/{id}/schema lists every field with its type, nullability and a derived flag, so you can tell source fields from AI enrichment before you write a parser.
- 4
Query records
GET /v1/datasets/{id}/records, or POST /v1/datasets/{id}/query with a JSON body, with filters and cursor pagination. Every record carries provenance.
- 5
Connect an agent
Point an MCP client at https://api.data.co/mcp with the same key. The key also needs the mcp:invoke scope.
The first calls
No SDK required. Any HTTP client works. The base URL is https://api.data.co/v1, and every response uses the same envelope: data, meta and error.
export DATACO_API_KEY="dc_live_<prefix>_<secret>"
curl "https://api.data.co/v1/datasets?category=legal&access=rest" \
-H "Authorization: Bearer $DATACO_API_KEY"Illustrative example · final API surface documented in /docs
What comes back
A list response, abbreviated. Paging and the request id live under meta. LAW.co records are live, so meta.demo is false. Synthetic demo fixtures, like the previews on this site, set meta.demo to true and the X-Dataco-Demo header, flag every record demo, and are never charged.
{
"data": [
{
"id": "lawco:case:<id>",
"dataset": "lawco-court-opinions",
"title": "<case name>",
"citations": ["<reporter citation>"],
"court": "<court>",
"date": "<YYYY-MM-DD>",
"snippet": "…",
"provenance": { "provider": "lawco", "licenseId": "public-domain", "isDerived": false, "retrievedAt": "<ISO datetime>" },
"demo": false
}
],
"meta": {
"request_id": "req_…",
"api_version": "v1",
"demo": false,
"next_cursor": "…",
"total": null,
"warnings": ["Upstream keyword search is sampled (≤50 results)."]
},
"error": null
}Illustrative example · final API surface documented in /docs
Things to know
- LAW.co opinions, summaries and citation graph are live over REST and MCP; statute reference values are not yet populated
- Responses carry provenance per record
- AI enrichment is a separate block, flagged isDerived
- Cursor pagination with limit 1–100 — never offset
- Every response has a request_id, also sent as X-Request-Id
- Downloads are rights-gated per dataset
- Read meta.warnings: provider caveats appear there
- Citation resolution returns 501 unsupported_operation today
Connecting an agent instead?
The MCP server exposes the same operations as tools — search_case_law, get_legal_document, list_legal_datasets and more — with identical scopes, quotas and metering. Results are citation-ready and list their access restrictions.
If your first call fails
A 401 invalid_api_key means the header is missing or the key is malformed, revoked or expired; check that you sent Authorization: Bearer followed by the full dc_live_ key. A 403 missing_scope names the scope in error.param; create a key with that scope. A 403 not_entitled means your organization's plan or modules do not cover the dataset's tier.
A 503 not_configured means the provider channel is not connected yet — for LAW.co, that applies to the statute reference table, which is not yet populated. A 403 rights_restricted means the license blocks that channel, as it does for LAW.co bulk downloads today. Neither is fixed by retrying. A 429 rate_limited clears after Retry-After seconds; quota_exceeded lasts until the monthly reset. Quote meta.request_id in any support request.
What your plan includes
The Free plan covers free and standard dataset tiers with small monthly quotas, enough to build and test. Pro at $149/month and Business at $799/month add premium tiers, such as AI case summaries, and higher quotas for API requests, MCP calls and downloads. The rate-limits page lists the numbers.
Questions buyers ask
Can I try it before I sign up?
Each dataset page has an interactive preview over synthetic demo records, using the same filters the API accepts. The API itself returns live records.
Is there a sandbox?
A sandbox key returning demo records is planned. Demo records are never billed.
Which scopes does the quickstart need?
datasets:read for the catalog and schema, datasets:query for dataset record search, legal:read for the /legal endpoints, and mcp:invoke if you connect an agent.
Why does total come back null?
total is set only when the provider reports it. LAW.co's current search is randomly sampled and does not report a total, so a warning explains the limit instead.
Is there an OpenAPI document?
Yes. GET https://api.data.co/v1/openapi.json returns an OpenAPI 3.1 document generated from the route table, so it matches the handlers. It is public and needs no key.
Does the quickstart work with MCP-only clients?
Yes. Skip the REST calls, add the MCP server to your client with a key that has mcp:invoke and legal:read, and call list_legal_datasets to see what is available.
Where do I find a dataset's slug?
In GET /v1/datasets responses and in the URL of each dataset page, for example lawco-court-opinions.
API and MCP access is live.
Sign up at app.data.co, create an organization and issue a scoped key for REST and MCP.