Skip to main content
GET
/
v1
/
languages
/
search
Search Languages
curl --request GET \
  --url https://api.example.com/v1/languages/search
{
  "data": [
    {
      "id": 123,
      "glottocode": "<string>",
      "name": "<string>",
      "matched_name": "<string>",
      "score": 123
    }
  ]
}

Request

GET https://api.langdex.co/v1/languages/search

Query Parameters

q
string
required
Search query (minimum 2 characters)
limit
integer
default:"20"
Maximum number of results (1-100)
level
string
Filter by level: family, language, or dialect
fuzzy
boolean
default:"false"
Enable fuzzy matching for typos

Response

data
array
Array of matching language objects with relevance scores

Examples

curl "https://api.langdex.co/v1/languages/search?q=mand" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": [
    {
      "id": 456,
      "glottocode": "mand1415",
      "iso639_3": "cmn",
      "name": "Mandarin Chinese",
      "matched_name": "Mandarin Chinese",
      "level": "language",
      "score": 0.95
    },
    {
      "id": 789,
      "glottocode": "mand1469",
      "iso639_3": "mnk",
      "name": "Mandinka",
      "matched_name": "Mandinka",
      "level": "language",
      "score": 0.85
    }
  ],
  "meta": {
    "query": "mand",
    "total": 12
  }
}

Search with localized names

The search also matches localized language names:
curl "https://api.langdex.co/v1/languages/search?q=日本語" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "id": 1234,
      "glottocode": "nucl1643",
      "name": "Japanese",
      "matched_name": "日本語",
      "score": 1.0
    }
  ]
}
Enable fuzzy matching for typo tolerance:
curl "https://api.langdex.co/v1/languages/search?q=japanse&fuzzy=true" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "id": 1234,
      "glottocode": "nucl1643",
      "name": "Japanese",
      "matched_name": "Japanese",
      "score": 0.92
    }
  ]
}

Filter by level

Search only for languages (not families or dialects):
curl "https://api.langdex.co/v1/languages/search?q=german&level=language" \
  -H "Authorization: Bearer YOUR_API_KEY"