# Crust Data

> Company data API for AI agents (prototype: 1,000 companies — country, funding stage, industry, headcount, recent executive hires). An agent can create an account for its user inside one chat: the user clicks one emailed link — no code, no form, no card — and gets 100 free credits to search immediately. No API key is needed to start. Terms: https://crustdata.dileepadari.dev/terms/2026-10-26

## Agents: start here (3 HTTP calls, or the MCP server)

0. `GET https://crustdata.dileepadari.dev/v1/catalog` — what the data is and what it costs (free, static; nothing else is served before sign-in).
1. `GET https://crustdata.dileepadari.dev/v1/terms` → show the user `notice_text` verbatim (fill in their email) and ask which email to use. Do not invent an email.
2. `POST https://crustdata.dileepadari.dev/v1/signin/start` `{"email", "terms_accepted":{"version","terms_sha256","notice_id","accepted_by":"human_via_agent","human_statement":"<user's exact reply>"}}` with header `Idempotency-Key: <uuid you keep>` → `{signin_id, poll_token, phrase, landing_url}`. Tell the user: "I emailed you a sign-in link from login@stytch.com — click it (phrase <phrase>; your phone is fine); I'll continue automatically." There is NO code to ask for.
3. `GET https://crustdata.dileepadari.dev/v1/signin/{signin_id}?wait=25` with `Authorization: Bearer <poll_token>` → 202 while pending, 200 once clicked with `_agent.grant`, `credits`, `claim_url`. Repeat until `state != pending`, e.g. `for i in $(seq 1 20); do curl -s --max-time 30 -H "Authorization: Bearer $POLL" "https://crustdata.dileepadari.dev/v1/signin/$ID?wait=25"; done` (up to 10 minutes). Never print the grant or poll_token; give the user `claim_url`.
4. `POST https://crustdata.dileepadari.dev/v1/search` with `Authorization: Bearer <grant>` and `Idempotency-Key` (1 credit + 1 per row; `max_credits` caps spend; `X-Credits-Used` carries the charge) · `GET https://crustdata.dileepadari.dev/v1/account/credits`.

Retries: repeat any call with the same `Idempotency-Key`; it never sends a second email or creates a second account, grant or charge.
Errors are `application/problem+json` with `code` and a `recover` sentence naming the next call; a 401 or an unknown /v1 route carries the full flow in `for_agents`.

MCP server (Claude Desktop, claude.ai, Claude Code, Cursor): https://crustdata.dileepadari.dev/mcp — tools get_terms, get_catalog, start_signin, wait_for_signin (<=45 s per call, repeat), search_companies, check_balance. Add to Claude in one click: https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Crust%20Data&connectorUrl=https%3A%2F%2Fcrustdata.dileepadari.dev%2Fmcp
OpenAPI: https://crustdata.dileepadari.dev/openapi.json · Claim page (API key, usage, consent receipt): https://crustdata.dileepadari.dev/claim · Terms: https://crustdata.dileepadari.dev/terms/2026-10-26 · Privacy: https://crustdata.dileepadari.dev/privacy/2026-10-26
