Extract structured clause data from a contract or legal document. $0.03 per request.
For informational purposes only. This is not legal advice and output should be reviewed by a qualified professional before being relied on.
Send a contract as a PDF or plain text. Get back structured data: document type, parties, effective date, termination and governing-law clauses, a breakdown of key clauses by category, and flagged risk terms.
Submitted content is processed by Anthropic's Claude API and is not otherwise stored or logged.
| Method | POST |
|---|---|
| Path | /extract |
| Content-Type | multipart/form-data |
| field | required | description |
|---|---|---|
file | one of file/text | The document PDF, max 10MB |
text | one of file/text | Document content as plain text, if no PDF |
curl -X POST https://legal-clause-extractor.pdfextractapi.workers.dev/extract \
-F "file=@contract.pdf"
{
"document_type": "Non-Disclosure Agreement",
"parties": ["Acme Corp", "Jane Doe"],
"effective_date": "2026-01-15",
"termination_clause": "Either party may terminate with 30 days written notice.",
"governing_law": "State of Delaware",
"key_clauses": [
{
"type": "confidentiality",
"summary": "Recipient must keep disclosed information confidential for 5 years.",
"excerpt": "Recipient shall not disclose Confidential Information for a period of five (5) years..."
}
],
"risk_flags": ["Uncapped liability for breach of confidentiality"]
}
Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_input, file_too_large, invalid_file, corrupted_file, password_protected, no_text_layer.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.