NLP API

Sentiment Analysis API

This API allows you to perform sentiment analysis on multiple text inputs in a single request, with support for up to 10 texts per batch.

Analisis Sentimen Otomatis

Identifikasi sentimen positif, negatif, dan netral dari ulasan pelanggan, media sosial, survei, dan teks lainnya.

Confidence Score

Setiap hasil dilengkapi tingkat keyakinan model untuk membantu pengambilan keputusan yang lebih akurat.

Batch Processing

Analisis hingga 10 teks dalam satu request untuk meningkatkan efisiensi integrasi dan pemrosesan data.

🟢 Endpoint

POST https://kubus.co.id/api/v1/sentiment/batch

Enable

🔐 Headers

Use your API key to authorize requests. Replace YOUR_API_KEY with your actual key.

                Authorization: Bearer YOUR_API_KEY
                Content-Type: application/json
            
Manage Your API Keys

📦 Request Body

Send a JSON object with a list of texts:


            {
            "texts": [
                "Pelayanan sangat buruk dan tidak ramah.",
                "Saya puas dengan transaksi ini.",
                "Barang tidak sesuai dengan deskripsi."
            ]
            }

✅ Response

The API will return a list of detected sentiments with confidence:


            {
            "results": [
                {
                "confidence": 1.0,
                "sentiment": "negative",
                "text": "Pelayanan sangat buruk dan tidak ramah."
                },
                {
                "confidence": 1.0,
                "sentiment": "positive",
                "text": "Saya puas dengan transaksi ini."
                },
                {
                "confidence": 1.0,
                "sentiment": "negative",
                "text": "Barang tidak sesuai dengan deskripsi."
                }
            ],
            "status": "success"
            }

Notes

  • Each text will return its sentiment: positive, negative, or neutral.
  • confidence is a value between 0.0 and 1.0 indicating model certainty.
  • Each request can include up to 10 texts per batch. Exceeding this limit will return an error.
  • Ensure your API key is valid and not expired.