TL;DR
Open Library Search is a full-text book search API that indexes over 25 million titles from the Internet Archive's Open Library project. You can search by title, author, subject, or any keyword and get results with covers, edition counts, publication years, ISBNs, and availability information. The search uses Solr under the hood, supporting faceted search, pagination, and fielded queries. This is the primary discovery endpoint for the Open Library ecosystem.
Quick start: https://openlibrary.org/search.json?q=javascript&limit=1
No API key needed — just make a request!
How to Use This API
1. Simple Keyword Search
https://openlibrary.org/search.json?q=javascript&limit=3
2. By Author
https://openlibrary.org/search.json?author=Agatha+Christie&sort=new
3. By Subject
https://openlibrary.org/search.json?subject=space+exploration&limit=5
4. JavaScript — Search with Details
fetch('https://openlibrary.org/search.json?q=dune&limit=5')
.then(r => r.json())
.then(d => {
console.log(`Found ${d.numFound} books`);
d.docs.forEach(book => {
console.log(book.title + ' by ' + (book.author_name || ['Unknown']).join(', '));
console.log('First published:', book.first_publish_year);
});
});
5. Python — Get Books by Topic
import requests
resp = requests.get('https://openlibrary.org/search.json', params={
'q': 'artificial intelligence',
'limit': 10,
'sort': 'rating'
})
data = resp.json()
for book in data['docs']:
if book.get('ratings_average'):
print(f"{book['title']} — ⭐ {book['ratings_average']:.1f}")
https://openlibrary.org/search.json?q=python&limit=3
API Details
- API URL
https://openlibrary.org/search.json- Documentation
- openlibrary.org/developers/api
- Category
- Education
- Authentication
- Not Required
- Geographic Coverage
- Global
Frequently Asked Questions
- Do I need an API key?
- No. Open Library's public JSON API requires no authentication. It is free for any use.
- What search fields are available?
- You can search by
q(general),title,author,subject,place,person,publisher,isbn, and more. Combine with Boolean operators. - How do I get book covers?
- Results include
cover_i(cover ID). Construct the URL as:https://covers.openlibrary.org/b/id/{cover_i}-M.jpg(S/M/L sizes). - What sorting options exist?
- Use
sortparameter:rating,new,old,title,editions, orrating. - How do I paginate results?
- Use
page(1-based) withlimit(default 100, max 1000). The response includesnumFoundandstartfor building pagination. - Can I filter by availability?
- Yes, add
&available=trueto restrict results to books that are freely readable online through Open Library.
What You Can Build
- Book discovery app with cover thumbnails and ratings
- Personal library cataloging tool
- Reading list generator by subject or author
- ISBN barcode scanner lookup tool
- Library catalog front-end for Open Library collection