Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

An unoffical API for the New York Public Library

Project description

An unofficial API for the New York Public Library Catalog


- requests (pip install requests)
- BeautifulSoup4 (pip install beautifulsoup4)


pip install NYPL_API

>>> from NYPL import search
>>> search(title="The View from Saturday", author="E.L. Konigsburg")

see (

Results are output as a list of Book objects, which have the following attributes:
- author
- title (in the format "title (genre)" )
- link_to_copies (url to a page of the libraries that have the book)
- copies (a list of all copies of the book)*
- available_copies (a list of *available* copies of the book)*

copies and available_copies are represented as lists of Copy objects, which have the following attributes:
- location (eg. "96th Street")
- collection (eg. "96th Street Children's Fiction")
- callNo (call number, eg. "J FIC K"
- status (eg. "DUE 10-28-14")

* copies and available copies are not generated automatically with default search. They can be generated automatically with robust search:

search(keyword, title, author, lazy=False)

More Info

Unfortunately, the official New York Public Library is only available to library employees, and during library hack-a-thons. Now, it's data anytime--Happy developing!

Feedback is most welcome.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for NYPL, version 0.1.12
Filename, size File type Python version Upload date Hashes
Filename, size NYPL-0.1.12.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page