Get Entry by Word
Look up a dictionary entry using the word string directly, instead of a numeric ID. This is useful when you know the exact word you want to retrieve without performing a search first.
GET /api/v1/api/entry/{source}/word/{word}Path Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | The dictionary ID to search in. |
word | string | The word to look up. Must be URL-encoded for non-ASCII characters. |
URL Encoding
# Looking up the Bengali word "ধন্যবাদ" (thank you)
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.shobdo.me/api/v1/api/entry/DICTIONARY_ID/word/%E0%A6%A7%E0%A6%A8%E0%A7%8D%E0%A6%AF%E0%A6%AC%E0%A6%BE%E0%A6%A6"
# Most clients handle encoding automatically:
# Python: requests.get(f".../word/{word}")
# JS: fetch(`/api/v1/api/entry/{source}/word/${encodeURIComponent(word)}`)Example Request
cURL
curl -X GET "https://api.shobdo.me/api/v1/api/entry/en/word/hello" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"JavaScript
const word = "hello";
const response = await fetch(`https://api.shobdo.me/api/v1/api/entry/en/word/${encodeURIComponent(word)}`, {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await response.json();Python
import requests
from urllib.parse import quote
word = "hello"
response = requests.get(
f"https://api.shobdo.me/api/v1/api/entry/en/word/{quote(word)}",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()Example Response
The response format is identical to the Entry by ID endpoint.
{
"ok": true,
"data": {
"id": "42",
"word": "hello",
"htmlContent": "<div class=\"shobdo-entry\">...</div>",
"plainText": "Used as a greeting...",
"sourceLang": "en",
"targetLang": null,
"dictionaryId": "...",
"dictionaryName": "...",
"hasAudio": true,
"audioUrl": "https://..."
}
}Differences from Entry by ID
Lookup Key
Entry by ID: Numeric entry ID Entry by Word: Exact word string
Use Case
Entry by ID: Retrieving a specific known entry from search results Entry by Word: Quick lookup when you already know the word
Homographs
Entry by ID: Returns the specific entry for the given ID Entry by Word: Returns the first matching entry (lemma form)