ForHosting KIT · OCR & Data Extraction

Extract contract data

Contracts bury their operative facts inside pages of standard clauses that nobody rereads once they're signed. This endpoint extracts what a paralegal would flag on a first pass — the parties, effective and expiry dates, monetary amounts, renewal terms — so that contract data can live in a database instead of a filing cabinet.

● StablePer request + per page$0.003
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The problem of a signed contract nobody can query

A legal team, a finance department or a procurement office rarely needs to reread a whole contract; they need to know who signed it, when it expires, and how much money is involved, right now, without opening the PDF. This endpoint solves exactly that: it reads the contract and returns the operative facts as structured fields, so answering 'which vendor contracts renew next quarter' becomes a database query instead of an afternoon of searching folders.

What happens after you submit the document

You send the file to POST /ocr/contract and receive a task_id immediately, because extraction runs asynchronously and can take longer on lengthy multi-page agreements. Once processing finishes, the structured result — parties, dates, amounts, key terms — is delivered through a signed webhook, or made available at a signed link valid for 24 hours.

Contracts are old, but the extraction problem is new

Written contracts predate the printing press, but the practice of storing thousands of them as scanned images and PDFs is entirely a byproduct of the last few decades of digitization, and it created a specific new problem: a contract's terms are legally binding the moment it's signed, yet the data inside it becomes functionally invisible unless someone manually retypes it. Structured extraction is the missing bridge between the signed document and the systems that need to act on it.

How it fits into a document workflow

Legal operations teams use it to populate a contract repository automatically as agreements are signed; finance teams use it to catch payment amounts and due dates without manual review; procurement teams use it to flag contracts approaching renewal or expiry across an entire vendor portfolio, all without anyone reading each contract cover to cover.

Pricing tied to document length

The endpoint charges $0.003 per request plus $0.0135 per page, reflecting that a ten-page agreement takes more work to extract than a one-page addendum; you're only billed once extraction succeeds, and a failed attempt is retried automatically up to three times before returning a clear error with no charge. Access is gated by prepaid balance rather than a free tier, which keeps processing capacity available for real work.

Contract repository population

Automatically extract party names, dates and amounts as signed agreements are uploaded, instead of manual data entry into a CLM system.

Renewal and expiry tracking

Scan an entire vendor contract portfolio to flag which agreements are approaching their renewal or termination date.

Finance and payment reconciliation

Pull monetary amounts and payment terms from signed contracts to cross-check against invoices and purchase orders.

Due diligence document review

Extract key terms from hundreds of contracts quickly during an acquisition or audit instead of reading each one manually.

What fields does the contract data extraction api return?

Parties, effective and expiry dates, monetary amounts, and key terms such as renewal or termination conditions.

How is pricing calculated for long contracts?

You pay $0.003 per request plus $0.0135 per page, so cost scales with the length of the document you submit.

Is there a free version of the contract data extraction api?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How do I retrieve the extracted contract data?

Through a signed webhook when the task completes, or from a signed link that remains valid for 24 hours.

Is a failed contract extraction billed?

No. Failed tasks are retried automatically up to three times and are never charged if they still fail.

Can it process multi-page contracts?

Yes, the endpoint reads the full document and prices per page, handling lengthy multi-page agreements as a single async task.

Does it work on scanned paper contracts?

Yes, it extracts data from scanned pages as well as native digital documents.

Can I run bulk contract extraction across a whole portfolio?

Yes, submit each contract as its own request; every call returns its own task_id so a full portfolio can process concurrently.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/ocr/contract

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/ocr/contract \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"…"}'
{
  "input": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "ocr.contract",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.003
Per page$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages10
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
413input_too_largeThe file exceeds the size limit.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →