How to use get_news_headlines() querying for FDA?

In News Monitor I see that US FDA is tagged as "P:[U S Food and Drug Administration]". I'm trying to use this value into the query parameter of ek.get_news_headlines() but it doesn't seem to work. Any suggestions?

Tagged:

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @daniele.colombo21

    You can try 'P:[U S Food and Drug Administration]', as shown below.

    df = ek.get_news_headlines('P:[U S Food and Drug Administration]')

    The output is:

    1655260205726.png

    Currently, the get_news_headlines method can only get headlines from the News Wires source.

    If you would like to add double quotes to a query, you need to use the '\' characters, as shown below.

    news = ek.get_news_headlines('R:.SPX AND \\"TRUMP\\"')

    1655260735628.png


Answers