Skip to content

REST interface endpoints

Common format

The endpoints of the REST interface are the Web addresses of the API resources.

The addresses of analysis and classification resources must be requested with the HTTP POST method by sending the document to be processed. Other addresses must be requested with the HTTP GET method.

All endpoints share this format:

https://nlapi.expert.ai/v1/resource path

Document analysis resources

The format for the path of document analysis resources is:

analyze/context/language[/specific analysis resource]

For example:

https://nlapi.expert.ai/v1/analyze/standard/en/disambiguation

where:

This resource performs deep linguistic analysis for English texts using the standard context.

If the specific analysis resource is not specified, the resource corresponds to the full analysis of the document for the indicated language, for example:

https://nlapi.expert.ai/v1/analyze/standard/en

The mapping between API capabilities and resources follows:

Capability Specific analysis resource Example path for standard context and English language
Full document analysis Not specified analyze/standard/en
Deep linguistic analysis disambiguation analyze/standard/en/disambiguaton
Keyphrase extraction relevants analyze/standard/en/relevants
Named entities recognition entities analyze/standard/en/entities

Available languages ​​depend on the context.

Some examples of document analysis endpoints follow.

  • Full analysis of a Spanish text with the standard context:

    https://nlapi.expert.ai/v1/analyze/standard/es
    
  • Named entity recognition on a French text with the standard context:

    https://nlapi.expert.ai/v1/analyze/standard/fr/entities
    
  • Keyphrase extraction on an Italian text with the standard context:

    https://nlapi.expert.ai/v1/analyze/standard/it/relevants
    

Document classification resources

The path of document classification resources has this format:

categorize/taxonomy/language

For example:

https://nlapi.expert.ai/v1/categorize/iptc/en

is the resource that classifies English texts according to the iptc taxonomy.

Available languages ​​depend on the taxonomy.

Some examples of document classification endpoints:

  • Classification of an English text with the iptc taxonomy:

    https://nlapi.expert.ai/v1/categorize/iptc/en
    
  • Classification of a German text with the iptc taxonomy:

    https://nlapi.expert.ai/v1/categorize/iptc/de
    

contexts

The resource that returns the list of all the possible contexts for document analysis has this path:

contexts

The path of resource that returns the languages ​​supported by a given context has this format:

contexts/context name

For example:

https://nlapi.expert.ai/v1/contexts/standard

is the resource that returns the languages supported by the standard context.

Resources that return information about contexts must be requested with the GET method.

taxonomies

The resource that returns the list of all the possible taxonomies for document classification has this path:

taxonomies

The path of resource that returns the languages ​​supported by a given taxonomy has this format:

taxonomies/taxonomy name

For example:

https://nlapi.expert.ai/v1/taxonomies/iptc

is the resource that returns the languages supported by the iptc taxonomy.

Resources that return information about taxonomies must be requested with the GET method.