Open Library APIopenlibrary.org ↗
Search millions of Open Library books by title. Get authors, first publish year, subjects, and cover IDs via a single clean API endpoint.
What is the Open Library API?
The Open Library API gives you access to book metadata across millions of titles through one endpoint, search_books. A single query returns up to 5 fields per book — title, authors, first_publish_year, subjects, and cover_id — plus pagination controls so you can page through large result sets. It covers Open Library's full catalog and is a practical starting point for bibliographic data retrieval.
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, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace openlibrary-org-api
uv run 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 Open Library API
What the API Returns
The search_books endpoint accepts a title string and returns a paginated list of matching books from the Open Library catalog. Each result object includes the book's title, an array of authors, the first_publish_year, a list of subjects (e.g. genres, topics, and subject headings), and a cover_id integer. The response also surfaces num_found — the total number of matching records — alongside the current page and limit values so you can build pagination controls.
Pagination and Filtering
Pagination is 1-based and controlled by the page and limit parameters. Set limit to bound the number of records per response, then increment page to walk through the full result set. The num_found field tells you the total count of matches, which you can divide by limit to calculate total pages. There are no server-side filters for language, date range, or subject within this endpoint; filtering on those dimensions needs to be done client-side against the returned fields.
Cover Images
The cover_id field maps directly to Open Library's cover image service. You can construct a URL as https://covers.openlibrary.org/b/id/<cover_id>-<size>.jpg where <size> is S, M, or L. If cover_id is null or absent for a result, no cover image is available for that edition in the catalog.
Source Background
Open Library (openlibrary.org) is an Internet Archive project aiming to catalog every book ever published. It does have an official public API documented at https://openlibrary.org/developers/api, covering search, works, editions, and more. This Parse endpoint targets the book search surface and normalizes results into a consistent, paginated JSON shape.
The Open Library API is a managed, monitored endpoint for openlibrary.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when openlibrary.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official openlibrary.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Populate a reading list app with book titles, authors, and cover images using
cover_id. - Build a book discovery tool that groups results by
subjectsreturned fromsearch_books. - Cross-reference
first_publish_yearagainst a dataset to find earliest known editions of a title. - Generate a bibliography tool that retrieves author arrays for any title query.
- Drive autocomplete suggestions in a book search UI using paginated
search_booksresults. - Research subject coverage for a given book title by inspecting the
subjectsarray. - Build a catalog enrichment pipeline that fills in missing metadata using
num_foundand multi-page traversal.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Open Library have an official developer API?+
What does `search_books` return beyond the book title?+
authors (an array of author name strings), first_publish_year (an integer), subjects (an array of subject/genre strings), and cover_id (an integer you can use to build cover image URLs). The top-level response also includes num_found, page, and limit for pagination.Can I search by author name, ISBN, or subject rather than title?+
title parameter. You can fork this API on Parse and revise it to add author, ISBN, or subject search endpoints.Are there any known gaps in the catalog data returned?+
cover_id (it will be null or absent) because Open Library does not have a cover image on file for every edition. Subject data can also vary in completeness — some records have rich subject arrays, others have few or none, depending on how thoroughly a given work has been cataloged.Does the API return edition-level data such as publisher, ISBN, or page count?+
search_books endpoint returns work-level metadata: title, authors, first publish year, subjects, and cover ID. Edition-level fields like publisher, ISBN, and page count are not exposed. You can fork this API on Parse and revise it to call the editions endpoint for a given work and surface those fields.