Text Language Detector - ISO 639-3 + Confidence, 82 Langs avatar

Text Language Detector - ISO 639-3 + Confidence, 82 Langs

Pricing

from $0.40 / 1,000 detected languages

Go to Apify Store
Text Language Detector - ISO 639-3 + Confidence, 82 Langs

Text Language Detector - ISO 639-3 + Confidence, 82 Langs

Detect the language of up to 200 texts per run: ISO 639-3 code, English name, confidence and ranked alternatives (franc trigram model, in-process, texts never leave the run). $0.0005 per text — half the measured incumbent ($0.001); too-short snippets never charged. For routing and dataset splitting.

Pricing

from $0.40 / 1,000 detected languages

Rating

0.0

(0)

Developer

Broke to Built

Broke to Built

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Language Detector - ISO 639-3 Code, Name and Confidence for 82 Languages

Tell me what language this text is in. You get the ISO 639-3 code, the English language name, a confidence score, and the ranked runner-up candidates - for up to 200 texts in a single run. Detection runs in-process with no external API call, so your texts never leave the run. $0.0005 per text. Snippets too short to judge are recorded free.

Routing support tickets to the right queue, splitting a scraped dataset by language, filtering a crawl down to one market, choosing a translation pipeline, tagging user-generated content: step one is always detection, and it should cost almost nothing.

What you get

Per text, one record with these exact fields:

  • ok - true when a language was determined
  • text - your input (truncated at 280 characters in the record)
  • iso639_3 - the detected code, e.g. eng, spa, cmn. language is an alias of this field.
  • name - the English name of that language
  • confidence - 0 to 1, the relative trigram score of the winner
  • alternatives - up to 6 ranked candidates, each { iso639_3, name, score }
  • error - present instead of a verdict when the text is too short to detect. Never charged.

Example 1: one text

Input:

{ "text": "Questo e un esempio di testo scritto in italiano per il test." }

Output (real run, 2026-08-15, trimmed to the first three alternatives):

{
"ok": true,
"iso639_3": "ita",
"name": "Italian",
"confidence": 1,
"alternatives": [
{ "iso639_3": "ita", "name": "Italian", "score": 1 },
{ "iso639_3": "por", "name": "Portuguese", "score": 0.856 },
{ "iso639_3": "spa", "name": "Spanish", "score": 0.726 }
]
}

The winner always appears first in alternatives with score 1; the scores below it are relative, so a close second (0.95+) is your signal that the text is short or the two languages are near neighbours.

Example 2: bulk, splitting a scraped dataset

Input:

{
"texts": [
"El rápido zorro marrón salta sobre el perro perezoso.",
"Le renard brun rapide saute par-dessus le chien paresseux.",
"Der schnelle braune Fuchs springt über den faulen Hund."
],
"maxTexts": 200
}

Returns three records, detected spa, fra and deu respectively, one charge each. Partition your rows on iso639_3 and you have the dataset split.

When texts is filled, the single text field is ignored - you are charged for the texts you listed and nothing else.

Example 3: a snippet too short to judge

Input:

{ "text": "ok thx" }

Output:

{ "ok": false, "text": "ok thx", "error": "Text too short to detect a language (needs ~20+ characters)" }

It declines rather than guessing, and that record is not charged. This matters when you are running a support-ticket queue where a lot of messages are two words long.

Pricing

$0.0005 per text detected. No start fee. One event covers one text analyzed and returned with its code, name, confidence and ranked alternatives. A text under ~20 characters with no clear signal is recorded as ok: false and never charged, so a noisy dataset does not bill you for the noise.

Honest comparison, read from the Apify Store on 2026-08-07: the direct incumbent bgfc97/language-detector charges $0.001 per text. This is half that. Splitting a 10,000-row dataset costs $5 here against $10 there.

Also honest: if you are already running Node or Python, the underlying approach (trigram detection, via franc or langdetect) is an open-source library you can run locally for free. Pay for this when you want it as a hosted step in a pipeline, in bulk, or as a tool an AI agent can call.

When NOT to use this

  • Very short strings. Product names, usernames, single words, search queries. Trigram detection needs roughly a sentence. Under ~20 characters it refuses rather than guessing.
  • Mixed-language documents. One verdict per text, and it will be the dominant language. If you need per-paragraph or per-sentence language, split the text first and send the pieces.
  • Distinguishing near-identical languages with confidence. Norwegian and Danish, Malay and Indonesian, Bosnian and Croatian and Serbian share enormous trigram overlap. Check alternatives: if the top two scores are within a few points, treat the result as "one of these two".
  • Languages outside the 82 covered. Rarer languages get mapped to their nearest trigram neighbour rather than reported as unknown - a wrong answer with a confident-looking score.
  • Detecting the script rather than the language. If all you need is "is this Cyrillic or Latin", a Unicode range check in your own code is free and exact.

Honest limits

  • Statistical trigram detection (franc-min 6.2.0, pinned), not a neural model. Excellent on sentences and paragraphs, unreliable on fragments.
  • 82 languages, the franc-min set. Text in a language outside that set is forced into the closest match.
  • confidence is a relative score, not a probability. 1 means "best of the candidates", not "certainly correct". The gap to the runner-up is the more informative number.
  • A handful of rarer codes that can appear in alternatives have no English name in our lookup table and are shown with the ISO code repeated as the name (for example glg). The primary detection's name covers the mainstream languages.
  • Up to 200 texts per run.

FAQ

How do I detect the language of a piece of text via API? Send {"text": "..."} and read iso639_3 and name. For many texts, send texts as an array - up to 200 per run, one record each.

Why ISO 639-3 codes instead of the two-letter ones? 639-3 is unambiguous. cmn is Mandarin specifically, where the 639-1 code zh blurs every Chinese language together. If your stack needs 639-1, the mapping is a static lookup table on your side.

How accurate is it? On a normal sentence or longer in one of the 82 supported languages, trigram detection is highly reliable. Accuracy falls off with length, which is why anything under ~20 characters returns an uncharged "too short" record instead of a coin flip.

Does my text get sent to a third-party API? No. Detection runs inside the Actor process using a local model. Nothing is sent to an external service, and the only place your text is written is your own run dataset.

Can I split a scraped dataset by language? Yes, that is the main bulk use. Batch 200 rows per run, then partition on iso639_3. At $0.0005 per row, 10,000 rows is $5.

What does the confidence score actually mean? It is the winner's relative trigram score, normalized to 1. Use the distance to the second entry in alternatives as your real confidence signal: a big gap is a firm verdict, a small gap means the text is short or the languages are related.

Why did some rows come back ok: false? The text was too short to detect (roughly under 20 characters with no clear signal). It is recorded with the reason and never charged.

Can an AI agent call this as a tool? Yes, through the Apify MCP server - useful for agents that need to route or translate incoming messages before acting on them.

Use from code or AI agents

curl -s "https://api.apify.com/v2/acts/EliAI~text-language-detector/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-X POST -H 'Content-Type: application/json' \
-d '{"text": "Ceci est un exemple de texte en francais."}'

Agents: connect Apify MCP and call the EliAI/text-language-detector tool.

  • Capability: detect the language of one or many texts (ISO 639-3 + name + confidence + alternatives, 82 languages)
  • Required input: text (string) or texts (array, or one newline-separated string)
  • Returns: one record per text; iso639_3 and confidence are the headline fields
  • Bounded: 200 texts per run; failures isolate per text
  • Side effects: none (in-process detection, texts never leave the run)