top_headlines: Top Headlines

Description Usage Arguments Examples

View source: R/calls.R

Description

Returns top headlines.

Usage

1
2
top_headlines(q = NULL, results = 100, country = NULL,
  category = NULL, sources = NULL)

Arguments

q

Keywords or a phrase to search for.

results

Number of results to return, on free plan this is often 100. Set to Inf to return everything.

country

The 2-letter ISO 3166-1 code of the country you want to get headlines for.

category

The category you want to get headlines for. Possible options: business, entertainment, general, health, science, sports, technology. Note: you can't mix this argument with the sources argument.

sources

A vector of identifiers for the news sources or blogs you want headlines from. Use news_sources to locate these. Note: you can't mix this argument with the country or category argument.

Examples

1
2
3
4
## Not run: 
top_headlines("Trump")

## End(Not run)

news-r/newsapi documentation built on Feb. 27, 2020, 2:38 p.m.