ny_archive: Archive

View source: R/archive.R

ny_archiveR Documentation

Archive

Description

The Archive API returns an array of NYT articles for a given month, going back to 1851. Its response fields are the same as the Article Search API. The Archive API is very useful if you want to build your own database of NYT article metadata. You simply pass the API the year and month and it returns a JSON object with all articles for that month. The response size can be large (~20mb).

Usage

ny_archive(year, month)

Arguments

year

Year, minimum 1851.

month

Month, integer between 1 and 12.

Examples

## Not run: 
nytimes_key("xXXxxXxXxXXx")
archive <- ny_archive(2018, 1)

## End(Not run)


news-r/nytimes documentation built on Sept. 7, 2024, 1:02 a.m.