This API provides recent relevant articles for the specified topic. Unlike ‘Articles Search’, this API is a cache lookup, hence much faster but limited to articles from last 3 days.
Resource URL
GET http://api.rightrelevance.com/v2/topics/getarticles?topic=<topic>&start=X&rows=Y&access_token=
Parameters
topic=string (required)
|
topic for which to fetch recent article Example Values: archaeology, orthopedics |
start=X
(optional)
|
Returns articles starting from index ‘X’. Default: 0
Example Values: 0 |
rows=Y
(optional)
|
Number of articles ‘Y’ to return. Default: 20
Example Values: 9 |
Example Request
GET http://api.rightrelevance.com/v2/topics/getarticles?topic=uk%20politics&start=0&rows=5&access_token=PLACE_ACCESS_TOKEN
Example Response
{ numFound: 20, articles: { articles_count: 5, article_data: [ { id: "c86a31d0ff9da18a071523be2bd1d3ebce18d4d7", image_width: "1128", share_count: 2, content_type: "article", url: "http://www.independent.co.uk/news/uk/politics/jeremy-corbyn-six-hour-day-workplace-2020-reduce-work-hours-a7177661.html", title: "Jeremy Corbyn could introduce a six-hour work day", image_height: "746", image_url: "http://static.independent.co.uk/s3fs-public/thumbnails/image/2016/07/30/12/jeremy-corbyn.png", earliest_known_date: "2016-08-07T16:18:58Z", earliest_known_date_timestamp_sec: 1470586685, _id: "c86a31d0ff9da18a071523be2bd1d3ebce18d4d7", excerpt: "UK Politics Jeremy Corbyn says he will discuss reducing working day down to just six hours The Labour leader's suggestion follows experiments in Sweden which found a six hour working day increases employee happiness, productivity and profit Siobhan Fenton Health and Social Affairs correspondent @siobhanfenton Sunday 7 August 2016 17:20 BST Jeremy Corbyn has said he is open to the proposals which are currently being tried in Europe Getty Jeremy Corbyn has said he will discuss proposals to reduce the working day to just six hours." source: "independent.co.uk", topic: "uk politics", related_concepts: [ "world news", "uk general election", "television" ], experts: [ { twitter_id_str: "31105169", id: "http://twitter.com/indypolitics", twitter_screen_name: "indypolitics", topic_score: "84", tweet: { tweet_id: "762322946165727232", date: "Sun Aug 07 16:22:08 +0000 2016" } }, ... (more sharing influencers) ... ] }, ... (4 more articles) ... ] } }
Response Fields
Returns recent articles for the specified topic, which is ‘uk politics’ in this example.
numFound | Total recent articles for the specified topic |
articles | List of articles for the specified topic |
articles.articles_count | Count of articles in the current list (depends on rows=Y) |
articles.article_data | Article specific data like share count, sharing expert, title etc. |