DataScribe API Documentation

Integrate intelligent OCR into your applications in minutes

Getting Started

Base URL

https://api.datascribe.app/v1

Quick Setup

Start by getting your API key from your dashboard:

curl -X POST https://api.datascribe.app/v1/ocr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf"

Authentication

DataScribe API uses Bearer token authentication. Include your API key in the Authorization header of each request:

Authorization: Bearer YOUR_API_KEY

Security: Never expose your API key on the client side. Use it only server-side.

Endpoints

POST/ocr

Process a document and extract text via OCR

Parameters

ParameterTypeRequiredDescription
fileFileYesDocument to process (PDF, image)
languageStringNoLanguage code (auto-detection if omitted)
formatStringNoOutput format: text, json (default: text)
POST/batch

Process multiple documents in batch

Parameters

{ "files": ["file1.pdf", "file2.jpg"], "webhook_url": "https://your-app.com/webhook", "options": { "format": "json", "language": "auto" } }
GET/status/{job_id}

Check the status of an ongoing process

Code Examples

JavaScript / Node.js

const formData = new FormData(); formData.append('file', fileInput.files[0]); const response = await fetch('https://api.datascribe.app/v1/ocr', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY' }, body: formData }); const result = await response.json(); console.log(result.text);

Python

import requests url = 'https://api.datascribe.app/v1/ocr' headers = {'Authorization': 'Bearer YOUR_API_KEY'} with open('document.pdf', 'rb') as file: files = {'file': file} response = requests.post(url, headers=headers, files=files) result = response.json() print(result['text'])

cURL

curl -X POST https://api.datascribe.app/v1/ocr \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf" \ -F "format=json"

Response Format

Successful Response

{ "success": true, "text": "Extracted text from document...", "confidence": 0.998, "language": "fr", "pages": 1, "processing_time": 0.85, "metadata": { "file_size": 245760, "file_type": "application/pdf" } }

Error Codes

CodeDescriptionSolution
400Invalid requestCheck the parameters sent
401Authentication failedCheck your API key
413File too largeLimit to 50MB per file
422Unsupported formatUse PDF, JPEG, PNG or TIFF
429Rate limit reachedReduce the frequency of calls

Limits and Quotas

Technical Limits

  • • Max file size: 50MB
  • • Max pages per PDF: 500
  • • Max resolution: 10000x10000px
  • • Formats: PDF, JPEG, PNG, TIFF, BMP

Rate Limits

  • • 1000 requests/minute
  • • 10000 requests/hour
  • • Unlimited monthly volume
  • • Fair-use policy applied

SDKs and Integrations

JavaScript SDK
Available
Download
Python SDK
Available
Download
PHP SDK
In Development
Java SDK
In Development
Zapier
Coming Soon
Make.com
Coming Soon

Need Help?

Our technical team is here to help you with integration