openlibrary.org APIopenlibrary.org ↗
Search millions of books by title on Open Library to discover authors, publication years, subjects, and cover images. Find comprehensive book metadata in seconds to research titles, build reading lists, or compare editions.
curl -X GET 'https://api.parse.bot/scraper/0f90782c-a240-4542-ba33-b7c93252c760/search_books?page=1&limit=5&title=the+great+gatsby' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed Python client. Install the CLI, sign in, then pull this API’s generated client:
pip install parse-sdk parse login parse add --marketplace openlibrary-org-api
parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Open Library Book Search — find books by title, inspect metadata."""
from parse_apis.Open_Library_Book_Search_API import OpenLibrary, NotFoundError
client = OpenLibrary()
# Search for books by title, cap results
for book in client.books.search(title="the great gatsby", limit=3):
print(book.title, book.authors, book.first_publish_year)
# Drill into one result for full subject list
book = client.books.search(title="dune", limit=1).first()
if book:
print(f"Title: {book.title}")
print(f"Authors: {book.authors}")
print(f"Year: {book.first_publish_year}")
print(f"Cover ID: {book.cover_id}")
print(f"Subjects (first 5): {book.subjects[:5]}")
# Typed error handling
try:
result = client.books.search(title="xyznonexistent99999", limit=1).first()
if result:
print(result.title, result.cover_id)
else:
print("No results found for query")
except NotFoundError as exc:
print(f"Error: {exc}")
print("exercised: books.search with pagination, field access on title/authors/first_publish_year/subjects/cover_id")
Search books by title. Returns paginated results with each book's title, authors, first publish year, subjects, and cover ID. The cover image URL can be constructed as https://covers.openlibrary.org/b/id/<cover_id>-<size>.jpg where size is S, M, or L.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (1-based). |
| limit | integer | Maximum number of results to return per page. |
| titlerequired | string | Book title to search for. |
{
"type": "object",
"fields": {
"page": "integer",
"limit": "integer",
"results": "array of book objects with title, authors, first_publish_year, subjects, cover_id",
"num_found": "integer"
},
"sample": {
"data": {
"page": 1,
"limit": 3,
"results": [
{
"title": "The Great Gatsby",
"authors": [
"F. Scott Fitzgerald"
],
"cover_id": 10590366,
"subjects": [
"Fiction",
"Rich people",
"Classics",
"Literature"
],
"first_publish_year": 1920
}
],
"num_found": 301
},
"status": "success"
}
}About the openlibrary.org API
The openlibrary.org API on Parse exposes 1 endpoint for the publicly available data on openlibrary.org. Calls return JSON over HTTPS and are billed per successful response.
Pin a release with the API-Snapshot-Version header so canonical updates don't silently change your contract.