Topics Extraction

FREEMIUM
By MeaningCloud
Updated 3 months ago
Social
6.5/10
Popularity Score
934ms
Latency
94%
Success Rate

Topics Extraction API Documentation

Topics Extraction tags locations, people, companies, dates and many other elements appearing in a text written in Spanish, English, French, Italian, Portuguese or Catalan. This detection process is carried out by combining a number of complex natural language processing techniques that allow to obtain morphological, syntactic and semantic analyses of a text and use them to identify different types of significant elements.

View API Details
GETtopics-2.0
GETtopics-2.0

Topics Extraction 2.0 is MeaningCloud's solution for extracting the different elements present in sources of information. This detection process is carried out by combining a number of complex natural language processing techniques that allow to obtain morphological, syntactic and semantic analyses of a text and use them to identify different types of significant elements.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
acceptSTRING
OPTIONAL
Required Parameters
langSTRING
REQUIREDIt specifies the language in which the text must be analyzed.
txtSTRING
REQUIREDInput text that's going to be analyzed.
ttSTRING
REQUIREDThe list of topic types to extract will be specified through a string with the letters assigned to each one of the topic types that are to be extracted.
Optional Parameters
txtfSTRING
OPTIONALThe text format parameter specifies if the text included in the txt parameter uses markup language that needs to be interpreted (known HTML tags and HTML code will be interpreted, and unknown tags will be ignored).
uwSTRING
OPTIONALDeal with unknown words. This feature adds a stage to the topic extraction in which the engine, much like a spellchecker, tries to find a suitable analysis to the unknown words resulted from the initial analysis assignment. It is specially useful to decrease the impact typos have in text analyses.
rtSTRING
OPTIONALDeal with relaxed typography. This parameter indicates how reliable the text (as far as spelling, typography, etc. are concerned) to analyze is, and influences how strict the engine will be when it comes to take these factors into account in the topic extraction.
dmSTRING
OPTIONALType of disambiguation applied. It is accumulative, that is, the semantic disambiguation mode will also include morphosyntactic disambiguation
sdgSTRING
OPTIONALSemantic disambiguation grouping. This parameter will only apply when semantic disambiguation is activated (dm=s).
udSTRING
OPTIONALThe user dictionary allows to include user-defined entities and concepts in the topics extraction.
stSTRING
OPTIONALShow subtopics.
timerefSTRING
OPTIONALThis value allows to set a specific time reference to detect the actual value of all the relative time expressions detected in the text. Format: YYYY-MM-DD hh:mm:ss GMT±HH:MM
ofSTRING
OPTIONALOutput format.
Code Snippet
unirest.get("https://topics-extraction.p.rapidapi.com/topics-2.0.php?txtf=plain&uw=n&rt=n&dm=s&sdg=l&st=n&of=json&lang=en&txt=Robert+Downey+Jr+has+topped+Forbes+magazine's+annual+list+of+the+highest+paid+actors+for+the+second+year+in+a+row.+The+49-year-old+star+of+the+Iron+Man+and+Avengers+films+made+an+estimated+%2475m+over+the+past+year%2C+beating+rivals+Dwayne+Johnson%2C+Bradley+Cooper%2C+Chris+Hemsworth+and+Leonardo+DiCaprio.&tt=a")
.header("X-RapidAPI-Host", "topics-extraction.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
General
Request URL: https://topics-extraction.p.rapidapi.com/topics-2.0.php
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://topics-extraction.p.rapidapi.com/topics-2.0.php?txtf=plain&uw=n&rt=n&dm=s&sdg=l&st=n&of=json&lang=en&txt=Robert+Downey+Jr+has+topped+Forbes+magazine's+annual+list+of+the+highest+paid+actors+for+the+second+year+in+a+row.+The+49-year-old+star+of+the+Iron+Man+and+Avengers+films+made+an+estimated+%2475m+over+the+past+year%2C+beating+rivals+Dwayne+Johnson%2C+Bradley+Cooper%2C+Chris+Hemsworth+and+Leonardo+DiCaprio.&tt=a")
.header("X-RapidAPI-Host", "topics-extraction.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