Everything you need to integrate BharatOCR into your application.
All API requests require an API key passed via the X-Api-Key header. Get your API key from the dashboard.
X-Api-Key: boc_your_api_key_here/api/v1/ocrExtract text from an image or PDF
Auth: X-Api-Key header
Body: multipart/form-data with 'file' field
Response: OCRResponse with pages, words, lines, and metadata
/api/v1/ocr/tableExtract tables from a document
Auth: X-Api-Key header
Body: multipart/form-data with 'file' field
Response: OCRResponse with table data in pages[].tables
/api/v1/usageGet current usage and quota
Auth: X-Api-Key header
Body: None
Response: UsageResponse with tier, pages_used, pages_remaining
/api/v1/healthCheck API health status
Auth: None
Body: None
Response: Health status of all services
{
"pages": [{
"page_number": 1,
"text": "full extracted text here",
"words": [{
"text": "word",
"confidence": 0.98,
"bbox": [x1, y1, x2, y2]
}],
"lines": [{
"text": "line text",
"confidence": 0.95
}],
"tables": [{
"rows": [["cell1", "cell2"], ["cell3", "cell4"]],
"confidence": 0.92
}],
"language": "hi"
}],
"metadata": {
"processing_time_ms": 450,
"page_count": 1,
"file_type": "pdf"
}
}curl -X POST https://api.bharatocr.com/api/v1/ocr \
-H "X-Api-Key: boc_your_api_key_here" \
-F "[email protected]"Max file size: 10MB. Max pages per PDF: 50.
Default: 60 requests per minute per API key. Contact us for higher limits on Pro and Enterprise plans.