Legal Clause Extractor

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.

What it does

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.

Endpoint

MethodPOST
Path/extract
Content-Typemultipart/form-data

Fields

fieldrequireddescription
fileone of file/textThe document PDF, max 10MB
textone of file/textDocument content as plain text, if no PDF

Example

curl -X POST https://legal-clause-extractor.pdfextractapi.workers.dev/extract \
  -F "file=@contract.pdf"

Example response

{
  "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

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.

Payment

This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.

Try it in your browser