Skip to content

Request format

The document analysis, document classification and information detection capabilities of the expert.ai Natural Language API are provided by REST resources. These resources must be requested with the HTTP POST method.
The applicable REST metaphor is that if you post your text to the resource, the response will contain the analysis, the classification or the detected information, based on the type of resource that you request.

The text to process must be included in a JSON object with the following format:

{
    "document": {
        "text": "Your text here."
    }
}

The text must be UTF-8 encoded and the Content-Type header of the request must be set to:

application/json; charset=utf-8

The maximum size of the request is 10KB.