RapidAPI logo

Text Similarity

FREEMIUM
By twinword
Updated 6 months ago
Text Analysis
8.7/10
Popularity Score
795ms
Latency
100%
Success Rate

Text Similarity API Documentation

Evaluate the similarity of two words, sentences, or paragraphs.

View API Details
Text Similarity
GETText Similarity (get)
POSTText Similarity (post)
GETText Similarity (get)

Evaluate the similarity of two words, sentences, or paragraphs.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
text1STRING
REQUIREDInput the first text to compare.
text2STRING
REQUIREDInput a second text to compare its similarity with the first text.
Code Snippet
unirest.get("https://twinword-text-similarity-v1.p.rapidapi.com/similarity/?text1=The+hippocampus+is+a+major+component+of+the+brains+of+humans+and+other+vertebrates.+It+belongs+to+the+limbic+system+and+plays+important+roles+in+the+consolidation+of+information+from+short-term+memory+to+long-term+memory+and+spatial+navigation.+Humans+and+other+mammals+have+two+hippocampi%2C+one+in+each+side+of+the+brain.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+located+in+the+medial+temporal+lobe%2C+underneath+the+cortical+surface.+It+contains+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.&text2=An+important+part+of+the+brains+of+humans+and+other+vertebrates+is+the+hippocampus.+It's+part+of+the+limbic+system+and+moves+information+from+short-term+to+long-term+memory.+It+also+helps+us+move+around.+Humans+and+other+mammals+have+two+hippocampi%2C+one+on+each+side.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+found+in+the+medial+temporal+lobe%2C+beneathe+the+cortical+surface.+It+has+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.")
.header("X-RapidAPI-Host", "twinword-text-similarity-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://twinword-text-similarity-v1.p.rapidapi.com/similarity/
Request Method: GET
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.get("https://twinword-text-similarity-v1.p.rapidapi.com/similarity/?text1=The+hippocampus+is+a+major+component+of+the+brains+of+humans+and+other+vertebrates.+It+belongs+to+the+limbic+system+and+plays+important+roles+in+the+consolidation+of+information+from+short-term+memory+to+long-term+memory+and+spatial+navigation.+Humans+and+other+mammals+have+two+hippocampi%2C+one+in+each+side+of+the+brain.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+located+in+the+medial+temporal+lobe%2C+underneath+the+cortical+surface.+It+contains+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.&text2=An+important+part+of+the+brains+of+humans+and+other+vertebrates+is+the+hippocampus.+It's+part+of+the+limbic+system+and+moves+information+from+short-term+to+long-term+memory.+It+also+helps+us+move+around.+Humans+and+other+mammals+have+two+hippocampi%2C+one+on+each+side.+The+hippocampus+is+a+part+of+the+cerebral+cortex%3B+and+in+primates+it+is+found+in+the+medial+temporal+lobe%2C+beneathe+the+cortical+surface.+It+has+two+main+interlocking+parts%3A+Ammon's+horn+and+the+dentate+gyrus.")
.header("X-RapidAPI-Host", "twinword-text-similarity-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication