Skip to content
Catalog

cn8/text-language

Send a `texts` array and get one detection per text in `data.results`. Each detection

Learn more about Language Detection
Text NLPsyncInstant previewtextanalysisnlp

Try it

Texts to detectOne text per line — any language.

Result

Results show up here

The sample input is ready — just hit Run.

Overview

Send a texts array and get one detection per text in data.results. Each detection includes an ISO 639-1 code (en, tr, es, …), a full language_name, and a confidence score. Responses are synchronous and fast. Ideal for routing content, measuring language distribution, and pre-processing before language-specific services.

Key capabilities

75+ languages

Detects major and many minor languages, returning standard ISO 639-1 codes.

Confidence per detection

Every detection includes a confidence score from 0 to 1.

Language name included

Each result returns both the code and the full language name.

Fast

Lightweight detection, typically sub-second.

When to use it

Content routing

Send text to the right translator, locale or language-specific pipeline.

Analytics

Measure the language mix in user-generated content.

Pre-processing

Detect language before feeding text into language-specific services like sentiment or NER.

Input & output

input

A texts array of strings — one detection is produced per text.

JSON body

output

results[] with a language code, language_name and confidence per text.

JSON

Guides & tips

How it works

  • Each text in the texts array is matched to its most likely language.
  • You get back the ISO 639-1 code, the full language name, and a confidence score, one entry per text in data.results.
  • For mixed-language text, the dominant language is returned.

Tips

  • Use the field name texts (an array); you can include several texts in one request, and the price is per request.
  • The top match is returned per text — there's no separate list of alternative candidates.
  • For reliable results, send at least a full sentence; very short strings (under 10 characters) score lower.

Specs

Latency
Typically 0.1–0.5 seconds
Async
false
Rate Limit
Per API key
Max Input
No hard limit; very short strings (under 10 characters) may reduce accuracy

Schema

Request body

textsrequiredarray<string>

Array of texts. Each text produces one results[] entry.

Response

results[].languagestring

ISO 639-1 code (e.g. en, tr, es, fr).

results[].language_namestring

Full language name (e.g. Turkish, English, French).

results[].confidencenumber

Confidence score, from 0 to 1.

Pricing

Billed per request.

ServiceUnitPrice
Language Detectionitem$0.001/request

FAQ

Related models