Google API: Translate text
Translates up to 5,000 characters on Google Translate, with the detected source language, Latin-letter pronunciation when shown, and dictionary alternatives for words or short phrases.
Unofficial. Not affiliated with or endorsed by Google.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Text, required
text Text to translate, for example Good morning.
bank
Up to 5000 characters.
- Source Language optional
source_language Language name or code of the text, or auto-detect, for example English or auto-detect.
English
Default
auto-detect.- Target Language, required
target_language Language name or code to translate into, for example Spanish or es.
French
Input as JSON
{ "text": "bank", "source_language": "English", "target_language": "French"}Output
{ "pronunciation": null, "source_language": "English", "target_language": "French", "translated_text": "banque", "source_language_code": "en", "target_language_code": "fr", "alternative_translations": [ { "word_type": "noun", "alternative": "rive" }, { "word_type": "noun", "alternative": "banc" }, { "word_type": "noun", "alternative": "bord" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"translate.google.com/translate_text","input":{"text":"bank","source_language":"English","target_language":"French"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "translate.google.com/translate_text" , "input": { "text": "bank", "source_language": "English", "target_language": "French" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "translate.google.com/translate_text" , "input": { "text": "bank", "source_language": "English", "target_language": "French" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run translate.google.com/translate_text# with {"text":"bank","source_language":"English","target_language":"French"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "text", "target_language" ], "properties": { "text": { "type": "string", "maxLength": 5000, "description": "Text to translate, for example Good morning." }, "source_language": { "type": "string", "default": "auto-detect", "description": "Language name or code of the text, or auto-detect, for example English or auto-detect." }, "target_language": { "type": "string", "description": "Language name or code to translate into, for example Spanish or es." } }}Output schema
{ "type": "object", "required": [ "translated_text", "source_language", "target_language", "pronunciation", "alternative_translations", "source_language_code", "target_language_code" ], "properties": { "pronunciation": { "type": [ "string", "null" ], "description": "Latin-letter pronunciation of the translated text, if shown." }, "source_language": { "type": "string", "description": "Detected or chosen source language name." }, "target_language": { "type": "string", "description": "Target language name." }, "translated_text": { "type": "string", "description": "Translated text." }, "source_language_code": { "type": "string", "x-fous-developer": true }, "target_language_code": { "type": "string", "x-fous-developer": true }, "alternative_translations": { "type": "array", "items": { "type": "object", "required": [ "alternative", "word_type" ], "properties": { "word_type": { "type": "string" }, "alternative": { "type": "string" } }, "additionalProperties": false }, "description": "Other translations shown for words or short phrases." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
translate.google.com/translate_text- Returns
- translated text, source and target language, pronunciation, alternative translations
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method translate.google.com/translate_text with the inputs above.
Ask your agent
- How do you say 'Where is the nearest train station?' in Japanese, and how is it pronounced in romaji?
- Use Google Translate to turn this German paragraph into English: 'Wir freuen uns, Ihnen mitteilen zu können, dass Ihre Bestellung versandt wurde.'
- What language is 'Ninapenda kusoma vitabu' and what does it mean in English?
- Give me the Korean translation of 'thank you very much' plus any alternative ways to say it.
- Translate 'bonjour, je voudrais réserver une table pour deux' from French to Italian on Google, please.
See more
All Google methodsGets up to three Google Maps routes between two places, with distances, travel times and step-by-step directions.
google.com/get_directionsConverts an amount between two currencies using the current Google Finance quote. Rates may be delayed.
google.com/convert_currencyGets Google Search autocomplete suggestions for words typed so far, in Google's order, for a chosen country and language.
google.com/get_search_suggestionsFinds Google Flights options for a route and date with prices, local times, stops and emissions. Round-trip searches list outbound choices with their displayed round-trip fares.
google.com/search_flightsGets public user reviews for an Android app on Google Play. The app can be given by name, Play Store link, or app ID.
play.google.com/get_app_reviewsLooks up a public Google Maps place by name and location and returns its profile: address, rating, hours, phone, website and photos.
google.com/get_placeFinds places to stay in a city or area for given dates on Google Hotels, with nightly and total prices, hotel class, guest ratings, amenities, address and cheapest booking site. Optional filters for price, stars and rating; vacation rentals are left out. Prices and availability can change.
google.com/search_hotelsLooks up a Google Books book by title or ISBN. Returns its details, reader ratings and the Google Play ebook offer in a chosen country.
books.google.com/get_book