question

Upvotes
Accepted
1 0 1 1

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

python#technology#productapinewsnews-filter
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
83.1k 281 53 77

@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.


1674450552685.png (75.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you @Jirapongse . Any suggestions on how to query /filter news based on story "text" and not the headlines?
@Giovanni.Villacres

As I know, the API doesn't support this feature.

However, please contact your Refinitiv Account team or Sales team directly to confirm this.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.