Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 3 5

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-apirefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

@sreedhanya.kavunkara

Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

@sreedhanya.kavunkara

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 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 512.0 KiB each and 1.0 MiB total.

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.