Dictionary statistics
Corpus statistics.
Corpus totals for the installation: published words, definitions, examples, dialects, languages and published audio.
Read from the database on every request, so the numbers are stated counts rather than cached marketing.
Metered under the stats quota key.
Parameters
This endpoint takes no parameters.
Example request
The curl works against the live API once OZITUMA_API_KEY holds your key.
curl "https://ozituma.com/api/v1/stats" \ -H "X-API-Key: $OZITUMA_API_KEY"
The same request, raw
GET /api/v1/stats HTTP/1.1 Host: ozituma.com Accept: application/json X-API-Key: ozt_live_your_key_here
Example response
{
"words": 0,
"definitions": 0,
"examples": 0,
"dialects": 0,
"languages": 0,
"languagesWithContent": 0,
"audio": 0
}The document types the 200 response as a bare object and stops there. The keys above are the ones the implementation returns; every value is a database count, so the zeros are placeholders, not published figures.
Errors
Responses the OpenAPI document lists
| Status | What the document says |
|---|---|
200 | Counts |
401 | Missing or invalid API key |
Codes this route can return
| Status | Code | When |
|---|---|---|
| 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 declares
type: objectand does not enumerate the fields. - The document lists 200 and 401 for this operation. The route can also return 429 (
quota_exceeded) and 500 (internal_error).