I’m trying to fetch all English news related to RCS code (LEN AND (U:C)) within a specific timeframe using the headlines endpoint.
Here’s an example of the request I send with requests.get():
https://api.refinitiv.com/data/news/v1/headlines?dateFrom=2025-08-14T22:00:00Z&dateTo=2025-08-14T22:42:57Z&query=LEN%20AND%20%28U%3AC%29
I also have a recursive function to handle pagination tokens and fetch the next page of results.
The problem:
- When I test the same query in the API playground, I only get around 20 results, all correctly within the timeframe.
- But when I use my Python script with
requests.get(), I end up with 7,000+ results, including news outside of the timeframe and unrelated RCS codes.
So it seems like the query parameters (dateFrom, dateTo, and query filters) are not being applied correctly in my request.
Question:
Why does my requests.get() call return results outside the specified filters, and what’s the correct way to ensure the filters (date range + RCS code) are applied?