Documentation

API URL


POST /api/text-language/detect

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
GET https://datpaq.com/api/v1/text-language/detect?text=This%20is%20a%20simple%20English%20sentence%20for%20language%20detection.&top=1&format=639-1&api_key=your-api-key

Successful Response

Status
HTML
200 OK
Body
Code
{
  "correlationId": "1780007487318-6jpjq22dt",
  "format": "639-1",
  "languageCode": "en",
  "languageName": "English",
  "confidence": 1,
  "iso639_3": "eng",
  "iso639_1": "en"
}

Error Response

Example
Code
400 ValidationError - Input does not satisfy detect or batch schema constraints: Validation failed for text length top/format/items limits
400 DetectionFailure - franc-all cannot produce a usable language candidate: Unable to detect language from provided text
404 NotFound - Route does not match implemented endpoints: Route not found response
429 RateLimitExceeded - Global rate limiter threshold exceeded: Too many requests in configured time window
500 InternalServerError - Unexpected runtime failure in detect or batch handlers: Internal server error response

Last Updated:  May 4, 2026