新聞文章關鍵字搜尋
Ver.1
algo://aihubplatform/def7e360-9342-11ea-953c-0242ac120002/
aihubplatform (AIHub官方平台)
邊緣運算傳輸 / 關鍵字搜尋

透過關鍵字搜尋新聞文章文章

評價

0 / 5

使用次數

33498

參數欄位說明

欄位 型態 說明
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/3deca1ee-64d1-11ea-8e41-0242ac120002/')\
    .post(
    {
        "end_date": "2020-02-10",
        "keyword": "\"口罩\"",
        "limit": 100,
        "page": 1,
        "sort": "time_desc",
        "start_date": "2020-02-01",
        "type": "all"
    }
)