For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 1

Error in Eikon NEWS API.

I am trying the below code and my result dataframe is empty. No errors, but there should be rows.

import eikon as ek

import pandas as pd

ek.set_app_key(Eikon_Key)

from datetime import date start_date, end_date = date(2021, 1, 1), date.today()

q = "Topic:OLYMPICS"

headlines = ek.get_news_headlines(query=q, date_from=start_date, date_to=end_date, count=100) headlines.head().

Please help.

Sree

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
39.2k 75 11 27

@sreedhanya.kavunkara

"Topic:OLYMPICS" is not a valid news search expression, as the news topic code "OLYMPICS" does not exist. If you're looking for newswires headlines related to Olympic games, the correct topic code is "OLY". So, try q = "Topic:OLY". I recommend to always use News Monitor app in Eikon to help you construct the news search expression, which you can then copy & paste into your code.

icon clock
10 |1500

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

Click below to post an Idea Post Idea