Skip to content
Menu
GET /api/v1/languages

List languages

List languages with real word counts.

Every language the platform serves, each with the number of published words and dialects it actually has.

A language with wordCount 0 is registered and coming: its corpus is still being prepared. Publishing the counts is the point — an API that hid them would have developers building against empty endpoints.

Metered under the languages quota key.

Path
/api/v1/languages
Authentication
X-API-Key required — how it works
Rate limit
Counted against the "languages" endpoint in plan_limit.
Operation id
listLanguages

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/languages" \
  -H "X-API-Key: $OZITUMA_API_KEY"

The same request, raw

GET /api/v1/languages HTTP/1.1
Host: ozituma.com
Accept: application/json
X-API-Key: ozt_live_your_key_here

Example response

{
  "data": [
    {
      "code": "igbo",
      "urlSlug": "igbo",
      "name": "Igbo",
      "nativeName": "Asụsụ Igbo",
      "tier": 1,
      "speakerCount": 45000000,
      "direction": "ltr",
      "wordCount": 0,
      "dialectCount": 0
    }
  ],
  "length": 1
}

The document types each element of data as a plain object and does not list its properties. The keys above are the ones the implementation returns; code, urlSlug, name, nativeName, tier, speakerCount and direction are reference data, while wordCount and dialectCount are database counts — the zeros are placeholders, not published figures. length is the number of items in data.

Errors

Responses the OpenAPI document lists

StatusWhat the document says
200Languages
401Missing or invalid API key

Codes this route can return

StatusCodeWhen
401missing_api_keyNo key was sent. readApiKey looks for X-API-Key first, then Authorization: Bearer <key>, and rejects the request when neither carries a value.
401invalid_api_keyThe 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.
429quota_exceededThe 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.
500internal_errorAn 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 { "data": [...], "length": <integer> } and types the elements as unconstrained objects, so it does not describe code, wordCount or any other field.
  • The route also returns a note string explaining what a zero wordCount means. The document does not list it.
  • The document lists 200 and 401 for this operation. The route can also return 429 (quota_exceeded) and 500 (internal_error).