Skip to content
Data.co Marketplace← Data.co for Enterprise
data.coMarketplace
Developers · SDKs

SDKs are planned. HTTP works today.

We have not released official client libraries. The API is plain JSON over HTTPS, so any HTTP client works — and LLM apps can call it as a tool through function calling or MCP.

Status

Client libraries

LanguageStatus
PythonPlanned — not released
TypeScript / JavaScriptPlanned — not released
Other languagesUse raw HTTP, or generate a client from the OpenAPI document
Until then

Generate a client, or write a thin wrapper

The OpenAPI 3.1 document at https://api.data.co/v1/openapi.json is generated from the same route table and input schemas the handlers use, so it cannot drift from the API. You can feed it to an OpenAPI client generator for your language today. Generated clients are not supported by us, but they are a reasonable bridge.

Most integrations only need a thin wrapper: set the Authorization header, unwrap the data, meta and error envelope, follow meta.next_cursor, honor Retry-After on 429, and raise on error.code. The examples below do exactly that in a few lines.

We will not publish package names until official SDKs exist. Any package claiming to be an official Data.co SDK before then is not ours.

Without an SDK

Raw HTTP and tool calling

These examples use only standard libraries and a generic function-calling schema.

search.py
import os, requests

r = requests.post(
    "https://api.data.co/v1/legal/search",
    headers={"Authorization": f"Bearer {os.environ['DATACO_API_KEY']}"},
    json={"q": "easement", "limit": 10},
    timeout=15,
)
env = r.json()
if env["error"]:
    raise RuntimeError(f"{env['error']['code']} ({env['error']['request_id']})")
for rec in env["data"]:
    print(rec["title"], rec["citations"], rec["provenance"]["licenseId"])
cursor = env["meta"]["next_cursor"]  # send back as "cursor" for the next page

Illustrative example · final API surface documented in /docs

Wrapper checklist

What a good thin client handles

  • Bearer auth from an environment variable or secret store
  • Unwrapping data, meta and error
  • Cursor pagination through meta.next_cursor
  • Retry with Retry-After on 429 rate_limited
  • No retry on rights_restricted, not_entitled or not_configured
  • Surfacing meta.demo and meta.warnings to callers
  • Logging request ids for support and reconciliation
  • A timeout on every request

Prefer MCP for agents.

If your agent framework supports MCP, connect to the Data.co MCP server instead of hand-writing tool schemas. The tools and permissions match the REST API.

MCP documentation
Envelope

What any client must understand

Whether you write a wrapper or generate one, these are the parts of every response that matter.

PartContents
dataAn object, a list of records or datasets, or null on error.
meta.request_idServer request id, also in the X-Request-Id header and the metering key.
meta.next_cursorOpaque cursor for the next page, bound to the query that produced it; null on the last page.
meta.totalTotal matching records when the provider reports it, otherwise null.
meta.demotrue when any data came from synthetic demo fixtures.
meta.warningsProvider caveats, such as sampled search.
errornull on success; otherwise type, code, message, param and request_id.
Agents and frameworks

Choosing between MCP and function calling

If your agent framework speaks MCP, use the Data.co MCP server. The tools, their input schemas and their descriptions come from the server, results are citation-ready, and you do not maintain tool definitions yourself. The key needs mcp:invoke plus the resource scope of each tool, and tool calls count toward your plan's monthly MCP quota.

If your framework only supports function calling, define a small number of tools that map to REST operations — usually search and get-by-id — and execute them in your backend with the API key. Never give the key to the model or the browser. Return the full envelope to the model, including warnings and the demo flag, so it can explain limits instead of guessing.

FAQ

Questions buyers ask

When will official SDKs ship?

No date is set. SDKs are planned; the API is live today over plain HTTP, and the changelog will announce any official SDK.

Will SDKs change the API?

No. SDKs will wrap the same v1 endpoints and envelope, so raw HTTP code keeps working.

Can I generate a client from the OpenAPI document?

Yes. The document is OpenAPI 3.1 and public. Generated clients are not officially supported, but they track the API because the document is generated from it.

Which language should I use?

Any language with an HTTP client and a JSON parser. The examples use Python and TypeScript because they are common in data and AI work.

Should the model see the API key?

No. Your application holds the key and executes tool calls on the model's behalf. Over MCP, the key is in the client configuration, not the conversation.

Is there a command-line tool?

No. curl or any HTTP tool works against the API, and the examples on these pages use curl.

Do the examples handle demo data?

They read meta.demo, which is false for live LAW.co records and true for synthetic fixtures. Label or skip demo records in your own code.

API and MCP access is live.

Sign up at app.data.co, create an organization and issue a scoped key for REST and MCP.