Home

Awesome

nytimesarchive

Python wrapper for the New York Times Archive API.

Note

As of 11/17/2016, the NYT Developers page lists the Archive API as being in alpha status.

Usage

The Archive API provides JSON format NYT articles by month.

from nytimesarchive import ArchiveAPI
api = ArchiveAPI('your api key goes here')
print(api.query(2016, 11))

Articles are available from September 1851 onward.

Article API

For the Article API, see Evan Scherlock's nytimesarticle.