Language Detector

Language Detector

Language Detector endpoint determines which natural language given text is in.

This tool is used to automatically identify a language before using other tools for analyzing and processing texts.

Availability 24/7

The tool is available any time, every day of the year and from anywhere to give you the opportunity to use the tool when you need it and where you need it from.

Supported Languages

At present the tool supports more than 400 languages. If you want to use additional languages, please contact us.

Complete documentation

The tool has complete documentation to help you integrate your applications with our service as quickly as possible and get started.

Language Detector is used successfully as a developer tool for the rapid implementation of software components related to analysis and processing of large volume of text information in real time.

Starter
Free

300 requests/day

$0.0300 per extra ₽1.5300 per extra €0.0267 per extra
API Log History
SSL support
1 IP
Text length < 300 characters
the most popular
Business
$19/month 969/month 16.91/month

1,000 requests/day

$0.0100 per extra ₽0.5100 per extra €0.0089 per extra
API Log History
SSL support
2 IPs
Text length < 1,000 characters
HTML support
Email support
Ultra
$79/month 4,029/month 70.31/month

10,000 requests/day

$0.0010 per extra ₽0.0510 per extra €0.0009 per extra
API Log History
SSL support
5 IPs
Text length < 10,000 characters
HTML support
Priority email support

For custom pricing, features and SLAs contact us.

Basic and extended responses

Parameters

ParameterBasicExtended
Language code (ISO 639-3)
The confidence that a result is correct
Writing system (ISO 15924)
The list of also possible languages

Formats

FormatBasicExtended
JavaScript objects
JavaScript objects, with specified callback function
YAML documents
XML documents
MessagePack objects

To perform an action using the TextTemperature API, you need to send a request via HTTP to its endpoint specifying an API method, its parameters and a response format. You will then receive an API response in specified format.

Check your IPs entered correct and run a code sample:

curl -X GET "https://tt-api.tech/1.0/ping" \
        -H "Authorization: Token YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://tt-api.tech/1.0/ping",
    "method": "GET",
    "headers": {
        "authorization": "Token YOUR_API_KEY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://tt-api.tech/1.0/ping")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Token YOUR_API_KEY'

response = http.request(request)
puts response.read_body
import requests

url = "https://tt-api.tech/1.0/ping"

headers = {'authorization': 'Token YOUR_API_KEY'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var https = require("https");

var options = {
    "method": "GET",
    "hostname": "tt-api.tech",
    "path": "/1.0/ping",
    "headers": {
        "authorization": "Token YOUR_API_KEY"
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://tt-api.tech/1.0/ping",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "authorization: Token YOUR_API_KEY"
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://tt-api.tech/1.0/ping"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("authorization", "Token YOUR_API_KEY")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}

{
    "result": "Welcome to TextTemperature!"
}

API authentication

To make requests include your API key in the Authorization header in every request.

Authorization: Token YOUR_API_KEY

Endpoint Definition

We support both GET and POST methods to request the API:

GET
https://tt-api.tech/1.0/lang_detector?txt=[...]

or

POST
https://tt-api.tech/1.0/lang_detector

Request parameters

ParameterRequiredTypeDescription
txtStringAnalysed text

Request formats

FormatDescription
Form-DataHTML multipart form data
JSONJavaScript object

How to pass parameters:

Form Data:
curl -X POST "https://tt-api.tech/1.0/lang_detector" \
            -H "Authorization: Token YOUR_API_KEY" \
            -H "Content-Type: application/x-www-form-urlencoded" \
            -H "Accept: application/json" \
            -d "txt=[...]" 
JSON:
curl -X POST "https://tt-api.tech/1.0/lang_detector" \
            -H "Authorization: Token YOUR_API_KEY" \
            -H "Content-Type: application/json" \
            -H "Accept: application/json" \
            -d '{"txt": "[...]"}' 
Language code
(ISO 639-3)
Language nameSupported scripts
(ISO 15924)
abkAbkhazCyrl
aceAcehLatn
acuAchuar-ShiwiarLatn
adaDangmeLatn
adyAdygheCyrl
afrAfrikaansLatn
agrAwajúnLatn
ahoAhomAhom
aiiAssyrian Neo-AramaicSyrc
ajgAjaLatn
akaAkanLatn
alsAlbanian, ToskElba, Latn
altAltai, SouthernCyrl
amcAmahuacaLatn
ameYanesha’Latn
amhAmharicEthi
amrAmarakaeriLatn
angOld EnglishLatn, Runr
arbArabic, StandardArab
arcOfficial AramaicArmi
arlArabelaLatn
arnMapudungunLatn
astAsturianLatn
aucWaoraniLatn
avaAvarCyrl
aveAvestanAvst
ayrAymara, CentralLatn
azjAzerbaijani, NorthCyrl, Latn
bakBashkortCyrl
bamBamanankanLatn
banBaliBali, Latn
baxBamunBamu
bbaBaatonumLatn
bclBikol, CentralLatn
belBelarusianCyrl, Latn
bemBembaLatn
benBengaliBeng
bfaBariLatn
bhoBhojpuriDeva
binEdoLatn
bisBislamaLatn
bkuBuhidBuhd
bltTai DamTavt
boaBoraLatn
bodTibetan, CentralMarc, Tibt
bosBosnianCyrl, Latn
breBretonLatn
bsqBassaBass
btkBatakBatk
bucBushiLatn
bugBugisBugi, Latn
bulBulgarianCyrl
bumBuluLatn
bxrBuriat, RussiaCyrl
cabGarifunaLatn
cakKaqchikelLatn
catCatalanLatn
cbiChachiLatn
cbrKakataibo-KashiboLatn
cbsKashinawaLatn
cbtShawiLatn
cbuKandozi-ChapraLatn
ccpChakmaCakm
cdoChinese, Min DongLatn
cebCebuanoLatn
cesCzechLatn
cfmChin, FalamLatn
chaChamorroLatn
cheChechenCyrl
chjChinantec, OjitlánLatn
chkChuukeseLatn
chrCherokeeCher, Latn
chuSlavonic, ChurchCyrs, Glag
chvChuvashCyrl
cjkCokweLatn
cjmCham, EasternCham
cjsShorCyrl
ckbKurdish, CentralLatn
cmnChinese, MandarinBopo, Hans, Hant, Latn
cnhChin, HakhaLatn
cniAsháninkaLatn
cofColoradoLatn
copCopticCopt
cosCorsicanLatn
cotCaquinteLatn
cpuAshéninka, PichisLatn
crhCrimean TatarCyrl, Latn
crsSeychelles Creole FrenchLatn
csbKashubianLatn
cswCree, SwampyCans
ctdChin, TedimLatn
cymWelshLatn
dagDagbaniLatn
danDanishLatn
ddnDendiLatn
deuGermanLatf, Latn, Runr
dgaDagaare, SouthernLatn
dipDinka, NortheasternLatn
divMaldivianThaa
dyoJola-FonyiLatn
dyuJulaLatn
dzoDzongkhaTibt
egyEgyptianEgyp
ekkEstonian, StandardLatn
ellGreekGrek
emkManinkakan, EasternLatn
engEnglishDsrt, Latn, Shaw
epoEsperantoLatn
eusBasqueLatn
eveEvenCyrl
evnEvenkiCyrl
eweÉwéLatn
faoFaroeseLatn
fijFijianLatn
finFinnishLatn
fonFonLatn
fraFrenchLatn
frpArpitanLatn
fryFrisianLatn
fulFulahAdlm
furFriulianLatn
fuvFulfulde, NigerianLatn
gaaGaLatn
gagGagauzLatn
gaxOromo, Borana-Arsi-GujiLatn
gjnGonjaLatn
gkpKpelle, GuineaLatn
glaScottish GaelicLatn
gleIrishLatn, Ogam
glgGalicianLatn
glvManxLatn
gotGothicGoth
gswGerman, SwissLatn
gucWayuuLatn
gugGuaraní, ParaguayanLatn
gujGujaratiGujr
guuYanomamöLatn
gyrGuarayuLatn
hakChinese, HakkaLatn
hatHaitian CreoleLatn
hauHausaLatn
hawHawaiianLatn
hebHebrewHebr
hilHiligaynonLatn
hinHindiDeva
hltChin, MatuLatn
hluLuwianHluw
hmsMiao, Southern QiandongLatn
hniHaniLatn
hnjHmong NjuaHmng, Latn, Plrd
hnnHanunooHano
hnsHindustani, SarnamiLatn
hocHoWara
hrvCroatianLatn
hsbSorbian, UpperLatn
hunHungarianHung, Latn
husHuastecLatn
huuHuitoto, MuruiLatn
hyeArmenianArmn, Latn
ibbIbibioLatn
iboIgboLatn
idoIdoLatn
iiiNuosuYiii
ikeInuktitut, Eastern CanadianCans
iloIlocanoLatn
inaInterlinguaLatn
indIndonesianLatn
islIcelandicLatn
itaItalianLatn
javJavaneseJava, Latn
jivShuarLatn
jpnJapaneseJpan
kalGreenlandicLatn
kanKannadaKnda
katGeorgianGeor
kazKazakhCyrl, Latn
kbdKabardianCyrl
kbpKabiyèLatn
kdeMakondeLatn
keaKabuverdianuLatn
kekQ’eqchi’Latn
khaKhasiLatn
khbTalu
khkMongolian, HalhCyrl, Mong
khmKhmerKhmr
kinKinyarwandaLatn
kirKyrgyzCyrl
kjhKhakasCyrl
kkhKhünLana
kmbKimbunduLatn
kncKanuri, CentralLatn
kngKoongoLatn
koiKomi-PermyakCyrl, Perm
kooKonzoLatn
korKoreanKore
kqnKaondeLatn
krcKarachay-BalkarCyrl
kriKrioLatn
krlKarelianLatn
ktuKitubaLatn
kwiAwa-CuaiquerLatn
ladLadinoLatn
laoLaoLaoo
latLatinLatn
lbeLakCyrl
lepLepchaLepc
lezLezgiCyrl
liaLimba, West-CentralLatn
lifLimbuLimb
lijLigurianLatn
linLingalaLatn
lisLisuLisu
litLithuanianLatn
lldLadinLatn
lnsLamnso’Latn
lobLobiLatn
lotOtuhoLatn
lozLoziLatn
ltzLuxembourgishLatn
luaLuba-KasaiLatn
lueLuvaleLatn
lugGandaLatn
lunLundaLatn
lusMizoLatn
lvsLatvian, StandardLatn
madMaduraLatn
magMagahiDeva
mahMarshalleseLatn
maiMaithiliDeva, Tirh
malMalayalamMlym
mamMamLatn
marMarathiDeva
mazMazahua, CentralLatn
mcdSharanahuaLatn
mcfMatsésLatn
mdfMokshaCyrl
menMendeLatn, Mend
mhrMari, MeadowCyrl
micMi’kmaqLatn
midMandaicMand
minMinangkabauLatn
miqMískitoLatn
mkdMacedonianCyrl
mltMalteseLatn
mniMeiteiMtei
mnwMonMymr
molMoldovanCyrl
mosMòoréLatn
mriMaoriLatn
mroMruMroo
mtoMixe, TotontepecLatn
mxvMixtec, MetlatónocLatn
myaBurmeseMymr
myvErzyaCyrl
mziMazatec, IxcatlánLatn
nanChinese, Min NanLatn
navNavajoLatn
nbaNyembaLatn
nblNdebeleLatn
ndoNdongaLatn
ndsSaxon, LowLatn
nhnNahuatl, CentralLatn
nioNganasanCyrl
njoNaga, AoLatn
nkuKulango, BounaLatn
nldDutchLatn
norNorwegianLatn
notNomatsigengaLatn
npiNepaliDeva
nsoSotho, NorthernLatn
nyaChichewaLatn
nymNyamweziLatn
nynNyankoreLatn
nziNzemaLatn
ociOccitanLatn
ojbOjibwa, NorthwesternCans
osaOsageOsge
ossOsseticCyrl
oteOtomi, MezquitalLatn
palPahlaviPhli, Phlp
pamPampanganLatn
panPunjabi, EasternGuru
papPapiamentuLatn
pauPalauanLatn
pbbPáezLatn
pbuPashto, NorthernArab
pcdPicardLatn
pcmPidgin, NigerianLatn
pesPersian, IranianArab
pgdGandhariKhar
phnPhoenicianPhnx
pisPijinLatn
piuPintupi-LuritjaLatn
pltMalagasy, PlateauLatn
pnbPunjabi, WesternArab
polPolishLatn
ponPohnpeianLatn
porPortugueseLatn
povCrioulo, Upper GuineaLatn
pplNahuatLatn
prqAshéninka, PerenéLatn
prsDariArab
qucK’iche’Latn
qugQuichua, Chimborazo HighlandLatn
quhQuechua, South BolivianLatn
quyQuechua, AyacuchoLatn
quzQuechua, CuscoLatn
qvaQuechua, Ambo-PascoLatn
qvcQuechua, CajamarcaLatn
qvhQuechua, Huamalíes-Dos de Mayo HuánucoLatn
qvmQuechua, Margos-Yarowilca-LauricochaLatn
qvnQuechua, North JunínLatn
qwhQuechua, Huaylas AncashLatn
qxnQuechua, Northern Conchucos AncashLatn
qxuQuechua, Arequipa-La UniónLatn
rarCook Islands MaoriLatn
rejRejangRjng
rgnRomagnolLatn
rmnRomani, BalkanLatn
rohRomanshLatn
ronRomanianLatn
rueRusynCyrl
runRundiLatn
rupAromanianLatn
rusRussianCyrl
sagSangoLatn
sahYakutCyrl
sanSanskritDeva, Newa, Shrd
satSanthaliOlck
sazSaurashtraSaur
scnSicilianLatn
scoScotsLatn
seySecoyaLatn
shkShillukLatn
shnShanMymr
shpShipibo-ConiboLatn
sinSinhalaSinh
skrSaraikiArab
slkSlovakLatn
slvSloveneLatn
smeSaami, NorthLatn
smoSamoanLatn
smpSamaritanSamr
snaShonaLatn
sndSindhiSind
snkSoninkeLatn
snnSionaLatn
somSomaliLatn, Osma
sotSotho, SouthernLatn
spaSpanishLatn
srbSoraSora
srcSardinian, LogudoreseLatn
srpSerbianCyrl, Latn
srrSerer-SineLatn
sswSwatiLatn
sukSukumaLatn
sunSundaLatn, Sund
susSusuLatn
swbComorian, MaoreLatn
sweSwedishLatn
swhSwahiliLatn
sylSylhetiSylo
tahTahitianLatn
tamTamilTaml
tatTatarCyrl, Latn
tbwTagbanwaTagb
tbzDitammariLatn
tcaTicunaLatn
tdtTetun DiliLatn
telTeluguTelu
temThemneLatn
tetTetunLatn
tgkTajikiCyrl
tglTagalogLatn, Tglg
thaThaiThai
tirTigrignaEthi
tivTivLatn
tlyTalyshLatn
tobTobaLatn
toiTongaLatn
tojTojolabalLatn
tonTonganLatn
topTotonac, PapantlaLatn
tpiTok PisinLatn
tsnTswanaLatn
tsoTsongaLatn
tszPurepechaLatn
tukTurkmenCyrl, Latn
turTurkishLatn, Orkh
txgTangutTang
tyvTuvaCyrl
tzhTzeltalLatn
tzmTamazight, Central AtlasLatn
udmUdmurtCyrl
uigUyghurArab, Latn
ukrUkrainianCyrl
umbUmbunduLatn
uraUrarinaLatn
urdUrduArab
uznUzbek, NorthernCyrl, Latn, Qaap
vaiVaiVaii
vecVenetianLatn
venVendaLatn
vepVepsLatn
vieVietnameseHani, Latn
vmwMakhuwaLatn
volVolapükLatn
vroVõroLatn
warWaray-WarayLatn
wlnWalloonLatn
wolWolofLatn
wwaWaamaLatn
xalKalmyk-OiratCyrl
xcrCarianCari
xhoXhosaLatn
xlcLycianLyci
xldLydianLydi
xmnMiddle PersianMani
xmrMeroiticMerc, Mero
xprParthianPrti
xsmKasemLatn
yadYaguaLatn
yaoYaoLatn
yapYapeseLatn
yddYiddish, EasternHebr
ykgYukaghir, NorthernCyrl
yorYorubaLatn
yuaMaya, YucatecLatn
zamZapotec, MiahuatlánLatn
zdjComorian, NgazidjaLatn
zghTamazight, Standard MoroccanTfng
zlmMalayArab, Latn
ztuZapotec, GüiláLatn
zulZuluLatn
zybZhuang, YongbeiLatn

If you want to use additional languages, please contact us.

Response parameters

ParameterTypeDescription
codeStringLanguage code (ISO 639-3)
confidenceFloat, ∈ [0.0; 1.0]The confidence that a result is correct
writingStringWriting system (ISO 15924)
possibleListThe list of also possible languages

Response codes

CodeValueDescription
OK200Request completed successfully.
ERR_KEY_INVALID401Invalid API key.
ERR_ACCOUNT_INACTIVE403Your account is inactive.
ERR_METHOD_IS_NOT_FOUND404API Method is not found.
ERR_METHOD_IS_NOT_ALLOWED405Method is not allowed.
ERR_FORMAT_NOT_ACCEPTABLE406The specified response format is not acceptable.
ERR_PARAM_NOT_SUPPORTED412The specified parameter is not supported.
ERR_TOO_MANY_REQUESTS429Too Many Requests.

Response formats

FormatDescription
JSONJavaScript objects
JSONPJavaScript objects, with specified callback function
YAMLYAML documents
XMLXML documents
MessagePackMessagePack objects

How to get a result in different formats:

JSON:
https://tt-api.tech/1.0/lang_detector?txt=[...]
or
https://tt-api.tech/1.0/lang_detector.json/lang_detector?txt=[...]
JSONP:
https://tt-api.tech/1.0/lang_detector.jsonp/lang_detector?txt=[...]&callback=myCallBack
XML:
https://tt-api.tech/1.0/lang_detector.xml/lang_detector?txt=[...]
YAML:
https://tt-api.tech/1.0/lang_detector.yaml/lang_detector?txt=[...]
MessagePack:
https://tt-api.tech/1.0/lang_detector.msgpack/lang_detector?txt=[...]

Example of successful request

Request parameters

{
    "txt": "Weald oþþe wudu is stōw mid manigum bēamum."
}

Response code

200 Ok / JSON Language Detector

Response

{
    "result": {
        "confidence": 0.8, 
        "code": "ang", 
        "possible": [], 
        "writing": "Latn"
    }
}

Example of a request with error

Request parameters

{
    "text": "A focus stacked composite image showing head detail of Rhinotia hemistictus, a species of beetle."
}

Response code

412 Precondition Failed / JSON Language Detector

Response

{
    "errors": {
        "txt": [
            "This field is required."
        ]
    }
}
Processed requests
237,474
Average processing time
5 ms
Processing precision
86.6%

So, let's get started!

Start