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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

translated text
source language
target language
confidence score

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://ocr.hirak.site/api/v1/image-to-text";
// 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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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)

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →