Refinitiv Data Library for Python

news.headlines.Definition object

This object defines the news headlines to retrieve.

Module

refinitiv.data.content.news.headlines

Syntax

news.headlines.Definition(query, count, date_from, date_to, sort_order, extended_params)

Parameters

Value Description Data type Optional Default value
query The user search query. str No No
count Count to limit the number of headlines. int Yes 10
date_from Beginning of the date range. str or timedelta Yes None
date_to End of the date range. str or timedelta Yes None
sort_order Sort order for the response. SortOrder Yes SortOrder.new_to_old
extended_params Additional parameters to provide to the API. dict Yes None

Returned value

news.headlines.Definition object

Usage

The following example demonstrates how to create the news headlines definition object to get last 20 news headlines about Google:

from refinitiv.data.content import news

definition = news.headlines.Definition(query="Google", count=20)

News SortOrder