Help with News API for Python, more details

Hello, I need help with the news APIs for Python, please.

I have checked Eikon Data API, Refinitiv Data Library for Python, and the Codebook examples, but I am not finding in the details I need, as they stay at a very high level.

  1. How to retrieve news building more elaborate queries such as using Topics and filters? The ultimate goal is to replicate the results from News Monitor. Ex: Language:LEN AND Source:RTRS AND ( "davos" OR "WEF" OR "World Economic Forum" ) NOT "take a look" NOT Topic:VID NOT AA NOT Topic:VEN NOT Topic:CMPNY NOT ( Product:RITV OR Product:RCNBC OR Product:LCNBC )
  2. How to retrieve news stories/headlines querying based on the “story text” and not just the headline?
  3. For a given storyId, how to retrieve associated attributes or metadata? Ex. I’d like to retrieve its associated region/country, associated topics, associated RICs, etc.

Thanks

Best Answer

  • @Giovanni.Villacres

    Thanks for reaching out to us.

    You can try the following code with Eikon Data API.

    headlines = ek.get_news_headlines('Language:LEN AND Source:RTRS AND (\\"davos\\" OR \\"WEF\\" OR \\"World Economic Forum\\") NOT \\"take a look\\" NOT Topic:VID NOT AA NOT Topic:VEN NOT Topic:CMPNY NOT ( Product:RITV OR Product:RCNBC OR Product:LCNBC )', count=100)
    headlines

    The output is:

    1674450552685.png

    It is similar to the Eikon News monitor in that filters are used when querying headlines.

    To get metadata, you need to use Refinitiv Data Platform, as mentioned in this discussion.

Answers