apyhub
ARTIFICIAL INTELLIGENCE · DEVELOPER TOOLS

Language Detection API

What it does

Language Detection identifies the language of a text sample and returns the result in multiple standard formats. Send a body containing text with at least 50 characters, and get back the detected language, ISO 639-3 code, ISO 639-1 iso_code, script, and a numeric confidence score.

Use Language Detection when you need to route user content, pick the right translation pipeline, or apply language-specific processing in a product workflow. It is useful for content moderation, multilingual support tools, document ingestion, and any system that needs to classify incoming text before taking the next step.

The response is compact and easy to consume in automation. You can store the language label, compare it against expected input, or use the confidence score to decide whether to fall back to manual review or a secondary detector. Because the service returns both human-readable and machine-friendly codes, it fits cleanly into search, tagging, and NLP pipelines.

If you process user-submitted text, feeds, tickets, or documents, Language Detection gives you a straightforward way to identify what language you are dealing with before you translate, index, or analyse it.

POST
Detect language from text
https://api.eu.apyverse.com/apyhub/language-detection

QUICKSTART

GUIDE

Quickstart

Send a short text sample to detect its language.

curl -X POST "https://api.eu.apyverse.com/apyhub/language-detection" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "This word checker is free and easy to use. You can choose the language it uses for validation to achieve more accurate results in your application."
}'

What you'll get back

Returns a JSON object with a data object containing language, code, iso_code, script, and confidence.

{
  "data": {
    "language": "English",
    "code": "eng",
    "iso_code": "en",
    "script": "Latin",
    "confidence": 0.9821
  }
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Text sample for language detection (minimum 50 characters).

About this endpoint

What it does

Detects the language of the provided text sample and returns language identification details in the response. The input must include a text string in the request body, and the response returns the detected language metadata.

Request Body

ParameterTypeMandatoryDescription
textStringYesText sample for language detection (minimum 50 characters).

Response

Returns a JSON object with a data object field. The data object contains the detected language details: language (String), code (String), iso_code (String), script (String), and confidence (Number).

ParameterTypeMandatoryDescription
dataObjectYesDetected language details.
data.languageStringYesLanguage name.
data.codeStringYesISO 639-3 code.
data.iso_codeStringYesISO 639-1 code.
data.scriptStringYesWriting script used by the detected language.
data.confidenceNumberYesConfidence score as a float.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.