Request

Requests are made using GET or POST data submissions to the API entry point. Typically, a POST method is recommended in order to overcome the parameter maximum length limit associated to the GET method.

Request

Endpoint

This is the endpoint to access the API.

Service Method Url
Text Classification POST https://api.meaningcloud.com/class-1.1 Console

If you are working with an on-premises installation, you will need to substitute api.meaningcloud.com by your own server address.

Parameters

These are the supported parameters.

Name Description Values Default
key The access key is required for making requests to any of our web services. You can get a valid access key for free just by creating an account at MeaningCloud. Required
of Output format. xml
json
Optional. Default: of=json
verbose Verbose mode. When active, it shows additional information about the classification, specifically, it shows the terms that have been used for classifying a text within a category along with how they influence the relevance of the category for the processed text. y
n
Optional. Default: verbose=n
title Descriptive title of the content. The terms relevant for the classification process found in the title will have more influence in the classification than if they were in the text. UTF-8 encoded text (plain text, HTML or XML). Optional. Default: title=""
txt Input text that's going to be classified. UTF-8 encoded text (plain text, HTML or XML). Optional. Default: txt=""
url URL with the content to classify. Currently only non-authenticated HTTP and FTP are supported. The content types supported for URL contents can be found here. Optional. Default: url=""
doc Input file with the content to analyze. The supported formats for file contents can be found here. Optional. Default: doc=""
model Classification model to use. It will define into which categories the text may be classified. See models section. Required.
categories List of prefixes of the code of the categories to which the classification is limited. Each value will be separated by '|'. All the categories that do not start with any of the prefixes specified in the list will not be taken account in the classification. For example, if only a clasification within the human interest category, the prefix used would be 0800. All the codes associated to the categories can be seen in the classification models section. Optional. Default: categories=""

Important: The fields txt, doc and url are mutually exclusive; in other words, at least one of them must not be empty (a content parameter is required), and in cases where more than one of them has a value assigned, only one will be processed. The precedence order is txt, url and doc. If title is specified, it will apply independently of the field used to send the content.

Important

The fields txt, doc and url are mutually exclusive; in other words, at least one of them must not be empty (a content parameter is required), and in cases where more than one of them has a value assigned, only one will be processed. The precedence order is txt, url and doc. If title is specified, it will apply independently of the field used to send the content.