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
3 0 0 3

getting different results from New Monitor while using API

Hi! I am not getting the same result while on monitor i am using these and same query i am using on jupyter notebook both are giving different results.

The query i am using in jupyter notebook:

ek.get_news_headlines(query = "AA AND Language:LEN AND ( Topic:NEWS1 OR Topic:FED OR Topic:ECB OR Topic:BOE OR Topic:BOC OR Topic:SNB OR Source:TREDEP OR Topic:SEN OR Topic:HREP OR Source:UKGOVE OR Topic:SIGPOL OR Topic:OPEC OR Topic:RBNZ OR Topic:RBA OR Source:RSCH) AND (INTEREST OR INFLATION OR ECONOMY OR RECESSION OR RATE OR CUT OR YIELD OR FORECAST OR HIKE)", count=50)

The query I am using in the news monitor:

AA AND Language:LEN AND ( Topic:NEWS1 OR Topic:FED OR Topic:ECB OR Topic:BOE OR Topic:BOC OR Topic:SNB OR Source:TREDEP OR Topic:SEN OR Topic:HREP OR Source:UKGOVE OR Topic:SIGPOL OR Topic:OPEC OR Topic:RBNZ OR Topic:RBA OR Source:RSCH ) AND ( "inflation" OR "RATE" OR "yield" OR "Economy" OR "Interest" OR "recession" OR "Cut" OR "FORECAST" OR "HIKE" )

python#productapi#contentnews-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.

Hi @rishav.jindal ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@rishav.jindal

Hi,

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

Thanks,

AHS

Upvotes
Accepted
79.2k 251 52 74

@rishav.jindal

I just found the those queries are not identical.

1702390195688.png

This could be the problem.


1702390195688.png (55.6 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.

Hi! did you mean the order of these keywords

I have tried these in same order also than also not showing same results

@rishav.jindal

It could be the double quotes characters.

The queries return different results.

1702436567111.png


1702436567111.png (307.6 KiB)
Upvote
79.2k 251 52 74

@rishav.jindal

Thank you for reaching out to us.

I quickly tested it and found that the output looks similar.

1702011694719.png

To verify the problem, please share your results from both Eikon Data API and News Monitor.


1702011694719.png (248.6 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.

reuters-vs-api.png

I am not getting the same result


reuters-vs-api.png (462.9 KiB)
Upvotes
1.4k 5 3 6

Hi @rishav.jindal

Please try importing news directly from rd library instead of eikon and use the syntax below:

import refinitiv.data as rd
from refinitiv.data.content import news
rd.open_session()
text = 'AA AND Language:LEN AND ( Topic:NEWS1 OR Topic:FED OR Topic:ECB OR Topic:BOE OR Topic:BOC OR Topic:SNB OR Source:TREDEP OR Topic:SEN OR Topic:HREP OR Source:UKGOVE OR Topic:SIGPOL OR Topic:OPEC OR Topic:RBNZ OR Topic:RBA OR Source:RSCH ) AND ( "INTEREST" OR "INFLATION" OR "ECONOMY" OR "RECESSION" OR "RATE" OR "CUT" OR "YIELD" OR "FORECAST" OR "HIKE" )'
rd.news.get_headlines(query = text, count=50)

news.png



news.png (317.6 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.

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.