Document Structure Analysis

FREEMIUM
By MeaningCloud
Updated 3 months ago
-/10
Popularity Score
-
Latency
-
Success Rate

Document Structure Analysis API Documentation

The Document Structure Analysis extracts different sections of a given document with markup content (which includes formatted documents such as PDF or Microsoft Word files), including the title, headings, abstract and parts of an email.

This process, even though it takes into account some language markers, is based mainly in the markup of the document, so it can be applied to documents in any language.

View API Details
GET/documentstructure-1.0
GET/documentstructure-1.0

Document Structure Analysis 1.0

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
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)
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)
Code Snippet
unirest.get("https://meaningcloud-document-structure-analysis-v1.p.rapidapi.com/documentstructure-1.0?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMargaret_Hamilton_(scientist)")
.header("X-RapidAPI-Host", "meaningcloud-document-structure-analysis-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://meaningcloud-document-structure-analysis-v1.p.rapidapi.com/documentstructure-1.0
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://meaningcloud-document-structure-analysis-v1.p.rapidapi.com/documentstructure-1.0?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMargaret_Hamilton_(scientist)")
.header("X-RapidAPI-Host", "meaningcloud-document-structure-analysis-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