Language Identification (Prediction)

FREEMIUM
By BigLobster
Updated 3 months ago
Text Analysis
6.4/10
Popularity Score
293ms
Latency
100%
Success Rate

Language Identification (Prediction) API Documentation

Automatic language detection for any texts. Supports over 150 languages. No training data is needed!

View API Details
POSTRecognize Language
POSTRecognize Language

Identifies the language in which the input text is written. The API returns maximum 3 detected languages and a numeric confidences between 0 and 1. Confidence close to 1 indicate 100% certainty that the identified language is true.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
textSTRING
REQUIREDText for recognition in UTF-8 encoding. Maximum length: 10.000 symbols.
Code Snippet
unirest.post("https://language-identification-prediction.p.rapidapi.com/v1/recognize-language/")
.header("X-RapidAPI-Host", "language-identification-prediction.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("text=Some text needed to detect its language")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://language-identification-prediction.p.rapidapi.com/v1/recognize-language/
Request Method: POST
Response Headers
Response Body

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.post("https://language-identification-prediction.p.rapidapi.com/v1/recognize-language/")
.header("X-RapidAPI-Host", "language-identification-prediction.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("text=Some text needed to detect its language")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication