AI Text Entity Sentiment Analysis API
ApyHub
500 atoms
AI tier
About
This Utility API uses AI to determine the positive or negative sentiment expressed about entities within textual content.
Utilizing numerical scores and magnitudes, this API provides an aggregated sentiment score for each entity mentioned in the text. This API is valuable for understanding nuanced opinions and sentiments expressed toward specific entities in reviews, social media, or any textual content, providing a quick and reliable solution for nuanced sentiment analysis at the entity level.
The atoms cost is subjected to change depending on the size of the input file and the provider selected. The list of providers and the atoms cost for each provider is given below:
Provider (requested_service) | Atoms |
---|---|
500 |
API Playground
This API endpoint does not have a playground yet. Please check back later.
API Documentation
input json: output json
POST
https://api.apyhub.com/ai/text/entity/sentiment/analysis
Request example
Provider (requested_service) | Atoms |
---|---|
500 |
Method:
POST
Content Type:
application/json
Request Body
Attribute | Type | Mandatory | Description |
---|---|---|---|
text | String | Yes | the textual content for which you want to perform entity sentiment analysis. - The max content size is 125,000 characters. |
encoding | String | No (use if google is selected in requested_service) | the textual content encoding format it can be UTF8 , UTF16 , UTF32 default to UTF8 ' |
requested_service | String | yes | the name of service provider. Supported providers are google |
google.key | String | yes (if google is selected in requested_service) | service key provided by google |
Sample Response
A successful request returns the entity sentiment analysis response in the output parameter specified. If the request fails, the response contains an error code and a message to help determine what went wrong.
HTTP Response Codes
The method may return one of the following HTTP status codes:
Status Code | Description |
---|---|
200 | The request was successful. |
400 | Invalid input - the file is corrupt or the supported inputs are not provided. |
401 | Required authentication information is either missing or not valid for the resource. |
500 | If any unexpected error occurs while processing the request. |
Authentication
All API requests to ApyHub services need to be authenticated. Currently we support
tokens
or basic authentication
mechanisms.
You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".Points to note:
- Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
- Use the
apy-token
as the header parameter to pass the token. - Use the
Authorization
header to send the basic authentication credentials.
Error codes
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents