Skip to content
Data.co Marketplace← Data.co for Enterprise
data.coMarketplace
Data access · Live

The Data.co REST API

Versioned JSON endpoints for dataset discovery, record search and legal documents — one scoped key, cursor pagination, provenance on every record. The API is live: sign up at app.data.co, create a key and call it today.

Base URL
https://api.data.co/v1
Status
Live
Auth
Bearer API key (scoped)
Pagination
Cursor, ≤100 per page
First provider
LAW.co — live
Endpoints

Endpoint overview

Grouped by resource. The right-hand column is honest about what LAW.co's current API can back.

Catalog

EndpointDescriptionLAW.co backing
GET /datasetsList datasets with catalog metadata, per-channel access status and plan entitlement.Supported (catalog)
GET /datasets/{id}Full dataset descriptor: sources, license, coverage, access methods, quality notes. {id} is the slug.Supported (catalog)
GET /datasets/{id}/schemaField list with types, nullability and derived flags.Supported (catalog)
GET /providersList providers.Supported (catalog)

Records

EndpointDescriptionLAW.co backing
GET /datasets/{id}/recordsSearch one dataset's records.Partial — opinions only (q required); upstream search is sampled (≤50), topic filter unsupported. Statute reference values not yet populated
POST /datasets/{id}/querySame search with a JSON body (same fields).Partial — as above

Legal

EndpointDescriptionLAW.co backing
GET /legal/casesSearch court opinions.Partial — sampled keyword search over opinions
GET /legal/cases/{id}Get an opinion: text, metadata, provenance, entitled enrichment, authorities, cited-by.Supported
POST /legal/searchSearch across legal datasets (by dataset or document_type; default court opinions).Partial — sampled keyword search over opinions (statute reference values not yet populated)
POST /legal/citations/resolveResolve a citation string to records.Unavailable — returns 501 unsupported_operation (LAW.co has no resolver endpoint yet)
GET /legal/jurisdictionsList jurisdictions covered by legal datasets.Catalog-level only (U.S. federal, U.S. state)

Downloads & usage

EndpointDescriptionLAW.co backing
POST /datasets/{id}/downloadsRequest a bulk export (rights-gated); returns a single-use grant token.Unavailable — 403 rights_restricted (awaiting rights confirmation; no bulk endpoint)
GET /usageUsage events for your organization.n/a (Data.co side)

Base URL https://api.data.co/v1. Status: live. “LAW.co backing” describes what LAW.co's API can support through Data.co's service account.

Response envelope

Predictable responses.

Every response has data, meta and error. meta carries the request id, paging (next_cursor, total), a demo flag and warnings for provider caveats such as sampled upstream search. Errors return a typed error object with the same request id.

200 OK
{
  "data": [
    {
      "id": "lawco:case:<id>",
      "title": "<case name>",
      "citations": ["<reporter cite>"],
      "court": "<court>",
      "date": "YYYY-MM-DD",
      "provenance": { "provider": "lawco", "licenseId": "us-gov-edicts-public-domain", "isDerived": false }
    }
  ],
  "meta": {
    "request_id": "req_…",
    "api_version": "v1",
    "demo": false,
    "next_cursor": "<opaque>",
    "total": null,
    "warnings": ["Upstream search is sampled; results are not stable across calls."]
  },
  "error": null
}

Illustrative · shapes from the API reference

Walkthrough

From key to cited record

A typical integration makes four kinds of call. Each step below maps to an endpoint in the overview above.
  1. 1

    Discover

    Call GET /datasets to list datasets with their per-channel access status and whether your plan is entitled to each one.

  2. 2

    Inspect

    Call GET /datasets/{id}/schema to see field names, types, nullability and which fields are derived.

  3. 3

    Search

    Call GET /legal/cases or POST /legal/search with a query and filters; follow meta.next_cursor to page.

  4. 4

    Fetch and cite

    Call GET /legal/cases/{id} for the full opinion, provenance, entitled enrichment, authorities and cited-by.

Scopes

Least privilege by default

Keys carry explicit scopes. A request to an endpoint outside the key's scopes returns 403 missing_scope.
ScopeGrants
datasets:readCatalog, dataset descriptors, schemas and providers.
datasets:queryRecord search and download requests.
legal:readLegal endpoints: cases, search, jurisdictions.
usage:readYour organization's usage events.
mcp:invokeCalling MCP tools with the same key.
Fetch one opinionIllustrative
curl https://api.data.co/v1/legal/cases/lawco:case:<id> \
  -H "Authorization: Bearer $DATACO_API_KEY"

# 200 → data: { id, title, citations, court, date,
#   body: { text, format }, provenance: { … isDerived: false },
#   enrichment: { summary, holding, provenance: { isDerived: true } } | null,
#   authorities: [ … ], citedBy: [ … ] }
Questions

REST API FAQ

Is there an OpenAPI document?

Yes. The platform serves an OpenAPI 3.1 document for the v1 surface, which you can use to generate a client or import into an API tool.

Is there an official SDK?

Not yet; SDKs are planned. The API is plain JSON over HTTPS, so any HTTP client works.

Why does search include warnings?

Provider caveats travel with the data. LAW.co's current search samples up to 50 matches at random, so results can differ between calls, and meta.warnings says so on every affected response.

How do I know whether a record is real or demo?

Check meta.demo and the X-Dataco-Demo response header. Live LAW.co records come back with meta.demo false. Demo records are synthetic, titled with a [DEMO] prefix, and never billed; the previews on this site use them.

What happens when a channel is not live?

You get a typed error, not empty results: 503 not_configured when a provider channel is not connected, 403 rights_restricted when rights block a channel, and 501 unsupported_operation when the provider cannot back an operation.

Start building with live data.

API and MCP access is live. Sign up at app.data.co, create a scoped key, or talk to us about your use case.