參數欄位說明
欄位 |
型態 |
說明 |
keyword |
string |
*required 搜尋關鍵字,需使用雙引號,例:"口罩" |
type |
string |
搜尋類別 title(標題),all(全文) 預設:all,例:all |
start_date |
string |
搜尋起始時間,例:2020-02-01 |
end_date |
string |
搜尋結束時間,例:2020-02-10 |
sort |
string |
排序方式 time_desc(最新文章在前),time_asc(最舊文章在前),sitename(依照新聞網站排序),title(依照標題排序) 預設:time_desc,例:time_desc |
limit |
integer |
筆數限制 1~1000 預設:100,例:100 |
page |
integer |
頁次 預設:1,例:1 |
Input 參數範例
{
"end_date": "2020-02-10",
"keyword": "\"口罩\"",
"limit": 100,
"page": 1,
"sort": "time_desc",
"start_date": "2020-02-01",
"type": "all"
}
Python 程式撰寫範例
import aihub
client = aihub.client('{SELF_TOKEN}')
result = client.algo('algo://aihubplatform/c771e21c-9c12-11ea-8948-0242ac120002/')\
.post(
{
"end_date": "2020-02-10",
"keyword": "\"口罩\"",
"limit": 100,
"page": 1,
"sort": "time_desc",
"start_date": "2020-02-01",
"type": "all"
}
)