About this endpoint
What it does
Analyzes the sentiment of the submitted text. The request body must include text, and you can optionally provide provider-specific credentials or choose which service to use via requested_service; the response returns a JSON object with a data object containing provider-specific result objects.
Request Body
| Parameter | Type | Description |
|---|---|---|
| text | String | Text to analyze. |
| azure | Object | Custom credentials for Azure services. See nested fields below. |
| azure.key | String | Azure subscription key. |
| azure.region | String | Azure service region. |
| azure.endpoint | String | Azure endpoint URL. |
| azure.account_id | String | Azure account ID. |
| azure.access_token | String | OAuth access token for Azure service. |
| Object | Custom credentials for Google services. See nested fields below. | |
| google.google_language | String | Target language locale. |
| google.google_credential_json | Object | Google credential JSON object. See nested fields below. |
| google.google_credential_json.type | String | Service account type. |
| google.google_credential_json.auth_uri | String | Authorization URI. |
| google.google_credential_json.client_id | String | Client ID. |
| google.google_credential_json.token_uri | String | Token URI. |
| google.google_credential_json.project_id | String | Project ID. |
| google.google_credential_json.private_key | String | Private key. |
| google.google_credential_json.client_email | String | Service account email. |
| google.google_credential_json.private_key_id | String | Private key ID. |
| google.google_credential_json.universe_domain | String | Universe domain. |
| google.google_credential_json.client_x509_cert_url | String | Client X.509 certificate URL. |
| google.google_credential_json.auth_provider_x509_cert_url | String | Auth provider X.509 certificate URL. |
| encoding | String | Text encoding. |
| language | String | Language of the input text. |
| requested_service | ENUM | Which provider to use. Allowed values: azure, google, apyhub. Default: apyhub. |
Response
Returns a JSON object with a data object field. The data object may contain provider-specific result objects for azure, apyhub, and/or google, depending on the requested service and runtime behavior.
| Parameter | Type | Description |
|---|---|---|
| data | Object | Container for provider-specific response objects. |
| data.azure | Object | Response object from Microsoft Azure Cognitive Services. |
| data.apyhub | Object | Response object from ApyHub language tools. |
| data.google | Object | Response object from Google Cloud NLP API. |



