Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/david-r-cox/nytimesarchive

Python wrapper for the New York Times Archive API
https://github.com/david-r-cox/nytimesarchive

Last synced: about 2 months ago
JSON representation

Python wrapper for the New York Times Archive API

Awesome Lists containing this project

README

        

# nytimesarchive
Python wrapper for the New York Times [Archive API](https://developer.nytimes.com/archive_api.json).

## Note

As of 11/17/2016, the NYT Developers [page](https://developer.nytimes.com/) lists the Archive API as being in alpha status.

## Usage

The Archive API provides JSON format NYT articles by month.

```python
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](https://developer.nytimes.com/article_search_v2.json), see Evan Scherlock's [nytimesarticle](https://github.com/evansherlock/nytimesarticle).