Eikon python API: Formulating search queries to order news by popularity or filter by the media comp

I'm trying to retrieve the most popular news headlines for a given company's ric in a given day.

1. Is there any way to form a search query to output news ordered by how popular they are?

2. Is it possible to filter the search queries to show only certain media companies? How can I encode a newspaper ID in the search query?

3. Can I filter the search query by the type of the output? For example, can I filter out the news which are just video links?

Best Answer

  • 1. Is there any way to form a search query to output news ordered by how popular they are?
    Answer: No

    2. Is it possible to filter the search queries to show only certain media companies? How can I encode a newspaper ID in the search query?
    Answer: Use "Source" keyword in the news search expression to filter news headlines by source. E.g. the following expression retrieves only news headlines provided by Bangkok Post.

    ek.get_news_headlines('Source:BANGPO')
    To browse the news source codes you can use with the Source keyword use News Monitor app in Eikon application.

    3. Can I filter the search query by the type of the output? For example, can I filter out the news which are just video links?
    Answer: I don't believe there's such a thing as news that are just video links. News stories are delivered as HTML, which may embed videos, but in my experience it always includes something else: at the very least a caption or a short description of the video. News stories that include video are tagged with the topic code VID, which you can use to filter them out:

    ek.get_news_headlines('Source:RTRS NOT Topic:VID')