What it does
The Language Detection API automatically identifies the language of a piece of text. Send any text of at least 50 characters and get back the language name, its ISO codes, its writing script and how confident the detection is, so you know what language you are dealing with before you translate, route or moderate it.
It is one POST endpoint with a single text field. The response comes back in a data object with five fields: language with the name, such as English, iso_code with the two-letter ISO 639-1 code, such as en, code with the three-letter ISO 639-3 code, such as eng, script with the writing system, such as Latin, and confidence as a score between 0 and 1. Use the ISO codes to pass the result straight into translation, search or localization tools, and use the confidence score to send uncertain results for review instead of acting on them.
The 50-character minimum is there for accuracy: a single word like "gift" means different things in English and German, while a full sentence gives the detector enough context to be sure. Common uses include routing support tickets to the right team, choosing the translation pipeline for incoming text, tagging user reviews and posts by language, applying language-specific search and moderation rules, and checking that content is in the language it claims to be.
To see every possible language with its probability instead of one answer, use the Detect Text Language Probabilities API. To detect the language spoken in a video, use the AI Video Language Detection API. Once you know the language, translate the text with the Translate Text API or screen it for offensive words with the CheckText Profanity API.
You can try it right here in the playground. Start for free with 5 API calls a day, no card required, and find out what language your own text is in before you commit.
The API is also available through ApyHub MCP, so AI agents can check the language of incoming text directly before deciding how to handle it.