apyhub
Back
▣ ARTIFICIAL INTELLIGENCE

Language Detection & Text Tagging API

What it does

Language Detection & Text Tagging API runs core linguistic preprocessing on a piece of text. Send a sentence or passage as a single text query parameter and get back structured JSON: the detected language with confidence scores, a stemmed version of the text, or the text annotated with part-of-speech tags.

Detect Language takes text and returns a list of candidate languages, each with a language code and a confidence score, most likely first; it works best on a full sentence or more. Stem Text takes text and returns the original alongside a stemmed version where each word is reduced to its root form, so "jumping" and "jumped" match. Tag Part of Speech takes text and returns tagged_text, the same text with a grammatical tag attached to each word.

Language Detection & Text Tagging API is a good fit when you need to route user content by language, normalize text before search indexing or matching, or feed grammatical structure into a lightweight NLP pipeline without hosting your own models.

▣ ENDPOINT 01 / 03
GET
Stem Text API
https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/stem-text

QUICKSTART

GUIDE

Quickstart

Call this endpoint with your ApyHub API key:

curl "https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/stem-text?text=The%20cats%20are%20running%20in%20the%20gardens." \
  -H 'apy-token: $APY_TOKEN'

What you'll get back

{
  "original": "The cats are running in the gardens.",
  "stemmed": "The cat are run in the garden."
}
TRY ITLIVE · 20 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.

About this endpoint

What it does

Converts words in the provided text into their stemmed or root forms. This is useful for text processing and search workflows where different forms of the same word need to be treated similarly.

Query Parameter(s)

AttributeTypeDescription
textStringThe text to stem. Maximum length: 10,000 characters.

Response

Returns a JSON object containing the original text and its stemmed version.

ParameterTypeDescription
originalStringThe original text provided in the request.
stemmedStringThe text with words converted to their stemmed forms.
▣ ENDPOINT 02 / 03
GET
Detect Language API
https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/detect-language

QUICKSTART

GUIDE

Quickstart

Call this endpoint with your ApyHub API key:

curl "https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/detect-language" \?text=Das%20ist%20ein%20Text." \
  -H 'apy-token: $APY_TOKEN'
TRY ITLIVE · 20 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.

About this endpoint

What it does

Detects the language of the provided text. It supports 99 languages (Apache OpenNLP language model) and returns the candidate languages with a confidence score, most likely first. Detection works best on a full sentence or more; for a few words the confidence is low and the result less reliable.

Query Parameter(s)

AttributeTypeDescription
textStringThe text whose language you want to detect. Maximum length: 2,000 characters for Latin-script text (about 800 for other scripts, because the text is sent in the URL).

Response

Returns an array of candidate languages, sorted by confidence (highest first). Languages with a confidence of 0.01 or less are omitted.

ParameterTypeDescription
languageStringISO 639-1 code of the language (ISO 639-3 where no two-letter code exists), e.g. de.
confidenceNumberConfidence from 0 to 1 (1 = certain).

Example for "Das Wetter ist heute so schön, dass wir nach dem Mittagessen an den Strand fahren.": [{"language": "de", "confidence": 0.83}, {"language": "nds", "confidence": 0.11}]

Supported languages (99)

Starts withLanguages
AAfrikaans (af), Albanian (sq), Arabic (ar), Armenian (hy), Asturian (ast), Azerbaijani (az)
BBashkir (ba), Basque (eu), Belarusian (be), Bengali (bn), Bosnian (bs), Breton (br), Bulgarian (bg)
CCatalan (ca), Cebuano (ceb), Chechen (ce), Chinese (zh), Croatian (hr), Czech (cs)
DDanish (da), Dutch (nl)
EEnglish (en), Esperanto (eo), Estonian (et)
FFaroese (fo), Finnish (fi), French (fr)
GGalician (gl), Georgian (ka), German (de), Greek (el), Gujarati (gu)
HHebrew (he), Hindi (hi), Hungarian (hu)
IIcelandic (is), Indonesian (id), Irish (ga), Italian (it)
JJapanese (ja), Javanese (jv)
KKannada (kn), Kazakh (kk), Korean (ko), Kyrgyz (ky)
LLatin (la), Latvian (lv), Limburgish (li), Lithuanian (lt), Low German (nds), Luxembourgish (lb)
MMacedonian (mk), Malagasy (mg), Malay (ms), Malayalam (ml), Maltese (mt), Māori (mi), Marathi (mr), Min Nan (nan), Minangkabau (min), Mongolian (mn)
NNepali (ne), Norwegian Bokmål (nb), Norwegian Nynorsk (nn)
OOccitan (oc)
PPashto (ps), Persian (fa), Polish (pl), Portuguese (pt), Punjabi (pa)
RRomanian (ro), Russian (ru)
SSanskrit (sa), Serbian (sr), Sinhala (si), Slovak (sk), Slovenian (sl), Somali (so), Spanish (es), Sundanese (su), Swahili (sw), Swedish (sv), Swiss German (gsw)
TTagalog (tl), Tajik (tg), Tamil (ta), Tatar (tt), Telugu (te), Thai (th), Turkish (tr)
UUkrainian (uk), Urdu (ur), Uzbek (uz)
VVietnamese (vi), Volapük (vo)
WWaray (war), Welsh (cy), Western Frisian (fy)
ZZulu (zu)
▣ ENDPOINT 03 / 03
GET
Tag Part of Speech API
https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/tag-pos

QUICKSTART

GUIDE

Quickstart

Analyze the parts of speech in a sentence.

curl "https://api.eu.apyhub.com/skycraft/language-detection-text-tagging/tag-pos?text=The%20lazy%20dog%20jumps%20over%20the%20quick%20brown%20fox." \
  -H 'apy-token: $APY_TOKEN'

What you'll get back

{
  "tagged_text": "The/AT lazy/JJ dog/NN jumps/NNS over/UNDER the/AT quick/RB brown/JJ fox/NN"
}
TRY ITLIVE · 20 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.

About this endpoint

What it does

Identifies the part of speech of words in the provided text and returns the text with the corresponding grammatical tags.

Query Parameter(s)

AttributeTypeDescription
textStringThe text to analyze and tag. Maximum length: 2,000 characters for Latin-script text (about 800 for other scripts, because the text is sent in the URL).

Response

Returns a JSON object containing the tagged version of the input text.

ParameterTypeDescription
tagged_textStringThe input text with part-of-speech tags applied to the words.
▣ 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.