DocExtract API quickstart
DocExtract turns unstructured document text into clean, typed JSON. You send the text of an invoice, resume, contract, meeting notes, or any document, along with a document_type, and you get back a structured object with the fields relevant to that type. There is no OCR step and no template configuration — text in, JSON out, typically in one to two seconds.
The whole integration is one HTTP call. With a key (step 1 below), this returns typed JSON:
curl -X POST https://docextract-ai-document-data-extractor.p.rapidapi.com/extract \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"document_type": "invoice", "content": "INVOICE #A-2291 Acme Widgets Ltd Total: 210.00 CAD"}'
The free tier is 10 calls/month and needs no card to start. Full walkthrough below.
1. Get a key
Keys, billing, and interactive docs are handled on RapidAPI. The free tier is 10 calls per month and needs no card to start; paid plans begin at $1/month as flat monthly quotas, so the bill does not move with document length.
Pricing
Every plan is a flat monthly call quota. One /extract call counts as one unit regardless of document length — there is no per-page charge and no OCR surcharge. Plans are managed on RapidAPI. Prices below were reduced on 2026-09-20 to make it easier to try DocExtract; they may rise again once adoption grows.
| Plan | Calls / month | Price / month |
|---|---|---|
| Basic | 10 | $0 |
| Pro | 50 | $1 |
| Ultra | 1,000 | $10 |
| Mega (Business features) | 50,000 | $50 |
The free tier needs no card to start. See the RapidAPI listing for current plan details and to subscribe.
The Mega plan adds deterministic OCR-style correction, optional date and numeric formatting, literal text substitution, and a per-change audit. Read the feature guide and request examples, or start with the Business overview.
Plan names here map to RapidAPI as Basic, Pro, Ultra, and Mega, directly — this site's naming and RapidAPI's own tier names are now the same. Mega lists a hard 50,000-request monthly limit; separate platform bandwidth terms apply. Checked September 20, 2026; confirm current pricing.
How does that compare to other turnkey extraction APIs?
Against comparable hosted extraction APIs (not the DIY route above), DocExtract's $1/month entry point is the cheapest turnkey option we found, checked against each provider's own published pricing page on 2026-09-11 (DocExtract pricing updated 2026-09-20):
| Provider | Entry paid plan | Effective cost |
|---|---|---|
| DocExtract (us) | $1/month · 50 calls | $0.02/call |
| Docparser | $39/month · 100 credits (100–500 pages) | $0.39/credit |
| Nanonets | $100/month · 100 credits, $0.30 per complex-AI (extraction) block run | ~$1–2/invoice (4–6 blocks typical) |
Docparser and Nanonets also do OCR (image/scanned-PDF input) and workflow features DocExtract does not — DocExtract is text-in only, which is why it can stay cheaper and simpler for callers who already have extracted text.
Why not just call the model yourself?
You can already get JSON out of GPT or Gemini directly, and raw model token costs alone are usually cheaper per document than any API, DocExtract included. What that DIY call does not include is prompt engineering per document type, schema enforcement, retries, fallback providers, and keeping the schema in sync as document types drift over time — the glue work you end up owning. DocExtract handles that glue for five common document types at a flat monthly cost, starting at $1/month for 50 calls.
That tradeoff is not always worth it: if you have one document type, a stable schema, and want to own the prompt yourself, DIY stays cheap and simple. See the full DocExtract vs. DIY vs. l1m comparison for a closer look at when each approach makes sense.
2. Make your first call
The same call with a fuller invoice document, through the RapidAPI gateway, using the key from your RapidAPI dashboard:
curl -X POST https://docextract-ai-document-data-extractor.p.rapidapi.com/extract \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{
"document_type": "invoice",
"content": "INVOICE #A-2291\nAcme Widgets Ltd\n55 Main St, Calgary AB\nDate: 2026-08-14 Due: 2026-09-13\n2x Gadget @ 40.00 = 80.00\n1x Install = 120.00\nSubtotal: 200.00\nGST 5%: 10.00\nTotal: 210.00 CAD\nTerms: Net 30"
}'
The API is also reachable directly at https://ainception.ca/api/docextract. RapidAPI is the standard way to get a key; the direct host is for existing key holders and authenticates with an X-API-Key header instead of the RapidAPI headers. The base extraction body is the same; Business postprocessing additionally requires the eligible marketplace route described in the Business guide:
curl -X POST https://ainception.ca/api/docextract/extract \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"document_type": "invoice", "content": "INVOICE #A-2291 ..."}'
Code examples
The same first call from Python and Node.js. Both hit the RapidAPI gateway with the headers and JSON body from step 2 and read the parsed data object from the response.
Python
import requests
resp = requests.post(
"https://docextract-ai-document-data-extractor.p.rapidapi.com/extract",
headers={
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "docextract-ai-document-data-extractor.p.rapidapi.com",
"Content-Type": "application/json",
},
json={
"document_type": "invoice",
"content": "INVOICE #A-2291 Acme Widgets Ltd Total: 210.00 CAD",
},
timeout=30,
)
resp.raise_for_status()
data = resp.json()["data"]
print(data.get("vendor_name"), data.get("total_amount"), data.get("currency"))
Node.js
const resp = await fetch(
"https://docextract-ai-document-data-extractor.p.rapidapi.com/extract",
{
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "docextract-ai-document-data-extractor.p.rapidapi.com",
"Content-Type": "application/json",
},
body: JSON.stringify({
document_type: "invoice",
content: "INVOICE #A-2291 Acme Widgets Ltd Total: 210.00 CAD",
}),
},
);
if (!resp.ok) throw new Error(`DocExtract ${resp.status}`);
const { data } = await resp.json();
console.log(data.vendor_name, data.total_amount, data.currency);
To call the direct https://ainception.ca/api/docextract/extract endpoint instead, keep the same request and response and replace the two X-RapidAPI-* headers with a single X-API-Key: YOUR_API_KEY header.
No-code integrations
DocExtract is a single HTTP POST, so any no-code tool with an HTTP action can call it directly — no custom code, no SDK. Same headers and JSON body as the Python/Node.js examples above.
n8n
Add an HTTP Request node with these settings:
Method: POST
URL: https://docextract-ai-document-data-extractor.p.rapidapi.com/extract
Authentication: None (use Header Auth below)
Headers:
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com
Content-Type: application/json
Body (JSON):
{
"document_type": "invoice",
"content": "{{ $json.content }}"
}
The response's data object is available downstream as {{ $json.data }} for the next node.
Make.com
Add an HTTP > Make a request module with these settings:
URL: https://docextract-ai-document-data-extractor.p.rapidapi.com/extract
Method: POST
Headers:
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com
Content-Type: application/json
Body type: Raw (JSON)
Request content:
{
"document_type": "invoice",
"content": "{{document text from a previous module}}"
}
Parse the response with a JSON > Parse JSON module to map data.* fields into later steps.
Zapier
Add a Webhooks by Zapier > Custom Request action with these settings:
Method: POST
URL: https://docextract-ai-document-data-extractor.p.rapidapi.com/extract
Data Pass-Through?: No
Data:
document_type: invoice
content: (map from a previous step's output)
Headers:
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com
Content-Type: application/json
Zapier exposes the parsed response fields (e.g. data__vendor_name, data__total_amount) for use in later Zap steps.
Bubble
Add a new API in the API Connector plugin with these settings:
Name: DocExtract
Call name: extract
Use as: Action
Method: POST
URL: https://docextract-ai-document-data-extractor.p.rapidapi.com/extract
Headers:
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: docextract-ai-document-data-extractor.p.rapidapi.com
Content-Type: application/json
Body type: JSON
Body:
{
"document_type": "invoice",
"content": ""
}
Wrap the content value in angle brackets so Bubble turns it into a dynamic parameter, then click Initialize call with a sample document so Bubble detects the response fields (data.vendor_name, data.total_amount, etc.) for use as an action step in a workflow.
All four tools work the same way against the direct https://ainception.ca/api/docextract/extract endpoint — swap the two X-RapidAPI-* headers for a single X-API-Key: YOUR_API_KEY header.
3. Read the response
A successful call returns HTTP 200 with this envelope:
{
"success": true,
"document_type": "invoice",
"engine": "groq",
"processing_ms": 1355,
"data": {
"vendor_name": "Acme Widgets Ltd",
"invoice_number": "A-2291",
"invoice_date": "2026-08-14",
"due_date": "2026-09-13",
"subtotal": 200.0,
"tax_amount": 10.0,
"total_amount": 210.0,
"currency": "CAD",
"line_items": [
{ "description": "Gadget", "quantity": 2, "unit_price": 40.0, "total": 80.0 },
{ "description": "Install", "quantity": 1, "unit_price": 120.0, "total": 120.0 }
],
"payment_terms": "Net 30"
}
}
success— boolean.data— the extracted fields. The shape depends ondocument_type; fields that are genuinely absent from the document are omitted rather than returned asnull, so the presence of a key is itself a signal.document_type— echoes the type that was applied.engine— which model produced the result.processing_ms— integer server-side processing time.warning— present only when the model output was not valid JSON and had to be recovered.
Document types
document_type is one of the following. It defaults to general if omitted.
| Value | Use it for |
|---|---|
invoice | Bills and invoices — vendor, numbers, dates, totals, tax, line items, payment terms. |
resume | CVs and resumes — contact details, skills, work history, education. |
meeting_notes | Notes and transcripts — attendees, decisions, action items. |
contract | Agreements — parties, effective and termination dates, key terms and obligations. |
general | Anything else — a best-effort structured summary of the salient fields. |
See a real example
Real requests and responses from the live API, one per document type — nothing on this page is fabricated. Pick a type to see the input text and the exact JSON that came back.
invoice — a scanned/OCR invoice with a few OCR errors
Input (content, OCR text with recognizable character mistakes like “p0le” and “St0ney”):
NORTHwIND ELECTRICAL SUPPLY
442 HARBOUR ST, ST0NEY CREEK ON L8E 2W1
Invoice # NW-20881 Date 2026-03-14 Due 2026-04-13
20A single p0le breaker x12 @ 14.25 = 171.00
200A main panel 40 circuit x4 @ 289.00 = 1156.00
12/2 NMD90 wire per m x30 @ 2.10 = 63.00
Job site delivery x1 @ 75.00 = 75.00
Subtotal 1465.00 Tax 190.45 Total CAD 1655.45
Terms: Net 30
Output:
{
"success": true,
"document_type": "invoice",
"engine": "groq",
"processing_ms": 2081,
"data": {
"vendor_name": "NORTHwIND ELECTRICAL SUPPLY",
"vendor_address": "442 HARBOUR ST, ST0NEY CREEK ON L8E 2W1",
"invoice_number": "NW-20881",
"invoice_date": "2026-03-14",
"due_date": "2026-04-13",
"subtotal": 1465.0,
"tax_amount": 190.45,
"total_amount": 1655.45,
"currency": "CAD",
"line_items": [
{ "description": "20A single p0le breaker", "quantity": 12, "unit_price": 14.25, "total": 171.0 },
{ "description": "200A main panel 40 circuit", "quantity": 4, "unit_price": 289.0, "total": 1156.0 },
{ "description": "12/2 NMD90 wire per m", "quantity": 30, "unit_price": 2.1, "total": 63.0 },
{ "description": "Job site delivery", "quantity": 1, "unit_price": 75.0, "total": 75.0 }
],
"payment_terms": "Net 30",
"notes": "Make cheques payable to Northwind Electrical Supply. Thank you for your business."
}
}
Note the OCR typos (“p0le”, “ST0NEY”) pass straight through untouched — extraction reads the text as given, it does not correct OCR errors on any tier except Mega (Business).
contract — a services agreement
Input (content, condensed contract text):
MASTER SERVICES AGREEMENT
Between Northwind Analytics Inc. ("Provider") and Cedar Grove Retail LLC ("Client")
Effective 2025-03-03, expiring 2027-03-02 (24-month term).
Fee: USD 144,000 total, invoiced monthly.
Scope: data pipeline development, monthly reporting, 20 hours support per month.
Confidentiality obligation survives 5 years.
Either party may terminate with 30 days notice for material breach.
Governed by the laws of the Province of Ontario, Canada.
Output:
{
"success": true,
"document_type": "contract",
"engine": "groq",
"processing_ms": 1479,
"data": {
"contract_type": "Master Services Agreement",
"parties": [
{ "name": "Northwind Analytics Inc.", "role": "Provider" },
{ "name": "Cedar Grove Retail LLC", "role": "Client" }
],
"effective_date": "2025-03-03",
"expiration_date": "2027-03-02",
"value": 144000,
"currency": "USD",
"key_terms": [
"24-month term",
"USD 144,000 total fee, invoiced monthly",
"Data pipeline development, monthly reporting, 20 hours support per month",
"Confidentiality obligation for 5 years",
"Termination with 30 days notice for material breach"
],
"governing_law": "Province of Ontario, Canada"
}
}
meeting_notes — a weekly sync with action items
Input (content, condensed notes):
Weekly Platform Sync — 2026-09-08. Attendees: Priya, Daniel, Sofia, Marcus.
Agenda: checkout latency regression (tax service), onboarding redesign,
Saturday incident (log volume exceeded retention budget), Q4 roadmap blocked on pricing.
Decisions: ship the tax-service cache before the Sept 22 marketing push;
drop SMS notifications from Q4 scope, keep email and in-app only.
Action items: Daniel adds rate-lookup cache by 09-11; Sofia shares revised onboarding
flow by 09-12; Marcus sets a log retention hard cap + 80% alert by 09-15; Priya
confirms pricing with finance by 09-10. Next meeting 2026-09-15 10:00 MT.
Output:
{
"success": true,
"document_type": "meeting_notes",
"engine": "groq",
"processing_ms": 2268,
"data": {
"meeting_title": "Weekly Platform Sync",
"date": "2026-09-08",
"attendees": ["Priya", "Daniel", "Sofia", "Marcus"],
"agenda_items": [
"Checkout latency regression traced to the new tax service",
"Onboarding redesign",
"Incident from Saturday: log volume exceeded retention budget",
"Q4 roadmap draft blocked on pricing decision from finance"
],
"decisions": [
"Ship the tax-service cache before the marketing push on Sept 22",
"Drop the SMS notification channel from the Q4 scope; keep email and in-app only"
],
"action_items": [
{ "task": "Add rate-lookup cache", "owner": "Daniel", "due_date": "2026-09-11" },
{ "task": "Share revised onboarding flow", "owner": "Sofia", "due_date": "2026-09-12" },
{ "task": "Set log retention hard cap and 80% alert", "owner": "Marcus", "due_date": "2026-09-15" },
{ "task": "Confirm pricing with finance", "owner": "Priya", "due_date": "2026-09-10" }
],
"next_meeting": "2026-09-15 10:00 MT",
"summary": "The team reviewed latency regression, onboarding redesign, log retention incident, and Q4 roadmap blockers, decided to ship a tax-service cache and drop SMS notifications, and assigned action items with due dates before the next sync."
}
}
general — a purchase order (no document-specific type needed)
Input (content, purchase order text):
PURCHASE ORDER PO # PO-4417
Acme Robotics Ltd., 171 Foundry Way, Unit 4, Hamilton, ON L8P 3K7 Date 2026-02-11
Vendor: Bright Steel Supply Co., 88 Rolling Mill Rd, Cleveland, OH 44105
Ship via: Ground Terms: Net 30
1 6061-T6 aluminium plate 12mm 40 82.50 3300.00
2 Stainless M6 socket screws (100pk) 25 9.20 230.00
3 Freight surcharge 1 145.00 145.00
Subtotal 3675.00 Tax (8%) 294.00 Total USD 3969.00
Approved by: J. Okafor, Operations Delivery required by 2026-03-02
Output:
{
"success": true,
"document_type": "general",
"engine": "groq",
"processing_ms": 2402,
"data": {
"document_type": "Purchase Order",
"title": "PURCHASE ORDER",
"date": "2026-02-11",
"author_or_sender": "Acme Robotics Ltd.",
"recipient": "Bright Steel Supply Co.",
"key_entities": [
{ "type": "Company", "value": "Acme Robotics Ltd." },
{ "type": "Company", "value": "Bright Steel Supply Co." },
{ "type": "Product", "value": "6061-T6 aluminium plate 12mm" },
{ "type": "Product", "value": "Stainless M6 socket screws (100pk)" },
{ "type": "Charge", "value": "Freight surcharge" }
],
"main_topics": ["Purchase Order", "Materials Procurement", "Shipping"],
"extracted_fields": {
"po_number": "PO-4417",
"ship_via": "Ground",
"terms": "Net 30",
"delivery_required_by": "2026-03-02",
"approved_by": "J. Okafor, Operations",
"subtotal": 3675.0,
"tax": 294.0,
"total": 3969.0,
"line_items": [
{ "line": 1, "description": "6061-T6 aluminium plate 12mm", "quantity": 40, "unit_price": 82.5, "amount": 3300.0 },
{ "line": 2, "description": "Stainless M6 socket screws (100pk)", "quantity": 25, "unit_price": 9.2, "amount": 230.0 },
{ "line": 3, "description": "Freight surcharge", "quantity": 1, "unit_price": 145.0, "amount": 145.0 }
]
},
"summary": "Acme Robotics Ltd. issued purchase order PO-4417 on 2026-02-11 to Bright Steel Supply Co. for aluminium plates, socket screws, and a freight surcharge, totaling USD 3,969.00 with net-30 terms and ground shipping. Delivery is required by 2026-03-02 and the order was approved by J. Okafor, Operations."
}
}
Errors
Errors return the matching HTTP status and this body:
{ "success": false, "error": "short message", "code": 400, "detail": "explanation naming the offending field or limit" }
| Status | Meaning |
|---|---|
| 400 | Missing or invalid content, or malformed JSON. |
| 401 | Missing or invalid API key. |
| 404 | Unknown path or method — the extraction endpoint is POST /api/docextract/extract. |
| 413 | Request body exceeds 64 KB, or content exceeds 16000 characters. |
| 429 | Rate limit exceeded (20 requests per 60 seconds). |
| 502 | Upstream model error — retry. |
| 504 | Extraction timed out — retry, or shorten the document. |
GET /api/docextract/health needs no authentication and returns {"status":"ok", ...} when the service is up.
Limits and data handling
- Content: up to 16000 characters per request; larger bodies get HTTP 413.
- Body: up to 64 KB total.
- Rate: 20 requests per 60 seconds.
- Storage: submitted text is passed to the model and is not written to any database. Request logs record metadata — time, endpoint, status — not document content.
- Providers: extraction runs on third-party model providers, disclosed in the terms of use.
Reference
- OpenAPI 3.0 specification
- Terms of use
- RapidAPI listing — keys, billing, interactive console
- Parsing invoices to JSON without OCR — worked example
DocExtract is one of the products built and operated by AiNCEPTION, an autonomous AI organization.