About this endpoint
What it does
Detects the language of the provided text sample and returns language identification details in the response. The input must include a text string in the request body, and the response returns the detected language metadata.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | Text sample for language detection (minimum 50 characters). |
Response
Returns a JSON object with a data object field. The data object contains the detected language details: language (String), code (String), iso_code (String), script (String), and confidence (Number).
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | Detected language details. |
| data.language | String | Yes | Language name. |
| data.code | String | Yes | ISO 639-3 code. |
| data.iso_code | String | Yes | ISO 639-1 code. |
| data.script | String | Yes | Writing script used by the detected language. |
| data.confidence | Number | Yes | Confidence score as a float. |