自訂主題分析API
五大情緒指標分析
依照⽤⼾所提供的主題關鍵字及時間段,將前述條件獲得的內容⽂本進⾏五⼤類情緒分析計算,並傳回分析的結果。
• 服務資源URL
請求方法 |
URL |
GET |
http://api.i-buzz.com.tw/v1.0/keywords/sentiment_indicators |
• 服務資源資訊
|
說明 |
返回資料格式 |
JSON |
是否需要驗證 |
是 |
更新週期 |
6⼩時,每⽇零時開始。 |
• 請求參數說明
名稱 |
必填 |
說明 |
w |
是 |
欲查詢之主題關鍵字,⾧度不可超過30字,且不得包含特殊符號(註) |
range |
是 |
回溯時間(0:當⽇ 1:⼀個⽉ 3:三個⽉ 6:六個⽉ 12:⼗⼆個⽉) |
limit |
是 |
本次請求最大返回資料數量。 |
offset |
是 |
本次返回資料的起始位置,如offset=50,則將從第51筆資料開始返回結果。 |
註:⽬前僅接受&、+、−三種符號,其他皆視為特殊符號。
• 使用範例
GET |
http://api.i-buzz.com.tw/v1.0/keywords/sentiment_indicators?w=任天堂SWitch&range=0&limit=5&offset=0 |
• 回應參數說明
名稱 |
說明 |
topic
|
主題關鍵字 |
type |
情緒類別 |
score |
情緒分數 |
• 返回結果範例
{
"code": 200, "message": "success", "paging": {
"total": 3, "limit": 5, "offset": 0,
"returned": 3
},
"data": {
"topic": "Nintendo Switch底座", "indicators": [
{
"type": "快樂", "score": "0.87"
},
{
"type": "憂愁", "score": "0.64"
},
{
"type": "厭惡", "score": "0.03"
}
]
}
}