---
title: Basic Sentiment Analysis API
slug: basic-sentiment-analysis
url: https://apyhub.com/skycraft/service/basic-sentiment-analysis
provider: Skycraft
auth: api_key
version: v1
service_type: sync
endpoints: 1
atoms: 20
mcp: true
---

# Basic Sentiment Analysis API

Detect positive, negative or neutral sentiment in text, with an overall score plus per-sentence results and confidence. Simple REST API, JSON output.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/skycraft/basic-sentiment-analysis/detect-sentiment` | What it does Analyzes the sentiment of the text passed in the request and returns sentiment results… | 20 |

## Endpoint reference

### Detect Sentiment API

`GET https://api.eu.apyhub.com/skycraft/basic-sentiment-analysis/detect-sentiment` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | query | string | yes | Example: `Happy times feel so good.`. |

#### Quickstart

Check the sentiment of a piece of text by passing it as a query parameter.

```bash
curl -X GET "https://api.eu.apyhub.com/skycraft/basic-sentiment-analysis/detect-sentiment?text=Happy%20times%20feel%20so%20good." \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with optional `document` and `sentences` fields. `document` is an object with `sentiment` (`string` or `null`), `confidence` (`integer`), and `average_confidence` (`integer`). `sentences` is an array of objects, each with `length` (`integer`), `offset` (`integer`), `sentiment` (`string` or `null`), and `confidence` (`integer`).

```json
{
  "document": {
    "sentiment": "positive",
    "confidence": 98,
    "average_confidence": 97
  },
  "sentences": [
    {
      "length": 25,
      "offset": 0,
      "sentiment": "positive",
      "confidence": 98
    }
  ]
}
```

## About

## What it does
Basic Sentiment Analysis API tells you whether a piece of text reads as positive, negative, or neutral. Send text as the `text` query parameter and get back JSON with an overall sentiment for the whole input plus a breakdown for each sentence.

`Detect Sentiment` takes `text` and returns a `document` object with the overall `sentiment`, its `confidence`, and the `average_confidence` across sentences, along with a `sentences` array where each entry gives that sentence's `sentiment`, `confidence`, and its `offset` and `length` in the original text.

Basic Sentiment Analysis API is a good fit when you need to triage customer reviews or support tickets, track tone in social posts, or flag negative passages inside longer feedback without training your own model.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/skycraft/service/basic-sentiment-analysis
