services / language-detect
textoperational · 1 ms
Language Detection
Detect the language of a text (80+ languages) with ISO 639-1 and 639-3 codes, confidence, a reliability flag and the top candidates. Runs locally, nothing is stored. Params: text (required, up to 20,000 characters), top (number of candidates, default 3).
Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.
Call it
Input
| Field | Type | Description |
|---|---|---|
| text * | string | |
| top | integer = 3 |
Output
| Field | Type | Description |
|---|---|---|
| language | string | |
| iso639_1 | string | |
| iso639_3 | string | |
| confidence | number | |
| reliable | boolean | |
| candidates | array | |
| characters | integer |
Example response (data)
{
"language": "French",
"iso639_1": "fr",
"iso639_3": "fra",
"confidence": 0.878,
"reliable": true,
"candidates": [
{
"iso639_3": "fra",
"iso639_1": "fr",
"name": "French",
"score": 1
},
{
"iso639_3": "spa",
"iso639_1": "es",
"name": "Spanish",
"score": 0.622
}
],
"characters": 68
}