Fork nlpTools on GitHub
nlpTools - Natural Language Processing Toolkit for PHP


The NLPTools API is a simple JSON over HTTP RESTful web service for natural language processing. It is especially focused on text classification and sentiment analysis.

It currently offers the following functionality:

Custom development of other domain-specific solutions are available on demand.


To analyse the sentiment of some text (in English), do a HTTP POST to with form encoded data containing the following parameters:

On success, a 200 OK response will be returned containing a JSON object with the following attributes:


Here it is an example using curl:

$ curl -d "service=sentiment_news&text=The quick brown fox jumps over the lazy dog"

Free service limits

The public API service is for evaluating the toolkit. Input text is limited to 2000 characters and a maximum of 500 queries are allowed per IP. Higher limits (e.g., for commercial purposes) are also available: