nyt_search: nyt_search

Description Usage Arguments Value

View source: R/nyt-articles.r

Description

Main function used to retrieve data from NYTimes article search API

Usage

1
nyt_search(q, n = 100, end_date = NULL, apikey = NULL, ...)

Arguments

q

Search query.

n

Number of desired articles to return.

end_date

Date from which results should start—the results will go back in time from this date. Must be in YYYYMMDD format, e.g., end_date = "20170101".

apikey

Nytimes article search API key. By default the function will look for the key as an environment variable. Alternatively, you can suppply the key, a character string, directly to this apikey argument.

...

Arguments passed along to query in final GET request.

Value

Nested list object of nytimes article data.


mkearney/nytimes documentation built on May 23, 2019, 1:07 a.m.