Language Detector API

Identify the language of any text in milliseconds. 176 languages, confidence scores, one simple REST endpoint.

See plans I have a license key API docs

176 languages

Built on the fastText language-identification model.

Fast

Low-latency responses, ready for real-time filtering and routing.

Confidence scores

Ranked candidates with scores, not just a single guess.

Private

Text is processed in memory and never stored or logged.

Plans

Free

500
requests / month
Start free

Basic

9,000
requests / month
Subscribe

Ultimate

50,000
requests / month
Subscribe

Get your API key

After subscribing, paste the license key from your Freemius email.

Quick start

  1. Choose a plan. Your license key arrives by email.
  2. Exchange the license key for an API key.
  3. Send text with your API key in the X-API-Key header.
curl -X POST http://lang.nilspam.xyz/v1/account/api-key \
  -H "Content-Type: application/json" \
  -d '{"license_key": "YOUR_LICENSE_KEY"}'
curl -X POST http://lang.nilspam.xyz/v1/detect \
  -H "X-API-Key: ld_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"message_text": "Bonjour, comment allez-vous ?"}'

# Response
[{"lang": "fr", "score": 0.99}]