Send documents to DataExtract from any language or tool using an API key — no browser needed. Authenticate with your key, upload a file, and get structured text, tables and fields back as JSON.
Create a key in Account → API keys. It is shown
in full only once — store it securely. Pass it on every request in the
X-API-Key header (or as a Bearer token):
# preferred X-API-Key: nocr_sk_xxxxxxxxxxxxxxxx # also accepted Authorization: Bearer nocr_sk_xxxxxxxxxxxxxxxx
Extract text from an image in one call:
# cURL curl -X POST https://dataextract.net/upload \ -H "X-API-Key: nocr_sk_xxxxxxxx" \ -F "file=@invoice.jpg" \ -F "document_type=invoice" \ -F "ocr_engine=gpt4o" \ -F "perfect_table=true"
# Python import requests r = requests.post( "https://dataextract.net/upload", headers={"X-API-Key": "nocr_sk_xxxxxxxx"}, files={"file": open("invoice.jpg", "rb")}, data={"document_type": "invoice", "ocr_engine": "gpt4o", "perfect_table": "true"}, ) print(r.json()["text"])
// Node.js (fetch + form-data) const FormData = require("form-data"); const fs = require("fs"); const fd = new FormData(); fd.append("file", fs.createReadStream("invoice.jpg")); fd.append("document_type", "invoice"); const res = await fetch("https://dataextract.net/upload", { method: "POST", headers: { "X-API-Key": "nocr_sk_xxxxxxxx", ...fd.getHeaders() }, body: fd, }); console.log((await res.json()).text);
Processes one image or PDF. Multipart form fields:
| Field | Required | Description |
|---|---|---|
file | yes | Image (JPG/PNG) or PDF. |
document_type | no | general_purpose, invoice, medical, bank, id_document, parts_catalog, legal, khata_book, handwritten. For Indic handwriting use handwritten:devanagari (or bengali, tamil, telugu, kannada, gujarati, gurmukhi, malayalam, odia). |
ocr_engine | no | vision (default) or gpt4o (higher accuracy). |
perfect_table | no | true to AI-refine tables. |
deep_scan | no | true for recursive field extraction. |
visual_replica | no | true to build a visual-replica PDF. |
{
"doc_id": "6e5bf4df-491f-4c0a-86ad-4a06858759b8",
"text": "| SL | Date | Veh No | ... |",
"ocr_provider": "gpt4o_vision",
"points_charged": 41,
"points_remaining": 959
}
If async processing is enabled, the response instead returns {"job_id": "...", "doc_id": "...", "status": "queued"} — poll the job (see below).
Fetch the full structured result for a document any time after processing.
curl https://dataextract.net/api/v1/document/<doc_id>/json \
-H "X-API-Key: nocr_sk_xxxxxxxx"
{
"id": "6e5bf4df-...",
"filename": "invoice.jpg",
"doc_type": "invoice",
"extracted_text": "...",
"structured_data": { "fields": {...}, "pages": [...] }
}
You can also download rendered files at
/download/<doc_id>/<fmt> where fmt is
one of txt, json, csv, xlsx, docx, pdf (and tally for ledgers).
When async is enabled, poll until status is done, then fetch the result.
curl https://dataextract.net/api/v1/jobs/<job_id> \ -H "X-API-Key: nocr_sk_xxxxxxxx" # → {"status": "done", "progress": 100, "doc_id": "..."}
Each page is billed additively from the options you select:
| Operation | Points / page |
|---|---|
| Base extraction (Google Vision) | 8 |
| ChatGPT engine or handwritten/khata | +30 |
| Perfect tables | +7 |
| Deep scan | +12 |
| Visual replica PDF | +60 |
The exact charge is returned as points_charged in the upload response.
Post-processing actions cost extra: Q&A 4 pts/question,
GST check 10 pts (first run, then cached free).
Each key has two optional, independent guards (set when you create the key):
0 = unlimited). Exceeding it returns 429.0 = unlimited). Once reached, uploads return 403 while the key stays valid.Use these to safely hand a key to a third party or a single integration without exposing your whole balance.
| Status | Meaning |
|---|---|
401 | Missing, invalid or revoked API key. |
403 | Insufficient account points, or key point budget exhausted. |
429 | Key's per-minute rate limit exceeded — retry after 60s. |
400 | Bad request (missing file / unsupported format). |
500 | Processing failed — points are auto-refunded. |