Location · API
Language Detection
Detect the language of any text with confidence scores — power localization and routing.
POST /v1/detect/language
POST /v1/detect/language
200 OK
{ "text": "Bonjour le monde", "language": "fr", "language_name": "French", "confidence": 0.99 }
Capabilities
Why teams use it
90+ languages
Detect the language of any text.
Confidence scores
A probability for every detection.
Short-text ready
Reliable even on tweets and search queries.
Script detection
Latin, Cyrillic, CJK and more.
Real-time
Fast enough for on-the-fly routing.
Batch-ready
Detect many strings per request.
Request
Call it in your language
curl -X POST https://api.locanium.com/v1/detect/language \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{"text":"Bonjour le monde"}'
Response
What you get back
- ISO 639-1 code
languagestring - Language name
language_namestring - 0–1 confidence
confidencenumber - Writing script
scriptstring - High-confidence result
reliableboolean
Use cases
What you can build
Location family
Full parameters, errors and code samples are in the API reference.