Overview

LibreTranslate is a free, open-source machine translation API that supports 17 languages. You can translate text between languages without needing an API key, making it perfect for beginners. It is self-hostable and privacy-friendly compared to commercial translation services.

Beginner Tip

You can use the public instance at https://libretranslate.com without registration for small-scale testing. For production use, consider self-hosting to avoid rate limits.

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
{
  "translatedText": "Bonjour le monde",
  "detectedSourceLanguage": "en",
  "targetLanguage": "fr"
}

Field Reference

translatedText The translated text in the target language
detectedLanguage Present when source is "auto"; contains the detected language code and confidence score
detectedLanguage.language ISO 639-1 code of the detected source language (e.g., "en", "fr")
detectedLanguage.confidence Confidence score between 0 and 1 for the language detection result

Implementation Example

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

Request
const url = "https://libretranslate.com/translate";
const response = await fetch(url);
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 The public instance may require an API key if rate limits are hit
Register for a free API key at libretranslate.com or self-host your own instance
Language code not recognized Using incorrect ISO 639-1 language codes
Use the /languages endpoint to list all supported language codes before making translation requests
429 Too Many Requests Exceeding the rate limit on the public instance
Add delays between requests or self-host LibreTranslate using Docker for unlimited usage

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 No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Beginner
Listing details not endpoint-verified

Alternatives to LibreTranslate

Technical alternatives for different use cases.

Includes language detection alongside translation

Better For

Standalone detection accuracy for rare languages

Trade-off

Combined detection and translation in one API

Free translation with multiple language support

Better For

Free translation without self-hosting complexity

Trade-off

Data privacy (LibreTranslate can be self-hosted)

Translation API with language detection

Better For

Commercial translation with reliable uptime

Trade-off

Self-hosting and open-source requirements

Recipes Using LibreTranslate

Build something with this API. Each recipe includes step-by-step instructions and code outlines.

Similar APIs

View All →