question

Upvotes
Accepted
1 0 0 0

Is there any code that enables us to map/fetch the news source name based on a list of source codes extracted with get_news_headlines()?

Technology: Eikon API on Windows Visual Studio Code


I was wondering if there is any code that enables us to map/fetch the news source name based on a list of source codes extracted with get_news_headlines()?


Example:

1719211460755.png

sourceCode = "NS:RTRS" => return "Reuters News"


eikon-data-api#contentnewswindows-os
1719211472661.png (4.9 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.

1 Answer

· Write an Answer
Upvotes
Accepted
87.3k 294 53 79

@tly-trial

Thank you for reaching out to us.

You need to use the Refinitiv Data Library for Python instead.

The news examples are on GitHub. Moreover, there is an endpoint to retreive news metadata. The endpoint example is also on GitHub.

The code looks like this:

baseurl = "/data/news/v1/metadata/NS:RTRS"

request_definition = rd.delivery.endpoint_request.Definition(
    url = baseurl,
    method = rd.delivery.endpoint_request.RequestMethod.GET)
response = request_definition.get_data()
response.data.raw

The output is:

1719305471210.png



1719305471210.png (45.7 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.