Skip to content
Data.co Marketplace← Data.co for Enterprise
data.coMarketplace
Developers · Reference · v1 live

API reference

https://api.data.co/v1 — the live v1 surface. Create a key at app.data.co and call any endpoint below; tell us what is missing.

Conventions

Ground rules

TopicRule
TransportHTTPS only. JSON request and response bodies, UTF-8.
VersioningMajor version in the path (/v1). Additive changes within a version; breaking changes get a new version.
AuthenticationAuthorization: Bearer dc_live_<prefix>_<secret>. Scopes are checked per endpoint.
Request IDsEvery response has a server-generated X-Request-Id header and meta.request_id. Send your own X-Request-Id to correlate; it is echoed as X-Client-Request-Id and meta.client_request_id, and never used for metering.
Field namingsnake_case in query parameters; record objects keep the connector's field names.
DatesISO 8601: YYYY-MM-DD for dates, full timestamps in UTC.
ProvenanceEvery record carries a provenance object. AI enrichment is a separate block with isDerived: true.
Demo dataLive records return demo: false. Records with demo: true are synthetic and never billed.
Envelope

Response envelope

Every response has the same three keys: data, meta and error. Single objects return data as an object; lists return an array with meta.next_cursor. meta.total is null when the provider does not report it — it is never estimated.
200 OKIllustrative
{
  "data": [ { …record… } ],
  "meta": {
    "request_id": "req_…",
    "api_version": "v1",
    "demo": false,
    "next_cursor": "eyJ…" | null,
    "total": 42 | null,
    "warnings": [ "…provider caveat…" ]
  },
  "error": null
}
Pagination

Cursor pagination

Pass limit (1–100, default 20). When next_cursor is non-null, send it back as cursor to get the next page. Cursors are opaque and tied to the query; don't construct them. There is no offset parameter.
terminalIllustrative
curl -G https://api.data.co/v1/legal/search \
  -H "Authorization: Bearer $DATACO_API_KEY" \
  --data-urlencode "q=easement" \
  --data-urlencode "limit=50" \
  --data-urlencode "cursor=eyJ…"

Provider caveat: LAW.co's current search endpoint returns a randomly sampled, unpaginated set of up to 50 matches. Cursors page within that sample and a warning says so. Stable keyset pagination depends on LAW.co's proposed internal endpoint.

Errors

Error objects

Non-2xx responses return a single error object. Branch on code, not message.
errorIllustrative
{
  "data": null,
  "meta": { "request_id": "req_…", "api_version": "v1", "demo": false },
  "error": {
    "type": "rights_error",
    "code": "rights_restricted",
    "message": "Dataset 'lawco-case-summaries' 'download' access is awaiting rights confirmation from the provider.",
    "param": null,
    "request_id": "req_…"
  }
}
HTTPtypecodeWhen
400invalid_request_errorinvalid_paramsA parameter is missing or malformed.
401authentication_errorinvalid_api_keyKey missing, malformed, expired or revoked.
403permission_errormissing_scopeThe key lacks the scope this endpoint needs.
403rights_errorrights_restrictedThe dataset's license or rights status blocks this channel (for example bulk download).
404not_found_errornot_foundDataset or record does not exist.
403permission_errornot_entitledYour plan does not include this dataset's pricing tier.
429rate_limit_errorrate_limitedPer-key token bucket is empty; honor Retry-After.
429rate_limit_errorquota_exceededMonthly plan quota (API requests, MCP calls or downloads) is used up.
501unsupported_errorunsupported_operationThe provider cannot back this operation yet (for example citation resolution).
502upstream_errorupstreamThe provider's API failed or timed out.
503unavailable_errornot_configuredThe provider channel is not connected yet; it is not live.
Endpoints

Endpoint reference

Catalog

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

Records

EndpointDescriptionScopeParametersLAW.co backing
GET /datasets/{id}/recordsSearch one dataset's records.datasets:queryq, jurisdiction, court, document_type, date_from, date_to, citation, topic, cursor, limitPartial — 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).datasets:queryJSON body: q, jurisdiction, court, document_type, date_from, date_to, citation, topic, cursor, limitPartial — as above

Legal

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

Downloads & usage

EndpointDescriptionScopeParametersLAW.co backing
POST /datasets/{id}/downloadsRequest a bulk export (rights-gated); returns a single-use grant token.datasets:queryJSON body: formatUnavailable — 403 rights_restricted (awaiting rights confirmation; no bulk endpoint)
GET /usageUsage events for your organization.usage:readfrom, to, dataset, channel, cursor, limitn/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.

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.