Word of the day
Deterministic daily entry.
One entry chosen deterministically from the date, so every caller gets the same word on the same day and the response can be cached.
Metered under the words quota key.
The implementation also accepts an id parameter, which fetches a specific entry instead of the day's word — useful for pinning a test. The OpenAPI document lists only language, so id is marked below as not documented.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | query | string | Optional | ISO 639-3 code or URL slug. Default ibo. |
id | query | integer | Optional | Not in the OpenAPI document. The route reads it and, when present, returns that numeric entry id instead of the day's word. |
Example request
The curl works against the live API once OZITUMA_API_KEY holds your key.
curl "https://ozituma.com/api/v1/word-of-the-day?language=ibo" \
-H "X-API-Key: $OZITUMA_API_KEY"The same request, raw
GET /api/v1/word-of-the-day?language=ibo HTTP/1.1
Host: ozituma.com
Accept: application/json
X-API-Key: ozt_live_your_key_hereExample response
{ "id": 4127, "language": "igbo", "headword": "ụlọ", "exactForm": "ulo", "slug": "ulo", "pronunciation": null, "isCommon": true, "isVerified": true, "frequencyRank": null, "glosses": ["house", "home"], "partOfSpeech": "Noun", "matchType": "headword", "score": 1, "definitions": [ { "text": "A building in which people live.", "label": null, "position": 1, "partOfSpeech": { "code": "NNC", "name": "Noun" } } ], "dialects": [], "forms": [], "scripts": [], "examples": [], "related": [], "audio": [], "attribution": { "sourceName": "Igbo API", "sourceUrl": "https://github.com/nkowaokwu/igbo_api", "license": "Apache-2.0", "licenseUrl": "https://www.apache.org/licenses/LICENSE-2.0", "citation": null } }
The document types the 200 response of this operation as a WordDetail. See the note below about the envelope the running route returns.
Errors
Responses the OpenAPI document lists
| Status | What the document says |
|---|---|
200 | The day’s entry |
401 | Missing or invalid API key |
Codes this route can return
| Status | Code | When |
|---|---|---|
| 404 | not_found | No entry matches that id or slug, or no word of the day exists for the requested language. |
| 400 | unsupported_language | The language value is not an active language code or URL slug. The message lists the codes that are available. |
| 401 | missing_api_key | No key was sent. readApiKey looks for X-API-Key first, then Authorization: Bearer <key>, and rejects the request when neither carries a value. |
| 401 | invalid_api_key | The key is not known, has been revoked, has expired, or its developer is suspended. authenticateApiKey returns null for all four, so revocation is reported through this code. |
| 429 | quota_exceeded | The key has used its whole daily allowance for the metered endpoint. The response carries Retry-After in seconds until 00:00 UTC and a details object with plan, endpoint, used and limit. |
| 500 | internal_error | An unexpected server error. The message is generic on purpose; a stack trace or a SQL error is never returned to a caller. |
The body of every failure is the same. Errors explained →
Where the document and the implementation differ
Read from the route source and the OpenAPI document together. Where the two disagree, this is what each one says.
- The document types the 200 response as a WordDetail object. The running route returns an envelope around it —
{ "date": "<YYYY-MM-DD>", "language": "<code>", "data": <WordDetail> }— and the document has not been updated to describe that. Build against the document, expect the envelope. idis read by the route but is not one of the parameters the document lists.- The document lists only 200 and 401 for this operation. The route can also return 404 (
not_found, when no word is available for the language), 400 (unsupported_language), 429 (quota_exceeded) and 500 (internal_error).