Shobdo Logo

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/random

Query Parameters

ParameterTypeRequiredDescription
langstringNoFilter by language. Use an ISO 639-1 code (e.g., en) or a language pair.
sourcestringNoFilter 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
  }
}

Caching

This endpoint is edge-cached for 60 seconds to prevent abuse while ensuring the word changes frequently enough to feel dynamic.

Assistant

Hi! I'm the Shobdo Assistant.
Ask me anything about the documentation.