Retrieve information about world languages, including ISO codes, scripts, and regional usage.
Standards Used
- ISO 639-1
- ISO 639-3
- ISO 15924
- ISO 3166-1
The Language object#
| Field | Type | Required | Description |
|---|---|---|---|
| alpha3 | string | Yes | ISO 639-3 three-letter code. Example: eng |
| code | string | Yes | ISO 639-1 two-letter code. Example: en |
| countries | string[] | Yes | Countries where official/primary (alpha-2 codes). Example: ["US","GB","AU","CA"] |
| name | string | Yes | Language name. Example: English |
| script | string | No | Primary writing system (ISO 15924 code). Example: Latn |
Endpoints#
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pagequery | integer | No | Page number (1-indexed). Example: 1 |
| per_pagequery | integer | No | Number of results per page (1-100). Example: 20 |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data | object[] | Yes | The data items for this page. |
| pagination | object | Yes | Pagination metadata in response. |
| page | integer | Yes | Current page number. Example: 1 |
| per_page | integer | Yes | Items per page. Example: 20 |
| total_items | integer | Yes | Total number of items. Example: 100 |
| total_pages | integer | Yes | Total number of pages. Example: 5 |
Example Request
const response = await fetch(
'https://worlddataapi.com/v1/languages?page=1&per_page=20',
{
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
}
);
const data = await response.json();import requests
response = requests.get(
'https://worlddataapi.com/v1/languages',
params={
'page': 'eyJpZCI6MTB9',
'per_page': 'eyJpZCI6MTB9'
},
headers={
'X-API-Key': 'YOUR_API_KEY'
}
)
data = response.json()curl "https://worlddataapi.com/v1/languages?page=1&per_page=20"
-H "X-API-Key: YOUR_API_KEY"Error Responses
| Status | Description |
|---|---|
| 429 | Rate limit exceeded |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| identifierpath | string | Yes | Language code (ISO 639-1 or 639-3) or name |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| alpha3 | string | Yes | ISO 639-3 three-letter code. Example: eng |
| code | string | Yes | ISO 639-1 two-letter code. Example: en |
| countries | string[] | Yes | Countries where official/primary (alpha-2 codes). Example: ["US","GB","AU","CA"] |
| name | string | Yes | Language name. Example: English |
| script | string | No | Primary writing system (ISO 15924 code). Example: Latn |
Example Request
const response = await fetch(
'https://worlddataapi.com/v1/languages/example',
{
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
}
);
const data = await response.json();import requests
response = requests.get(
'https://worlddataapi.com/v1/languages/example',
headers={
'X-API-Key': 'YOUR_API_KEY'
}
)
data = response.json()curl "https://worlddataapi.com/v1/languages/example"
-H "X-API-Key: YOUR_API_KEY"Error Responses
| Status | Description |
|---|---|
| 404 | Language not found |