Translate API
The Translate API returns machine translation as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary translate endpoint returns translated text with the detected source language and confidence, and you can translate to multiple targets, detect a language, look up a dictionary, list languages and get speech. It is built for localization, chat apps and content pipelines that need translation from one endpoint. One ReefAPI key, one shared credit pool, the standard envelope.
Real request and response JSON
Captured from the indexed primary action, translate, on .
{
"method": "POST",
"url": "https://api.reefapi.com/translate/v1/translate",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"text": "Hello, how are you?",
"target": "es"
}
}{
"ok": true,
"meta": {
"api": "translate",
"endpoint": "translate",
"mode": "live",
"latency_ms": 286.5,
"record_count": 1,
"bytes": 135,
"cache_hit": false,
"method": "gtx_web_endpoint",
"source": "google_translate",
"truncated": false
},
"data": {
"text": "¿Hola, cómo estás?",
"source_text": "Hello, how are you?",
"source": "en",
"target": "es",
"detected_source": "en",
"detection_confidence": 0.9896,
"source_language_name": "English",
"target_language_name": "Spanish"
}
}What the Translate API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| translate | Translate text into a single target language. Auto-detects the source by default and returns the detected language + confidence. Supports every script. | Ops teams call translate to get translate text into a single target language. | text, target, source |
| translate_multi | Translate the SAME text into MANY target languages in a single call — the multi-target differentiator. Pass up to 60 target codes; returns a translation for each, fanned out concurrently (≈15× faster than calling translate per language). | Developer tools call translate_multi to get translate the SAME text into MANY target languages in a single call. | text, targets, source |
| translate_batch | Translate MANY strings into ONE target language in a single call — built for catalogue work (product titles, spec values, category names). Send up to 500 strings as an array and get an array back in the SAME order, index for index. Costs ONE upstream call regardless of how many strings you send, so a 500-title page is one request instead of 500. Items the upstream could not translate are listed in `failed[]` with a reason and come back as text:null — never as an empty string and never silently dropped. | Validation workflows call translate_batch to get translate MANY strings into ONE target language in a single call. | texts, target, source |
| detect | Detect the language of a piece of text. Returns the detected language code, its name and a confidence score (0-1). Works on any script. | Data-quality teams call detect to detect the language of a piece of text. | text |
| dictionary | Word-level dictionary lookup: translate a word/short phrase and get its meanings grouped by part of speech, synonyms, back-translations and transliteration (romanization). Best for single words or short phrases. | Ops teams call dictionary to get word-level dictionary lookup. | text, target, source |
| languages | List all supported languages (code → English name). Useful to populate a language picker or validate a code before translating. | Developer tools call languages to list all supported languages (code → English name). | none |
| speak | Text-to-speech: turn text into spoken audio (MP3). Pronounces the text in the chosen language's voice/accent — works with every script (Chinese, Japanese, Arabic, Cyrillic, Turkish…). Long text is split and joined into a single MP3. Returns the audio base64-encoded inline (audio/mpeg), so no second download is needed. Pair it with 'translate' to get spoken translations. | Validation workflows call speak to get text-to-speech. | text, lang, slow |
Call translate from your stack
curl -X POST https://api.reefapi.com/translate/v1/translate \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"text":"Hello, how are you?","target":"es"}'import requests
r = requests.post(
"https://api.reefapi.com/translate/v1/translate",
headers={"x-api-key": REEF_KEY},
json={
"text": "Hello, how are you?",
"target": "es"
},
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/translate/v1/translate", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"text": "Hello, how are you?",
"target": "es"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.translate.translate with {"text":"Hello, how are you?","target":"es"}.Who uses this API and why
- Chat apps call translate to render messages in a user's language in real time.
- Localization pipelines use translate_multi to produce many locales at once.
- Apps use detect and dictionary for language handling and definitions.
Questions developers ask before integrating
What is the Translate API?
Translate API is a ReefAPI endpoint group for translate It returns live JSON through POST requests under /translate/v1.
Is the Translate API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Translate calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Translate login or account?
No login to Translate is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Translate data?
The page example is captured from a live translate call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Translate API use?
Translate actions currently cost 1 credit per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call Translate from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call translate actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the Translate API a Translate scraper?
It is the managed alternative to a DIY Translate scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same translate back as clean JSON.
Why does my Translate scraper keep getting blocked?
Most Translate scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.