{"name":"Corpus Public API","version":"v1","description":"Semantic search and citation over US federal + state law, for agents and apps. Create a key at https://corpuslaw.us/settings, then authenticate with Authorization: Bearer <key>.","documentation":"https://corpuslaw.us/docs/api","openapi":"https://corpuslaw.us/api/v1/openapi.json","getKey":"https://corpuslaw.us/settings","mcp":{"endpoint":"https://corpuslaw.us/api/mcp","transport":"streamable-http","description":"Model Context Protocol server — point Claude Desktop, Cursor, or any MCP client at this URL to search and cite law in-agent.","tools":["search_law","get_law_node","list_coverage","account_status"]},"authentication":{"header":"Authorization: Bearer <api_key>"},"examples":{"search":"curl -H \"Authorization: Bearer <api_key>\" \"https://corpuslaw.us/api/v1/search?q=distillery&limit=5\"","coverage":"curl -H \"Authorization: Bearer <api_key>\" \"https://corpuslaw.us/api/v1/coverage\"","gis":"curl -H \"Authorization: Bearer <api_key>\" \"https://corpuslaw.us/api/v1/gis/CA-SF\""},"endpoints":[{"method":"GET","path":"/api/v1/search","summary":"Search US federal + state law","scopes":["search"],"credits":1,"params":[{"name":"q","required":true,"description":"Search query (natural language or keywords)."},{"name":"page","required":false,"default":1,"description":"1-based page number."},{"name":"limit","required":false,"default":20,"description":"Results per page (max 100)."},{"name":"mode","required":false,"default":"hybrid","description":"Retrieval mode. 'hybrid' fuses vector similarity with keyword search."},{"name":"jurisdiction","required":false,"description":"Scope to a jurisdiction short code (e.g. TX, US, CA-SF) and its sub-jurisdictions. See /api/v1/coverage for codes."},{"name":"codeBody","required":false,"description":"Scope to a single code body by UUID (from /api/v1/code-bodies)."},{"name":"facets","required":false,"default":false,"description":"Include facet counts (jurisdiction/tag histograms). Off by default to save latency; most agents don't need them."}]},{"method":"GET","path":"/api/v1/node/{id}","summary":"Fetch one provision by id","scopes":["node"],"credits":1,"params":[{"name":"id","required":true,"description":"UUID of the codex node."}]},{"method":"GET","path":"/api/v1/code-bodies","summary":"List code bodies","scopes":["browse"],"credits":1,"params":[]},{"method":"GET","path":"/api/v1/browse","summary":"Walk a code body's hierarchy","scopes":["browse"],"credits":1,"params":[{"name":"codeBodyId","required":true,"description":"UUID of the code body (from /api/v1/code-bodies)."},{"name":"parent","required":false,"description":"Optional parent node UUID; omit for top-level."}]},{"method":"GET","path":"/api/v1/gis/{shortCode}","summary":"Zoning layer (GeoJSON) for a city","scopes":["gis"],"credits":5,"params":[{"name":"shortCode","required":true,"description":"Municipal jurisdiction short code."}]},{"method":"GET","path":"/api/v1/coverage","summary":"What law is available right now","scopes":["search","node","browse","gis"],"credits":1,"params":[]},{"method":"GET","path":"/api/v1/me","summary":"Your key's credits + usage","scopes":["search","node","browse","gis","formation"],"credits":1,"params":[]},{"method":"GET","path":"/api/v1/formation/status/{orderId}","summary":"Track a formation order","scopes":["formation"],"credits":1,"params":[{"name":"orderId","required":true,"description":"Formation order UUID."},{"name":"token","required":true,"description":"Per-order tracking token."}]}]}