Language and text

Detect Language API

by detectlanguage.com

Language and text Added on November 1st, 2026 Checked and working on November 1st, 2026
Visit detectlanguage.com →

What it does

Detect Language identifies the language of a piece of text, for example to route support messages or pick the right translation. Send text to the REST endpoint with your API key in an Authorization header and get JSON with the detected language codes and a confidence score, also for batches of texts. Client libraries exist for many programming languages. Free with a free API key: 1,000 requests and 1 MB of text a day; paid plans raise the limits.
  • API
  • JSON
  • REST

At a glance

API key
Needed, free · More APIs with a free key
Pricing
Free with a free API key: 1,000 requests and 1 MB of text a day; paid plans raise the limits.
Formats
JSON
Interface
REST
Provider
detectlanguage.com
Last checked
Working on November 1st, 2026

More information: https://detectlanguage.com/documentation

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

detectlanguage.com
Detect Language API

Example request

curl

curl -X POST 'https://ws.detectlanguage.com/v3/detect' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"q": "hello"}'

JavaScript

const response = await fetch("https://ws.detectlanguage.com/v3/detect", {
  method: 'POST',
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"q":"hello"}),
});
const data = await response.json();
console.log(data);

Python

import requests

response = requests.post(
    "https://ws.detectlanguage.com/v3/detect",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "q": "hello",
    },
    timeout=30,
)
print(response.json())

Replace YOUR_API_KEY with your own key.

Did it work for you?

Tell us what you found when you tried Detect Language API.