RapidAPI logo

Sign Up

Log In

Language Identification

FREEMIUM
By MeaningCloud
Updated 2 months ago
Tools
4.3/10
Popularity Score
58ms
Latency
100%
Success Rate

Language Identification API Documentation

Automatic language detection for texts obtained from any kind of source (blog, twitter, online news and so on). Through statistic techniques based on N-grams evaluation, more than 60 languages are correctly identified.

View API Details
GETLang 2.0
GETLang 2.0

Language Identification 2.0

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AcceptSTRING
OPTIONAL
Optional Parameters
docSTRING
OPTIONALInput file with the content to analyze. The supported formats for file contents can be found at https://www.meaningcloud.com/developer/documentation/supported-formats, (if 'doc' has a value, 'url' and 'txt' must be empty)
txtSTRING
OPTIONALInput text. It can be plain text, HTML or XML, always using UTF-8 encoding, (if 'txt' has a value, 'url' and 'doc' must be empty)
urlSTRING
OPTIONALURL of the content to analyze. Currently only non-authenticated HTTP and FTP are supported. The content types supported for URL contents can be found at https://www.meaningcloud.com/developer/documentation/supported-formats, (if 'url' has a value, 'txt' and 'doc' must be empty)
thresholdNUMBER
OPTIONALLanguage detection threshold as a percentage of similarity with respect to the top result
selectionSTRING
OPTIONALList of expected languages, separated by |.
verboseSTRING
OPTIONALWhen active, it shows additional information about the languages detected.
Request Snippet
unirest.get("https://language-identification.p.rapidapi.com/lang-2.0.php?txt=Last+Friday+we+watched+a+terribly+bad+movie+called+%22K%C3%A1rate+a+muerte+en+Torremolinos%22%2C+by+an+unknown+Spanish+director.&threshold=100&verbose=n")
.header("X-RapidAPI-Host", "language-identification.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://language-identification.p.rapidapi.com/lang-2.0.php?txt=Last+Friday+we+watched+a+terribly+bad+movie+called+%22K%C3%A1rate+a+muerte+en+Torremolinos%22%2C+by+an+unknown+Spanish+director.&threshold=100&verbose=n")
.header("X-RapidAPI-Host", "language-identification.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication