Languages API Reference | RoxyAPI
Skip to content

API Reference

Languages

List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint. Use to populate language pickers, validate user input, or auto-detect available locales in agent integrations.

Kept in this tab only. Without a key, a small daily allowance still answers every request on this page.

Get field labels for a language

GET
https://roxyapi.com/api/v2/languages/field-labels

Returns the display label for every request field name and every selectable option across the API, in the requested language. Use this to build a birth-data form, a chart widget, or an admin picker that reads in your customer language without hardcoding a word: look a field name up in `fields`, and an option up in `enums` under `{fieldName}.{value}`. Values a caller sends stay the canonical English identifier, so a translated form still submits a valid request. Labels a language has not been translated into yet return English, and the whole payload is stable enough to cache for a day.

Call it

TypeScript
import { createRoxy } from '@roxyapi/sdk'

const roxy = createRoxy(process.env.ROXY_API_KEY!)
const { data } = await roxy.languages.getFieldLabels()

Install: npm install @roxyapi/sdk

Typed SDKs in 6 languages.

Parameters

ParameterTypeDescription
lang
query, optional
string enumResponse language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English. Default en.

Response fields

FieldTypeDescription
lang
required
string enumLanguage these labels resolved to. Echoes the `lang` query parameter, or `en` when it is omitted.
fields
required
objectLabel per request field or parameter name. Keys are the wire names used in request bodies, query parameters and path parameters, such as `birthDate`, `timezone` or `houseSystem`.
enums
required
objectLabel per selectable option, keyed `{fieldName}.{value}` so the same value can read differently under different fields. For example `nodeType.mean`, `houseSystem.whole-sign` and `id.rat`. An id shared by collections with different display names is omitted. Split on the first dot: the field name is before it, and everything after it is the value you send back unchanged.

Example response

200 OK
{
  "lang": "es",
  "fields": {},
  "enums": {}
}

List supported response languages

GET
https://roxyapi.com/api/v2/languages

Returns the language codes accepted by the `lang` query parameter on every i18n-aware endpoint. Use this to populate language pickers, validate user input before calling chart or reading endpoints, or auto-detect which languages an agent integration can offer. Codes follow ISO 639-1. Endpoints without a translation for the requested language fall back to English silently.

Call it

TypeScript
import { createRoxy } from '@roxyapi/sdk'

const roxy = createRoxy(process.env.ROXY_API_KEY!)
const { data } = await roxy.languages.listLanguages()

Install: npm install @roxyapi/sdk

Typed SDKs in 6 languages.

Response fields

FieldTypeDescription
languages
required
array of objectAll language codes accepted by the `lang` query parameter.
languages[].code
required
string enumISO 639-1 language code. Pass this value as the `lang` query parameter.
languages[].name
required
stringLanguage name in English.
languages[].nativeName
required
stringLanguage name written in the language itself.

Example response

200 OK
{
  "languages": [
    {
      "code": "en",
      "name": "English",
      "nativeName": "English"
    }
  ]
}