question

Upvotes
Accepted
21 0 0 2

Unable to fetch Refinitiv Dataplatform News Headlines

Hi All,


I am unable to fetch news headlines when using

rdp.get_news_headlines('Trump')

I am getting no response from the server. The Jupyter code cell finishes running but nothing happens. If I try to place it in a variable and print that variable, it returns nothing. I think i may have a possible authorization issue and I am not sure how to fix it. Please assist.

I open the session using:

rdp.open_platform_session(
    APP_KEY,
    rdp.GrantPassword(
        username = 'RDP_LOGIN',
        password = 'RDP_PASSWORD'
    )
)

Please help as soon as you can!

rdp-apirefinitiv-data-platform
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.

@Prasad.Acharya

Hi,

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 most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS


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

Thanks,

AHS

Upvotes
Accepted
21 0 0 2

@moragodkrit I do not receive any error after open_platform_session.

I have tried that example, and nothing happens after 'rdp.get_news_headlines'. I believe it may be an authorization issue as I am not able to access this API on the API Playground.

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
7.6k 15 6 9

@Prasad.Acharya

  • Any error message after open_platform_session?

Please make sure that you are using correct credentials such as AppKey.


You have to modify credentials in credentials.ipynb before running our example. And then you can test it with News example such as 1.4.0 - Function - News.ipynb.

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
7.6k 15 6 9

@Prasad.Acharya

Just check the RDP codes again and I just realize that I already updated the News Headline endpoint in RDP source file to V1 while the default RDP python library still uses beta1. And it looks like beta1 does not work now.

You can manually change the news headline endpoint from the below folder.
<Python or Conda install path>\Lib\site-packages\refinitiv\dataplatform\content\news

And then open news_headlines.py

And update

_URL_NEWSHEADLINES = "data/news/beta1/headlines"

to

_URL_NEWSHEADLINES = "data/news/v1/headlines"

Then restart your jupyternotebook process/kernel.

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.

@moragodkrit Thank you for your suggestion! I tried it out, but to no avail. I am still having the same issue as before. It still returns nothing.

Upvote
24.6k 54 17 14

Hello @Prasad.Acharya

Could you please try the RDP /data/news/v1/headlines API endpoint directly in the https://apidocs.refinitiv.com/Apps/ApiDocs web site with your RDP account?


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.