Discover/Google API
live

Google APItranslate.google.com

Translate text between any supported languages using the Google Translate API on Parse. Handles inputs of any length with automatic pagination across 5000-char pages.

Endpoint health
monitored
translate_text
Checks pendingself-healing
Endpoints
1
Updated
2h ago

What is the Google API?

This API exposes one endpoint, translate_text, which translates a block of text from one language to another using Google Translate, returning 10 structured response fields per page including translated_text, source_lang, target_lang, and pagination metadata. Inputs of any length are automatically split into consecutive pages of up to 5000 characters each, so long documents are fully accessible across multiple requests without manual chunking.

This call costs1 credit / call— charged only on success
Try it
1-based page of the input to translate, each page covering at most 5000 characters of the input. Omitted = first page.
The text to translate. Any length; texts longer than 5000 characters are served across several pages.
ISO language code of the input text (e.g. en, fr, pt-BR) or 'auto' for automatic detection.
ISO language code of the desired output language (e.g. pt, es, pt-BR).
api.parse.bot/scraper/bb9f8819-dbd0-4662-9f4c-ea4162d6638c/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/bb9f8819-dbd0-4662-9f4c-ea4162d6638c/translate_text?text=Hello+world%2C+how+are+you+today%3F+I+hope+everything+is+going+well+with+your+project.&source_lang=en&target_lang=pt' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace translate-google-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Google Translate SDK — translate text with page control."""
from parse_apis.translate_google_com_api import GoogleTranslate, InputFormatInvalid

client = GoogleTranslate()

# Translate a short English sentence to Portuguese (defaults).
result = client.translations.translate(text="Hello world, how are you today?")
print(result.translated_text)
print(f"  {result.source_lang} → {result.target_lang}")

# Use auto-detection and a different target language.
result = client.translations.translate(
    text="Bonjour le monde",
    source_lang="auto",
    target_lang="es",
)
print(result.translated_text)
print(f"  detected: {result.detected_source_lang}")

# For long texts the API splits into pages; check total_pages and iterate.
long_text = "A very long document... " * 300
first_page = client.translations.translate(text=long_text)
print(f"page {first_page.page}/{first_page.total_pages}  chars: {first_page.page_char_count}")

if first_page.has_more:
    second_page = client.translations.translate(text=long_text, page=2)
    print(f"page {second_page.page}/{second_page.total_pages}")

# Requesting a page beyond the text raises InputFormatInvalid.
try:
    client.translations.translate(text="Short text", page=99)
except InputFormatInvalid:
    print("caught: page out of range")

print("exercised: translations.translate (default / auto-detect / paging / error)")
All endpoints · 1 totalmissing one? ·

Translates a block of text from a source language to a target language. Google Translate accepts at most 5000 characters per request, so the input text is split into consecutive pages of at most 5000 characters (cut at a newline, sentence end, or space when possible) and one page is translated per call. The response carries the translated text of the requested page, the exact source slice it corresponds to, its character offset in the full input, the total page count, and has_more; when has_more is true, call again with the same text and page+1 to continue. page defaults to 1; a page beyond total_pages returns a stale_input error. Paragraph breaks (newlines) in the input are preserved in the translation. source_lang defaults to English (en) and target_lang defaults to Portuguese (pt); source_lang may be 'auto' to let the site detect the language, in which case source_lang/detected_source_lang in the response report the detected code. An unsupported target code is not rejected by the site and returns the text unchanged. One round trip per page.

Input
ParamTypeDescription
pageinteger1-based page of the input to translate, each page covering at most 5000 characters of the input. Omitted = first page.
textrequiredstringThe text to translate. Any length; texts longer than 5000 characters are served across several pages.
source_langstringISO language code of the input text (e.g. en, fr, pt-BR) or 'auto' for automatic detection.
target_langstringISO language code of the desired output language (e.g. pt, es, pt-BR).
Response
{
  "type": "object",
  "fields": {
    "page": "integer, the page translated",
    "has_more": "boolean, true when further pages remain",
    "source_lang": "language code the translation was made from (detected code when source_lang was auto)",
    "source_text": "the exact slice of the input text this page covers",
    "target_lang": "language code of the translation",
    "total_pages": "integer, number of pages the full input spans",
    "page_char_count": "integer, characters of input covered by this page",
    "translated_text": "translation of this page's source slice, newlines preserved",
    "total_char_count": "integer, length of the full input text",
    "max_chars_per_page": "integer, the site's per-request character limit (5000)",
    "source_char_offset": "integer, 0-based offset of this page's slice in the full input",
    "detected_source_lang": "language code the site detected for the input, or null when not reported"
  },
  "sample": {
    "data": {
      "page": 1,
      "has_more": false,
      "source_lang": "en",
      "source_text": "Hello world, how are you today? I hope everything is going well with your project.",
      "target_lang": "pt",
      "total_pages": 1,
      "page_char_count": 82,
      "translated_text": "Olá mundo, como você está hoje? Espero que tudo esteja indo bem com seu projeto.",
      "total_char_count": 82,
      "max_chars_per_page": 5000,
      "source_char_offset": 0,
      "detected_source_lang": "en"
    },
    "status": "success"
  }
}

About the Google API

What the API Returns

The translate_text endpoint accepts a required text parameter of any length and returns the translated output in translated_text, along with the source_lang and target_lang codes used for that page. When source_lang is set to auto, the response reflects the detected language in the source_lang field. Each response also includes page_char_count (how many input characters this page covers) and total_char_count (the full input length).

Pagination for Long Texts

Because Google Translate enforces a 5000-character limit per request, the API handles this transparently through a page-based model. The total_pages field tells you how many pages the full input spans, and has_more is true whenever further pages remain. Request each subsequent page by passing the page parameter (1-based). Page boundaries are cut at newlines, sentence ends, or spaces where possible to avoid mid-word splits. The max_chars_per_page field in every response confirms the 5000-character ceiling.

Language Codes

Both source_lang and target_lang accept standard ISO language codes such as en, fr, pt, or regional variants like pt-BR and zh-CN. Omitting source_lang or passing auto triggers automatic language detection. The detected code is always returned in the response source_lang field, making it useful for language identification workflows independently of translation needs.

Reliability & maintenance

The Google API is a managed, monitored endpoint for translate.google.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when translate.google.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official translate.google.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Translating user-submitted content into a target language for multilingual product interfaces using target_lang
  • Detecting the language of incoming text by passing source_lang: auto and reading the source_lang field in the response
  • Paginating through a long-form document by iterating page until has_more returns false
  • Building a batch translation pipeline that uses total_pages and total_char_count to pre-calculate job size
  • Localizing news articles or blog posts into multiple languages by calling translate_text with different target_lang values
  • Identifying whether user input is in the expected language before processing it downstream
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Google Translate have an official developer API?+
Yes. Google offers the Cloud Translation API at https://cloud.google.com/translate/docs, which requires a Google Cloud account and billing setup. The Parse endpoint provides access without managing GCP credentials or quotas directly.
What does the `has_more` field tell me, and when do I need the `page` parameter?+
When your input exceeds 5000 characters, the API splits it into pages. has_more is true in any page response where subsequent pages exist. Pass the page parameter (starting at 1) to retrieve each page in sequence. total_pages tells you the exact number of requests needed to cover the full input.
Does the API return word-level or sentence-level translation confidence scores?+
Not currently. The API returns the full translated_text string for each page along with the detected or specified source_lang, but does not expose per-word, per-sentence, or aggregate confidence scores. You can fork this API on Parse and revise it to add a confidence or quality-scoring endpoint if that data becomes accessible.
Can I translate HTML or rich-text content and preserve formatting tags?+
The text parameter accepts plain strings. The API preserves newlines in translated_text as documented, but HTML tag preservation behavior depends on how the underlying service handles markup in the input. Structured document translation with guaranteed tag fidelity is not a defined feature of this endpoint. You can fork it on Parse and revise to add an endpoint that handles HTML-mode translation.
Is automatic language detection reliable for short inputs?+
Detection accuracy degrades with very short strings (single words or a few tokens) since there is less signal for the model to work from. For best results with source_lang: auto, provide at least a full sentence. The detected code is always returned in the source_lang response field regardless of input length.
Page content last updated . Spec covers 1 endpoint from translate.google.com.
Related APIs in Developer ToolsSee all →
glosbe.com API
Translate words and phrases between languages while viewing parts of speech, definitions, and real-world usage examples from Glosbe's community dictionary. Get accurate multilingual translations instantly without leaving your application.
multitran.com API
Translate words and phrases across multiple languages while browsing specialized subject areas and terminology. Explore available languages, search the dictionary index, and discover professional terms organized by field of study.
news.google.com API
Access data from news.google.com.
wordreference.com API
Search for word translations across multiple languages using WordReference's comprehensive dictionary database. Retrieve detailed meanings, usage contexts, grammatical information, and example sentences. Access public vocabulary collections and word-of-the-day features.
fonts.google.com API
Search and browse thousands of free, open-source fonts with advanced filtering and sorting options to find the perfect typeface for your project. Access detailed metadata for each font including style variants, character sets, and design specifications.
plagiarismdetector.net API
plagiarismdetector.net API
trends.google.com API
Discover what's trending right now in any country by accessing the top search topics with real-time search volume, growth rates, and related queries. Stay informed on trending categories and see which searches are gaining the most momentum in your target markets.
learn.chatgpt.com API
Access data from learn.chatgpt.com.