Fetch all news for a given day via data/news/ API

I need to fetch all the news headlines and stories for a given day via data/news/v1 API.

Since there's no such endpoint which can provide daily dump of news data, what I did was to first get all the headlines using headlines?dateFrom=....&dateTo=... endpoint (using next cursor) then iterate over the headlines to get the storyId, then for each storyId query the stories/{storyId} endpoint to fetch the story for that given storyId.

Now for a given day usually there are more than 15K news stories.

My single-threaded program takes forever to fetch these many stories (not counting the issues with token refresh/expiration).

If I use multiprocessing I get below exception

Code 429, 'Too Many Requests' for data/news/v1/stories/{storyId}

Could you please let me know what is the most efficient way to fetch all the news (headlines + stories) for a given day?

Would it be possible for you to provide this data via SFTP instead?

Note: We are already using the streaming news service of Refinitiv but we also want the data via data/news/ API for reconciliation purposes.

Best Answer

  • Jirapongse
    Answer ✓

    @chandra.prakash.pathak

    The /data/news/v1/ endpoint allows users to access news stories via the /data/news/v1/stories/{storyId} endpoint and it requires a story Id to get a news story. Therefore, it means that you will get a story per request.

    You may need to find other products that can provide news. For example, I found this Retrieving News Items with the DSS (DataScope Select) REST API article that shows how to retrieve news stories within the requested range.

    Otherwise, you need to contact your Refinitiv Account team or Sales team directly to discuss and find other solutions that suit your requirements.

Answers