question

Upvotes
Accepted
21 0 0 1

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
21 0 0 1

@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 5.0 MiB each and 10.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 5.0 MiB each and 10.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 5.0 MiB each and 10.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
11.5k 16 7 10

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea