Skip to content
HALOWERK

Textwerk

language detect

Uses franc-min 6.2 (MIT): 76 languages (82 table entries incl. script variants) with at least 8 million speakers; trigram profiles per script, single-script languages (e.g. Japanese, Korean, Greek, Thai) by script. Returns ISO 639-3 code, the ISO 639-1 code where CLDR maps one, the English language name (CLDR), up to ten ranked candidates with franc distances normalised to 0–1, the dominant Unicode script and a reliability flag (at least 30 letters and a margin of 0.1 to the runner-up)..

POST https://text.halowerk.com/v1/language-detect

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYesText to classify; only the first 2048 characters are analysed.
candidatesarrayNoRestrict detection to these ISO 639-3 codes.
min_lengthintegerNoTexts or sentences shorter than this return und.
topintegerNoNumber of ranked candidates.
per_sentencebooleanNoAlso detect the language of each sentence (mixed-language texts).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50000,
      "description": "Text to classify; only the first 2048 characters are analysed."
    },
    "candidates": {
      "type": "array",
      "minItems": 1,
      "maxItems": 76,
      "items": {
        "type": "string",
        "pattern": "^[a-z]{3}$"
      },
      "description": "Restrict detection to these ISO 639-3 codes."
    },
    "min_length": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 10,
      "description": "Texts or sentences shorter than this return und."
    },
    "top": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 3,
      "description": "Number of ranked candidates."
    },
    "per_sentence": {
      "type": "boolean",
      "default": false,
      "description": "Also detect the language of each sentence (mixed-language texts)."
    }
  }
}

Open original schema

Published input example

{
  "text": "Die Rechnung wurde gestern per E-Mail an den Kunden geschickt."
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →