API CodexAPI Codex
WebsiteDashboardGet API Key
  • Documentation
  • All APIs
  • Changelog
Resources
  • Docs Home
  • API Catalog
  • API Codex Website
Platform
  • Get a free API key
  • Dashboard
  • APIs & Pricing

© 2026 API Codex. All rights reserved.

Information
Other endpoints
    Detect language of query textgetDetect language of body textpost
Schemas
powered by Zudoku
Language Detection API
Language Detection API

Other endpoints


Detect language of query text

GET
https://api.apicodex.io/language
/v1/detect

Detects the language of the text query parameter. Text shorter than the threshold or undetermined yields language und with reliable false (not a 400). A missing or empty text returns 400.

Detect language of query text › query Parameters

text
​string · required

The input string to analyze.

Example: El rapido zorro marron salta sobre el perro perezoso.
min_length
​integer · min: 1 · max: 1000

franc minLength threshold. Default 10, clamped to 1..1000. Text shorter than this is reported as und / not reliable.

Example: 10
Default: 10

Detect language of query text › Responses

Detection result.

DetectResult
text_length
​integer · required

Length of the analyzed text in characters.

Example: 52
language
​string · required

Top ISO 639-3 code, or und if undetermined.

Example: spa
language_name
​string · required

English name of the top language (falls back to the code).

Example: Spanish
reliable
​boolean · required

True when the top score is confident and the text is long enough; false for short/undetermined input.

Example: true
​Alternative[] · required

Up to 5 ranked candidate languages.

GET/v1/detect
curl 'https://api.apicodex.io/language/v1/detect?text=<string>&apikey=<api-key>'
Example Responses
{ "text_length": 52, "language": "spa", "language_name": "Spanish", "reliable": true, "alternatives": [ { "code": "spa", "name": "Spanish", "score": 1 }, { "code": "por", "name": "Portuguese", "score": 0.913 }, { "code": "glg", "name": "glg", "score": 0.871 }, { "code": "ita", "name": "Italian", "score": 0.842 }, { "code": "cat", "name": "Catalan", "score": 0.808 } ] }
json
application/json

Detect language of body text

POST
https://api.apicodex.io/language
/v1/detect

Same detection logic as the GET variant but accepts a JSON body, useful for long or multiline text and for constraining candidate languages via only. Body parse failure or a missing/empty text returns 400.

Detect language of body text › Request Body

text
​string · required

The input string to analyze.

Example: Le renard brun rapide saute par-dessus le chien paresseux.
min_length
​integer · min: 1 · max: 1000

franc minLength threshold (clamped 1..1000).

Default: 10
only
​string[]

Optional ISO 639-3 codes restricting candidate languages.

Example: ["fra","deu","eng"]

Detect language of body text › Responses

Detection result.

DetectResult
text_length
​integer · required

Length of the analyzed text in characters.

Example: 52
language
​string · required

Top ISO 639-3 code, or und if undetermined.

Example: spa
language_name
​string · required

English name of the top language (falls back to the code).

Example: Spanish
reliable
​boolean · required

True when the top score is confident and the text is long enough; false for short/undetermined input.

Example: true
​Alternative[] · required

Up to 5 ranked candidate languages.

POST/v1/detect
curl 'https://api.apicodex.io/language/v1/detect?apikey=<api-key>' \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "text": "Le renard brun rapide saute par-dessus le chien paresseux.", "min_length": 10, "only": [ "fra", "deu", "eng" ] }'
Example Request Body
{ "text": "Le renard brun rapide saute par-dessus le chien paresseux.", "min_length": 10, "only": [ "fra", "deu", "eng" ] }
json
Example Responses
{ "text_length": 56, "language": "fra", "language_name": "French", "reliable": true, "alternatives": [ { "code": "fra", "name": "French", "score": 1 }, { "code": "eng", "name": "English", "score": 0.74 }, { "code": "deu", "name": "German", "score": 0.69 } ] }
json
application/json