簡體   English   中英

如何使用 REST api 查詢 IBM Watson Discovery News?

[英]How to query IBM Watson Discovery News with REST api?

IBM Watson Discovery News 中是否有機會僅使用 url 查詢新聞,我可以在其中指定關鍵字、api 等。如果有人可以分享此類 Z50780F47F6839D47D60BC45355EE00C 的模板,將不勝感激。 我創建了帳戶,啟動了 Discovery,但隨后完全迷失在 IBM Cloud API Docs https://cloud.ibm.com/apidocs/discovery中。 據我所知,這里的一切都是為了通過命令行訪問,但這不是我要找的......

這是我用於煉金術的:

https://access.alchemyapi.com/calls/data/GetNews?apikey= &return=enriched.url.title&start=1477008000&end=now&q.enriched.url.cleanedTitle=InsertTitle&count=100&outputMode=xml

最好的,拉達

有時您需要做的就是閱讀文檔 - https://cloud.ibm.com/apidocs/discovery#query-a-collection-get


curl -u "apikey":"{apikey}" "https://gateway.watsonplatform.net/discovery/api/v1/environments/system/collections/news-en/query?version=2019-04-30&natural_language_query=corvid&count=10&return=text"

變成

https://apikey:{apikey}@gateway.watsonplatform.net/discovery/api/v1/environments/system/collections/news-en/query?version=2019-04-30&natural_language_query=corvid&count=100&return=text

雖然如果你只是跑

https://gateway.watsonplatform.net/discovery/api/v1/environments/system/collections/news-en/query?version=2019-04-30&natural_language_query=corvid&count=10&return=text

系統將提示您輸入憑據。

您可能需要修改 url 端點以反映您擁有發現服務實例的區域。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM