Glosbe APIglosbe.com ↗
Look up word translations across language pairs via the Glosbe API. Returns translation candidates, parts of speech, definitions, and bilingual usage examples.
What is the Glosbe API?
The Glosbe API exposes 1 endpoint — translate — that returns up to several translation candidates for a given word or phrase across any supported ISO 639-1 language pair. Each result includes the translated text, parts of speech, a short definition, and bilingual usage examples drawn from Glosbe's community dictionary. The response also surfaces a summary of the top translations alongside the source and target language codes used in the lookup.
curl -X GET 'https://api.parse.bot/scraper/cd33ecb7-bea5-4ae3-8b0a-211a934b24d1/translate?word=hello&source_lang=en&target_lang=es' \ -H 'X-API-Key: $PARSE_API_KEY'
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 glosbe-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: Glosbe SDK — bounded, re-runnable; every call capped."""
from parse_apis.glosbe_com_api import Glosbe, TranslationNotFound
client = Glosbe()
# Look up a word from English to Spanish
result = client.translations.get(word="hello", target_lang="es")
print(result.word, "->", result.summary)
for entry in result.translations[:3]:
print(entry.translation, entry.parts_of_speech, entry.definition)
# Try a different language pair
result_de = client.translations.get(word="goodbye", target_lang="de", source_lang="en")
for entry in result_de.translations[:3]:
print(entry.translation, entry.definition)
for ex in entry.examples[:1]:
print(f" {ex.source} -> {ex.target}")
# Typed error handling for a non-existent translation
try:
client.translations.get(word="xyznonexistent", target_lang="es")
except TranslationNotFound as e:
print(f"not found: {e.word}")
print("exercised: translations.get")
Look up translations of a word from one language to another. Returns multiple translation candidates, each with parts of speech, a brief definition, and bilingual usage examples. The source word is matched against Glosbe's dictionary entries for the given language pair.
| Param | Type | Description |
|---|---|---|
| wordrequired | string | The word or phrase to translate. |
| source_lang | string | ISO 639-1 language code for the source language (e.g. 'en', 'fr', 'de'). |
| target_langrequired | string | ISO 639-1 language code for the target language (e.g. 'es', 'fr', 'de'). |
{
"type": "object",
"fields": {
"word": "The input word that was translated",
"summary": "Brief summary of top translations",
"source_lang": "Source language code used",
"target_lang": "Target language code used",
"translations": "Array of translation entries with translation text, parts_of_speech, definition, and examples"
},
"sample": {
"word": "hello",
"summary": "hola, aló, buenos días are the top translations of \"hello\" into Spanish.",
"source_lang": "en",
"target_lang": "es",
"translations": [
{
"examples": [
{
"source": "I said hello to Debby but she totally ignored me.",
"target": "Le dije hola a Debby, pero me ignoró totalmente."
}
],
"definition": "greeting",
"translation": "hola",
"parts_of_speech": [
"interjection",
"noun",
"masculine"
]
},
{
"examples": [
{
"source": "But Green Arrow wanted me to say hello.",
"target": "Pero Flecha Verde me pidió para darte un ¡Aló!"
}
],
"definition": "when answering the telephone",
"translation": "aló",
"parts_of_speech": [
"interjection"
]
}
]
}
}About the Glosbe API
What the translate endpoint returns
The translate endpoint accepts a required word parameter and a required target_lang ISO 639-1 code (e.g. es, fr, de). An optional source_lang parameter lets you pin the source language; if omitted, the source language is inferred. The response contains a translations array where each entry carries the translated text, a parts_of_speech label (noun, verb, adjective, etc.), a brief definition, and an examples list of bilingual sentence pairs showing the word in context.
Response fields in detail
Beyond the translations array, the response returns the original word as submitted, a summary string condensing the top translation candidates into a short human-readable snippet, and source_lang / target_lang echo fields confirming the language pair that was resolved. The examples field within each translation entry is particularly useful for disambiguation — the same word often behaves differently depending on grammatical context, and the sentence pairs expose that variation directly.
Language pair coverage
Glosbe is a community-built dictionary covering a wide range of language pairs, including many less-resourced language combinations that larger commercial dictionaries omit. Coverage depth varies by pair: high-traffic pairs like English–Spanish or English–French will return more translation candidates and more usage examples than lower-traffic pairs. Supplying explicit source_lang and target_lang values will always produce more deterministic results than relying on inference.
The Glosbe API is a managed, monitored endpoint for glosbe.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when glosbe.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 glosbe.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?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a browser extension that displays in-line translations and example sentences for selected words on any webpage.
- Populate flashcard decks with translation candidates, parts of speech, and example sentences sourced from the
translationsarray. - Add a dictionary lookup widget to a language-learning app that shows the
definitionandexamplesfields for each translation candidate. - Cross-reference
parts_of_speechlabels across multiple target languages to study grammatical gender and inflection patterns. - Generate bilingual glossaries for technical documentation by batch-translating a term list and extracting the top translation from the
summaryfield. - Power a translation validation tool that flags when a submitted translation does not appear in the returned
translationsarray for a given language pair.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Glosbe offer an official developer API?+
What does the `translations` array actually contain — is it just translated words?+
translations includes more than the translated text. It also carries a parts_of_speech label identifying the grammatical category, a definition giving a short gloss, and an examples list of bilingual sentence pairs. A single lookup for an ambiguous word may return several entries covering its different senses and grammatical roles.Can I retrieve phonetic transcriptions or audio pronunciations through this API?+
Does the API support translating full sentences or paragraphs, or is it limited to single words?+
word parameter accepts strings that may be multi-word phrases, but the endpoint is designed around dictionary-style lookups rather than machine translation of arbitrary sentences. Long free-form paragraphs are unlikely to match dictionary entries and will return limited or empty results. For sentence-level machine translation a dedicated MT API would be more appropriate. You can fork this API on Parse and revise it to point at a sentence-level translation source.How does coverage vary across language pairs?+
translations array may contain fewer entries and the examples list may be sparse or empty.