ESA Semantic Relatedness

FREEMIUM
By amtera
Updated 5 months ago
Other
3.1/10
Popularity Score
59327ms
Latency
-
Success Rate

ESA Semantic Relatedness API Documentation

Calculates the semantic relatedness/similarity between pairs of text excerpts based on the likeness of their meaning or semantic content.

View API Details
POSTRelatedness
POSTRelatedness

Calculates the semantic relatedness between pairs of text excerpts based on the likeness of their meaning or semantic content.

Authorization:

Header Authentication

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Content-TypeSTRING
REQUIRED
Required Parameters
langSTRING
REQUIREDThe language of the texts you are submitting. Supported languages are en (for English) and pt (for Portuguese).
Relatedness Request ModelJSON_STRING
REQUIRED
Code Snippet
unirest.post("https://amtera.p.rapidapi.com/relatedness/en")
.header("X-RapidAPI-Host", "amtera.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"t1":"car","t2":"engine"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://amtera.p.rapidapi.com/relatedness/{lang}
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://amtera.p.rapidapi.com/relatedness/en")
.header("X-RapidAPI-Host", "amtera.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"t1":"car","t2":"engine"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication