skip to navigation
skip to content

Not Logged In

nytimesarticle 0.1.0

Fully-functional Python wrapper for the New York Times Article Search API


nytimesarticle is a fully-functional Python wrapper for the New York Times Article Search API.


With pip::

    $ pip install nytimesarticle

or easy_install::

    $ easy_install nytimesarticle


nytimesarticle requires the `requests <>`_ package.


Simply import and initialize the API with your developer key::

    $ from nytimesarticle import articleAPI
    $ api = articleAPI('*Your Key*')

And call the 'search' function with your desired search parameters/values::

    $ articles = q = 'Obama', fq = {'headline':'Obama', 'source':['Reuters','AP', 'The New York Times']}, begin_date = 20111231, facet_field = ['source','day_of_week'], facet_filter = True )

The search function returns a dictionary of the search results.

You can specify multiple filters by using a dictionary::
    fq = {'headline':'Obama', 'source':['Reuters','AP', 'The New York Times']}

And multiple values by using a list::
    facet_field = ['source','day_of_week']

More examples::

    $ articles = q = 'Obama' )

    $ articles = q = 'Obama', begin_date = 20111231, page=2 )

For a complete overview of the available search parameters, please refer to the NYTimes Article Search API `Documentation <>`_.
File Type Py Version Uploaded on Size
nytimesarticle-0.1.0.tar.gz (md5) Source 2014-01-04 3KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 29 downloads in the last week
  • 177 downloads in the last month