I am trying to develop a Java program to query on Watson Discovery news. My goal is to filter Top stories for a specified date range. Below is the query I am using in the program. Is there any API so that I can get filtered value on Top story headings and corresponding site link?
{
"query": "\"IBM\",language:(english|en)",
"filter": "crawl_date>2017-06-26T12:00:00-0400,crawl_date<2017-08-26T12:00:00-0400",
"count": 5,
"return": "title,url,host,crawl_date"
}
Thanks in advance.
yes, it's possible and your code will look like this
However, please notice that Discovery News seems to keep only the last 90 days data, so most probably you'll have to replace
with something more recent (I am writing this answer in Nov 27th 2017) such as
If you're using maven, you need to add this dependency
Unfortunately, Discovery News documentation does not explicitly state HOW you can access the default system news data repository, the trick here is to use these values
It will return results like this