Skip to main content

Image OCR API

Extract text from images using advanced Optical Character Recognition (OCR) technology with high accuracy and fast processing for JPG, JPEG, PNG, and WebP formats.

🚀 Key Features

  • Multi-Format Support - Process JPG, JPEG, PNG, WebP images
  • High Accuracy - Advanced OCR engine with superior text recognition
  • URL-Based Processing - Process files directly from URLs without uploads
  • Credit-Based System - Pay only for successful extractions
  • Fast Processing - Quick text extraction with minimal latency
  • Error Handling - Comprehensive validation and error responses

📋 Endpoint

POST requests only - All image OCR requests must use the POST method:

POST https://scrapingapi.qoest.com/v1/image

🔑 Authentication

All requests must include your API token in the Authorization header using Bearer authentication:

Authorization: Bearer YOUR_API_TOKEN

📊 Parameters

ParameterRequiredTypeDescription
urlYesstringURL pointing to image file (JPG, JPEG, PNG, WebP)

URL Format Requirements

  • Must be a valid HTTP/HTTPS URL
  • Must end with .jpg, .jpeg, .png, or .webp extension
  • File must be publicly accessible

💰 Pricing

Monthly Subscription Tiers

PlanPriceCreditsCost per Credit
Tier 1$10/month10,000 credits$0.001
Tier 2$50/month55,000 credits$0.0009
Tier 3$100/month115,000 credits$0.00087
Tier 4$500/month600,000 credits$0.00083
Tier 5$1,000/month1,250,000 credits$0.0008

Credit Usage

FeatureCredits Required
Image OCR1 credit per successful extraction

Usage Examples

  • Tier 1 ($10): 10,000 image OCR extractions
  • Tier 2 ($50): 55,000 image OCR extractions
  • Tier 3 ($100): 115,000 image OCR extractions

📝 Examples

Basic Image OCR

curl --location 'https://scrapingapi.qoest.com/v1/image' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/document.jpg"
}'

Response:

{
"text": "This is the extracted text from the image. The OCR engine has successfully recognized all the text content from the provided image URL."
}

Processing Different Image Formats

JPG/JPEG Images

curl --location 'https://scrapingapi.qoest.com/v1/image' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/scanned-document.jpeg"
}'

PNG Images

curl --location 'https://scrapingapi.qoest.com/v1/image' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/screenshot.png"
}'

WebP Images

curl --location 'https://scrapingapi.qoest.com/v1/image' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/modern-image.webp"
}'

📤 Response Format

Successful Response (200)

{
"text": "Extracted text content from the image"
}

Error Responses

Validation Error (422)

{
"message": "The given data was invalid.",
"errors": {
"url": [
"The url field is required.",
"The url must be a valid URL.",
"The URL must point to a valid image file (jpg, jpeg, png, webp)."
]
}
}

Insufficient Credits (403)

{
"message": "Insufficient credits"
}

Processing Failed (400)

{
"message": "Failed to process image from URL"
}

Authentication Required (401)

{
"message": "Unauthenticated."
}

⚠️ Validation Rules

URL Requirements

  • Required field: Must be a valid HTTP/HTTPS URL
  • Image URLs: Must end with supported extensions (.jpg, .jpeg, .png, .webp)
  • Accessibility: File must be publicly accessible without authentication
  • File size: Recommended maximum 10MB for optimal processing

Credit Requirements

  • Minimum balance: Must have at least 1 credit to process requests
  • Deduction timing: Credits are deducted only after successful processing
  • Failed requests: No credits deducted for failed processing attempts

🚨 Common Issues

  • Invalid URL Format: Ensure URL includes proper file extension and is publicly accessible
  • Insufficient Credits: Check credit balance before making requests
  • File Not Found: Verify the URL is correct and file exists
  • Unsupported Format: Only JPG, JPEG, PNG, WebP images are supported
  • Large Files: Very large files may timeout - consider optimizing file size
  • Authentication: Ensure Bearer token is correctly formatted and valid
  • Rate Limiting: Implement delays between requests for better success rates

🎯 Use Cases

Document Digitization

Convert scanned documents, receipts, and invoices into searchable text.

curl "https://scrapingapi.qoest.com/v1/image" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/invoice.jpg"}'

Business Process Automation

Automate data entry from forms, contracts, and business documents.

curl "https://scrapingapi.qoest.com/v1/image" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/contract.png"}'

Content Management

Extract text from images for content indexing and search functionality.

curl "https://scrapingapi.qoest.com/v1/image" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/screenshot.webp"}'

Academic Research

Extract text from research materials, handwritten notes, and academic documents.

curl "https://scrapingapi.qoest.com/v1/image" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/research-notes.jpeg"}'

📊 Best Practices

Image Quality Tips

  • High Resolution: Use images with at least 300 DPI for best results
  • Good Contrast: Ensure text has good contrast against background
  • Proper Orientation: Images should be properly oriented (not rotated)
  • Clean Images: Remove noise, shadows, and distortions when possible
  • Clear Text: Avoid blurry or pixelated text for optimal recognition

Performance Optimization

  • Batch Processing: Process multiple files in sequence rather than parallel
  • Error Handling: Automatic retries to achieve 99%+ uptime
  • Credit Monitoring: Monitor credit usage to avoid service interruption
  • URL Validation: Validate URLs before sending requests
  • File Size: Optimize large images for faster processing

Supported Image Types

  • JPG/JPEG: Best for photographs and complex images
  • PNG: Ideal for screenshots and images with text
  • WebP: Modern format with good compression and quality

👤 User Management

Check User Profile

curl --location 'https://scrapingapi.qoest.com/v1/me' \
--header 'Authorization: Bearer YOUR_TOKEN'

Response:

{
"user": {
"id": 1,
"name": "Your Name",
"email": "[email protected]",
"credits": 9850,
"created_at": "2024-01-15T10:00:00.000000Z",
"updated_at": "2024-01-15T10:00:00.000000Z"
}
}

Add Credits

curl --location 'https://scrapingapi.qoest.com/v1/add-credits' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"amount": 1000
}'

Response:

{
"message": "Credits added successfully",
"remaining_credits": 10850
}