apyhub
Back

AI Text Sentiment Analysis API

Hosted on ApyHub

What it does

Text Sentiment Analyzer lets you send a text string and get sentiment analysis back from one of three providers: ApyHub, Azure, or Google. Use it when you need to classify customer feedback, scan reviews, or triage support messages by tone.

The request body requires body.text. You can also include body.encoding, body.language, and body.requested_service to choose the provider and describe the text. If you want to run it against your own cloud account, the schema also supports provider-specific credentials under body.azure or body.google.

The response returns a data object with a provider-specific result under azure, apyhub, or google, depending on which service you requested. The schema does not expose a fixed sentiment label or score here, so plan to handle the provider response structure directly.

Use Text Sentiment Analyzer for moderation workflows, survey analysis, or any pipeline where you need a machine-readable pass on opinionated text without building your own NLP layer.

Provider (requested_service)Atoms
Azure500
Google500
ApyHub2000
POST
Analyze text sentiment
https://api.eu.apyhub.com/apyhub/analyze-text-sentiment

QUICKSTART

GUIDE

Quickstart

Send the text you want analyzed in a JSON request body.

curl -X POST "https://api.eu.apyhub.com/apyhub/analyze-text-sentiment" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"I absolutely love this new feature!", "language":"en", "requested_service":"apyhub"}'

What you'll get back

Returns a JSON object with a data object field. The data object may include azure, apyhub, and google response objects, depending on the service used.

{
  "data": {
    "azure": {},
    "apyhub": {},
    "google": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
google
Custom credentials for Google services.
google_credential_json

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

ParameterTypeMandatoryDescription
textStringYesText to analyze.
azureObjectNoCustom credentials for Azure services. See nested fields below.
azure.keyStringNoAzure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringNoAzure endpoint URL.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
googleObjectNoCustom credentials for Google services. See nested fields below.
google.google_languageStringNoTarget language locale.
google.google_credential_jsonObjectNoGoogle credential JSON object. See nested fields below.
google.google_credential_json.typeStringNoService account type.
google.google_credential_json.auth_uriStringNoAuthorization URI.
google.google_credential_json.client_idStringNoClient ID.
google.google_credential_json.token_uriStringNoToken URI.
google.google_credential_json.project_idStringNoProject ID.
google.google_credential_json.private_keyStringNoPrivate key.
google.google_credential_json.client_emailStringNoService account email.
google.google_credential_json.private_key_idStringNoPrivate key ID.
google.google_credential_json.universe_domainStringNoUniverse domain.
google.google_credential_json.client_x509_cert_urlStringNoClient X.509 certificate URL.
google.google_credential_json.auth_provider_x509_cert_urlStringNoAuth provider X.509 certificate URL.
encodingStringNoText encoding.
languageStringNoLanguage of the input text.
requested_serviceENUMNoWhich 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.

ParameterTypeMandatoryDescription
dataObjectNoContainer for provider-specific response objects.
data.azureObjectNoResponse object from Microsoft Azure Cognitive Services.
data.apyhubObjectNoResponse object from ApyHub language tools.
data.googleObjectNoResponse object from Google Cloud NLP API.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.