ForHosting KIT · OCR & Data Extraction

Find clauses in a contract

Somewhere inside a forty-page agreement is the one clause someone actually needs — an indemnification limit, a non-compete window, a governing-law provision — and finding it by hand means reading past everything else. This endpoint locates and isolates that specific clause and returns it as structured text, without asking anyone to open the file.

● BetaPer 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 difference between reading a contract and finding a clause

Extracting a whole contract's data and finding one particular clause are different jobs. A lawyer skimming for a limitation-of-liability provision, a compliance officer checking dozens of vendor agreements for a specific data-protection clause, or an analyst comparing termination language across a stack of leases — none of them want the full document restructured, they want the exact passage that matches what they're looking for, isolated and returned on its own.

The mechanics of a request

Submit the document along with the clause type or topic you're looking for to POST /ocr/clause, and you get a task_id back while the search runs asynchronously in the background. The matching clause text, along with its location in the document, is delivered through a signed webhook or made available at a signed link that stays valid for 24 hours.

Boilerplate exists precisely because clauses repeat

Legal drafting has relied on standard clause language for centuries, precisely because reusing well-tested wording reduces ambiguity and risk — that's the entire logic of boilerplate. The side effect is that most of a contract is predictable and only a handful of clauses actually carry the negotiated, document-specific risk. Locating those specific clauses efficiently, rather than treating the whole document as equally important, is the practical skill this endpoint automates.

Where clause-level extraction earns its place

Compliance teams use it to audit a portfolio of agreements for a single required clause, like a data processing addendum or an arbitration provision; deal teams use it to pull limitation-of-liability language across every contract in a due diligence data room; contract management platforms use it to power clause-level search instead of forcing users into full-text search across scanned PDFs.

Priced per page, billed only on success

Cost is $0.003 per request plus $0.0135 per page of the document searched, charged only once the clause is successfully located and extracted; a failed search retries automatically up to three times before returning a clear error at no charge. There's no free tier or trial by design — access needs prepaid balance, keeping the endpoint fast and reserved for real workloads.

Compliance clause audits

Check a portfolio of hundreds of vendor agreements for the presence and exact wording of a required data-protection clause.

Due diligence risk review

Pull limitation-of-liability or indemnification language from every contract in a data room during an acquisition review.

Contract management platform search

Power clause-level search inside a CLM tool so users can find every non-compete provision without opening each document.

Lease and vendor comparison

Extract termination or renewal clauses from a stack of leases to compare terms side by side across a property portfolio.

What does the legal clause extraction api actually return?

The exact matching clause text found in the document, along with its location, for the clause type or topic you specified.

Can I search for a specific clause type across many documents?

Yes, submit each document as its own request specifying the clause you need, and process a whole portfolio in parallel.

Is there a free trial for the legal clause 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 is clause extraction priced?

$0.003 per request plus $0.0135 per page of the document searched, with published pricing and no hidden credits.

How do I receive the extracted clause?

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

Am I charged if the clause isn't found or extraction fails?

No. Failed tasks retry automatically up to three times and are never billed if they still don't succeed.

Does this work on scanned legal documents?

Yes, it reads scanned and photographed pages as well as native digital documents.

How is this different from extracting the whole contract?

This endpoint targets and isolates one specific clause instead of returning structured data for the entire agreement.

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/clause

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/clause \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"…"}'
{
  "input": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "ocr.clause",
  "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 →