New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
3 0 0 4

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.

Upvotes
Accepted
87.8k 294 53 79

@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
87.8k 294 53 79

@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.5k 5 3 7

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.