Hirak OCR API

Text Analysis / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Hirak OCR converts images containing text into machine-readable strings, supporting over 100 languages with high accuracy. It accepts image URLs or base64-encoded images and returns the extracted text in JSON format. The API allows unlimited requests, making it practical for batch processing or high-volume workflows.

💡

Beginner Tip

You can submit either a public image URL or a base64-encoded image string — using a URL is simpler for testing since you just need a publicly accessible link to an image file.

Available Data

translated text
source language
target language
confidence score

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Hirak OCR",
    "description": "Image to text -text recognition- from image more than 100 language, accurate, unlimited requests",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

text The full text extracted from the image as a single string
confidence OCR confidence score indicating how certain the extraction is (0 to 100)
language Language code used during OCR processing, matching the lang parameter you specified

Implementation Example

const url = "https://ocr.hirak.site/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

403 Forbidden API key is missing or not passed in the correct header
Include your API key as "x-api-key: YOUR_API_KEY" in the request headers
Empty text in response The image has very low resolution or the text is unclear or stylized
Use clear, high-contrast images (at least 150 DPI) for best OCR results
Incorrect language extraction The "lang" parameter does not match the actual language in the image
Set the lang parameter to the correct ISO 639-1 code matching the image language (e.g., "ar" for Arabic)

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →