Contract Information Extractor
Uploads employment contracts, splits multi-document files and returns eight clause categories as structured JSON.

What it is
What it does
A focused extractor: give it a PDF or Word contract and it returns termination terms, obligations, deadlines, payment structures, parties, contract type, jurisdiction and confidentiality clauses as clean JSON, downloadable in one click. Files containing several agreements are split automatically and processed independently.
Why it exists
I spent an afternoon hunting for termination dates in a 20-page employment agreement. It's always the same eight fields. I automated exactly that, and made the prompt refuse to invent dates that aren't written.
Repo Amit-kr26/Contract-Information-ExtractorDemo contract-information-extractor.vercel.app/Stack FastAPI · Azure OpenAI GPT-4o · PyMuPDF · Tailwind CSS
How it is built
In-memory parsing
PDFs open with fitz.open("pdf", content) directly from uploaded bytes (no temp files); DOCX flows through python-docx paragraph joins.
Multi-contract splitting
A multiline regex on the EMPLOYMENT AGREEMENT heading segments compound uploads into Contract 1..N, each analysed separately.
Eight-clause Pydantic schema
ExtractedData declares Optional[str] fields for termination_and_amendment_terms, obligations_and_deliverables, key_dates_and_deadlines, payment_and_fee_structures, party_information, type_of_contract, jurisdiction_and_governing_laws, confidentiality_and_non_disclosure.
Conservative prompting
The prompt instructs GPT-4o to extract only explicitly stated information and mark everything else as not specified, in full sentences, no bold-heading fragments.
Downloadable results
POST /extract returns results plus a download_url; GET /download serves static/output.json as an attachment.
Vercel-native deploy
vercel.json routes @vercel/python at app.py with static assets served alongside, so the demo runs serverless.
How the pieces connect
Drawing is wider than the frame. Drag to pan.
Also filed under LLM / RAG