Random Word
The Random Word endpoint is perfect for "Word of the Day" widgets or language learning tools. It fetches a truly random headword from our dictionaries.
GET /api/v1/randomQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
lang | string | No | Filter by language. Use an ISO 639-1 code (e.g., en) or a language pair. |
source | string | No | Filter by a specific dictionary ID. |
Example Request
cURL
curl -X GET "https://api.shobdo.me/api/v1/random?lang=en" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"JavaScript
const response = await fetch("https://api.shobdo.me/api/v1/random?lang=en", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await response.json();Python
import requests
response = requests.get(
"https://api.shobdo.me/api/v1/random",
params={"lang": "en"},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()Example Response
{
"ok": true,
"data": [
{
"id": "19401",
"word": "ephemeral",
"dictionaryId": "...",
"dictionaryName": "...",
"sourceLang": "en",
"targetLang": null
}
],
"meta": {
"took_ms": 23
}
}