Do you have any questions? Just write us an email or ask us through the feedback section.

Response

The output contains information about the status of the request and about the categories in which the text has been classified. The information provided is the same for the different output formats and the naming convention used for all fields is lowercase_separated_by_underscore.

Response output

These are the fields included in the response document.

Name Description
status

Contains information about the extraction process and whether it has finished successfully. It is formed by a status code (code), a natural number that identifies the result, and a message (msg), a string describing the result. In addition, the field (credits) contains a natural number that indicates the credits consumed in the request and (remaining_credits) shows the number of credits left to the user to get to the credit limit.

You can find all the possible status codes returned by the API with an explanation and tips on how to manage them in our error codes catalog.

A request is any HTTP request done to the API to analyze less than 500 words. If the text sent is longer than that, then it will be considered that more than a request is made, more specifically, as many requests as we would need if the text were divided in chunks of 500 words.

For instance, an HTTP request with 1013 words, will count as three requests, so 3 credits will be consumed; an HTTP request with a text 25648 words long would count as 25648/500 = 51.296 => 52 credits, and so on.

Did you know...?

Only the successful requests to the API will consume credits. In other words, the credits specified in the answer will only count as credits consumed when code=0.

cluster_list

list of cluster objects that have been detected for the set of documents sent. Each cluster, cluster, will have the following fields:

  • title: contains the title assigned to the cluster. If more than one term is assigned, they will be separated by commas.
  • size: contains the number of documents included in the cluster.
  • score: relevance value assigned to the cluster.
  • document_list: list of documents assigned to the cluster. Each document is identified by its corresponding ID. In the case where no explicit ID has been given, the ID will be the number of the position in which the text was input. That is, the ID for the first text will be 1, etc.

Response examples

The format in which this information will be shown will depend on the value of the of parameter.

    the giraffe
    the girl
    the girl and the giraffes
{
  "status": {
    "code": "0",
    "msg": "OK",
    "credits": "0"
  },
  "cluster_list": [
    {
      "title": "Girl",
      "size": "2",
      "score": "0.16",
      "document_list": {
        "2": "the girl",
        "3": "the girl and the giraffes"
      }
    },
    {
      "title": "Giraffe",
      "size": "2",
      "score": "0.13",
      "document_list": {
        "1": "the giraffe",
        "3": "the girl and the giraffes"
      }
    }
  ]
}
<?xml version="1.0" encoding="utf-8"?>
<response>
  <status code="0" credits="3">OK</status>
  <cluster_list>
    <cluster>
      <title>Girl</title>
      <size>2</size>
      <score>0.15</score>
      <document_list>
        <document id="1">the girl</document>
        <document id="3">the girl and the giraffes</document>
      </document_list>
    </cluster>
    <cluster>
      <title>Giraffe</title>
      <size>2</size>
      <score>0.15</score>
      <document_list>
        <document id="2">the giraffe</document>
        <document id="3">the girl and the giraffes</document>
      </document_list>
    </cluster>
  </cluster_list>
</response>
  

Check the response document DTD: XML DTD.