apyhub
ARTIFICIAL INTELLIGENCE · TRAVEL

Generate Travel Review Sentiment API

What it does

Travel Review Sentiment analyzes review text and returns a sentiment result for travel-related feedback. Send a review in the content field, get back a job_id, then check the job status to retrieve the analysis.

Use it when you need to classify guest comments, hotel reviews, airline feedback, or tour ratings at scale. The status endpoint returns a job record with id, type, and attributes, including the current status and a result object when the job completes.

The result contains a numeric score and an opinion value such as POSITIVE. That makes it straightforward to route reviews into dashboards, moderation queues, or analytics pipelines without parsing free-form text yourself.

Travel Review Sentiment is a good fit for applications that need asynchronous sentiment analysis of customer feedback, especially when you want a lightweight response for submission and a separate status check for the final classification.

▣ ENDPOINT 01 / 02
POST
Generate Travel Review Sentiment Submit Job
https://api.eu.apyverse.com/sharpapi/generate-travel-review-sentiment

QUICKSTART

GUIDE

Quickstart

Send the review text to get back a job ID for the sentiment analysis job.

curl -X POST "https://api.eu.apyverse.com/sharpapi/generate-travel-review-sentiment" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"The tour guide was friendly, and the trip was well organized."}'

What you'll get back

Returns a JSON object with a job_id string field identifying the created job.

{
  "job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
TRY ITLIVE · 50 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*
Provide Review text to analyze the sentiment.

About this endpoint

What it does

Submits travel review text for sentiment analysis as an asynchronous job. The request includes the review content, and the response returns a job identifier you can use to track the job.

Request Body

ParameterTypeMandatoryDescription
contentStringYesReview text to analyze the sentiment.

Response

Returns a JSON object with a job_id string field. Use this job identifier to poll the corresponding job-check endpoint for the result.

ParameterTypeMandatoryDescription
job_idStringYesIdentifier for the submitted job.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Generate Travel Review Sentiment Check Job Status
https://api.eu.apyverse.com/sharpapi/generate-travel-review-sentiment/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of an existing travel review sentiment job by its job_id.

curl -X GET "https://api.eu.apyverse.com/sharpapi/generate-travel-review-sentiment/job/status/:job_id/5de4887a-0dfd-49b6-8edb-9280e468c210" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a required data object. Inside data, id and type identify the job result, and attributes contains the job status, the sentiment type, and a result object with score and opinion.

{
  "data": {
    "id": "f85b7ac5-33cd-4796-8935-dc8c22219946",
    "type": "api_job_result",
    "attributes": {
      "status": "success",
      "type": "tth_review_sentiment",
      "result": {
        "score": 95,
        "opinion": "POSITIVE"
      }
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Checks the status of a travel review sentiment analysis job using the job identifier in the path. On success, it returns a JSON object containing a data object with the job result metadata and, when available, the sentiment result.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesThe job identifier.

Response

Returns a JSON object with a data object. The data object contains id and type strings, plus an attributes object with type, status, and result fields. The attributes.status value indicates the job state, and attributes.result contains the sentiment output when the job has completed successfully.

AttributeTypeMandatoryDescription
dataObjectYesThe job result wrapper.
data.idStringYesThe job result identifier.
data.typeStringYesThe resource type returned by the API.
data.attributesObjectYesThe result metadata object.
data.attributes.typeStringYesThe analysis type.
data.attributes.statusENUMYesThe job status. Allowed values: success, failed, running, queued.
data.attributes.resultObjectNoThe sentiment result object. Present when the job has completed successfully.
data.attributes.result.scoreIntegerYesThe sentiment score.
data.attributes.result.opinionStringYesThe sentiment opinion.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ 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.