🆕 Thai Sentimental Analysis
🆕 ระบบวิเคราะห์อารมณ์ความรู้สึก
Welcome to iApp Thai Sentimental Analysis API, an AI product developed by iApp Technology Co., Ltd. Our API provides powerful sentiment analysis capabilities for Thai text, classifying emotions and opinions into positive, negative, and neutral categories with high accuracy.
Try Demo
Visit our API Portal to test the Thai Sentimental Analysis API with your own text.
Getting Started
-
Prerequisites
- An API key from iApp Technology
- Thai text input
- Internet connection
-
Quick Start
- Fast sentiment classification
- High accuracy prediction
- Simple REST API interface
-
Key Features
- Three-way sentiment classification (Positive, Negative, Neutral)
- Confidence score for predictions
- Fast response time
- Easy integration
-
Security & Compliance
- GDPR and PDPA compliant
- No data retention after processing
How to get API Key?
Please visit API Portal to view your existing API key or request a new one.
Example
Sentiment Analysis Request
curl --location --request POST 'https://api.iapp.co.th/sentimental-analysis/predict?text=เขาเป็นคนดี ชอบช่วยเหลือผู้อื่น' \
--header 'apikey: {YOUR API KEY}'
Sentiment Analysis Response
Positive
{
"label": "pos",
"score": 0.5532798171043396
}
Neutral
{
"label": "neu",
"score": 0.8166645169258118
}
Negative
{
"label": "neg",
"score": 0.9052726626396179
}
Features & Capabilities
Core Features
- Classifies Thai text into three sentiment categories: positive, negative, and neutral.
- Utilizes advanced Natural Language Processing (NLP) techniques for accurate sentiment analysis.
- Provides insights into emotions and opinions expressed in Thai text data.
Supported Fields
- Input: Thai text for sentiment classification.
- Output: Sentiment classification result (positive, negative, or neutral).
- Confidence score for each sentiment category.
Additional Capabilities
- Easy integration into existing applications through a user-friendly API.
- Designed for real-time and batch processing.
- Ideal for use cases like social media monitoring, customer feedback analysis, and content sentiment evaluation.
API Reference
Endpoint
GET
https://api.iapp.co.th/sentimental-analysis/predict
Query Parameters
Name | Type | Description |
---|---|---|
text | String | Input Text in Thai language |
Headers
Name | Type | Description |
---|---|---|
apikey | String | API Key |
Code Examples
Python
import requests
url = "https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR TEXT}"
payload = {}
headers = {
'apikey': '{YOUR API KEY}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
JavaScript
const axios = require('axios');
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR TEXT}',
headers: {
'apikey': '{YOUR API KEY}'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR%20TEXT}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'apikey: {YOUR API KEY}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Swift
var request = URLRequest(url: URL(string: "https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR%20TEXT}")!,timeoutInterval: Double.infinity)
request.addValue("{YOUR API KEY}", forHTTPHeaderField: "apikey")
request.httpMethod = "POST"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()
Kotlin
val mediaType = "text/plain".toMediaType()
val body = "".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR TEXT}")
.post(body)
.addHeader("apikey", "{YOUR API KEY}")
.build()
val response = client.newCall(request).execute()
Java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR TEXT}")
.method("POST", body)
.addHeader("apikey", "{YOUR API KEY}")
.build();
Response response = client.newCall(request).execute();
Dart
var headers = {
'apikey': '{YOUR API KEY}'
};
var request = http.Request('POST', Uri.parse('https://api.iapp.co.th/sentimental-analysis/predict?text={YOUR TEXT}'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Pricing
AI API Service Name | Endpoint | IC Per Characters | On-Premise |
---|---|---|---|
Thai Sentimental Analysis [v1.0] | sentimental-analysis | 0.1 IC/400 Characters | Contact |