Hirak Translation API

⭐ Beginner's Pick Text Analysis / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Hirak Translation API provides text translation between 21 widely-used languages with high accuracy and no request limits. It is straightforward to use with a simple POST request containing the source text, source language, and target language. The unlimited request policy makes it ideal for prototyping and small production projects.

💡

Beginner Tip

Specify both the source and target language using ISO 639-1 two-letter codes (e.g., "en" for English, "fr" for French) — if you leave the source language blank, the API will attempt auto-detection.

Available Data

translated text
source language
target language
confidence score

Example Response

JSON Response
{
  "translatedText": "Bonjour le monde",
  "detectedSourceLanguage": "en",
  "targetLanguage": "fr"
}

Field Reference

translation The translated text in the target language
source ISO 639-1 code of the source language used (or auto-detected) for translation
target ISO 639-1 code of the target language the text was translated into
characters Number of characters in the input text that were translated

Implementation Example

const url = "https://translate.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 not provided or is invalid
Pass your API key in the "x-api-key" header on every request
Unsupported language error The requested language pair is not among the 21 supported languages
Check the API documentation for the full list of supported language codes before sending a request
Partial or cut-off translation The input text exceeds the per-request character limit
Break long texts into smaller chunks and translate each separately, then concatenate results

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

Alternatives to Hirak Translation

Technical alternatives for different use cases.

Free translation with multiple language support

Better For

Data privacy (LibreTranslate can be self-hosted)

Trade-off

Free translation without self-hosting complexity

Similar APIs

View All →