API URL
POST /api/text-language/detect
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
text
required
string
Single detect input text with length 10 to 50000
top
optional
number
Number of top language candidates to return (1-5)
format
optional
string
Output format enum 639-3 or 639-1
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-keySuccessful Response
Status
HTML
200 OKBody
Code
{
"correlationId": "1780007487318-6jpjq22dt",
"format": "639-1",
"languageCode": "en",
"languageName": "English",
"confidence": 1,
"iso639_3": "eng",
"iso639_1": "en"
}Field
Type
correlationId
string
format
string
stats
object
stats.textLength
number
stats.candidatesFound
number
stats.topResults
number
stats.totalItems
number
stats.successful
number
stats.failed
number
languageCode
string
languageName
string
confidence
number
iso639_3
string
iso639_1
string
results
array
results.id
string
results.textLength
number
results.guesses
array
languages
array
total
number
supportedLanguages
number
francEngine
string
service
string
status
string
error
string
details
string
path
string
availableEndpoints
array
suggestion
string
message
string
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 responseLast Updated: May 4, 2026