Find an API

Search public APIs with auth details & Postman guides

← All APIs

Open Library Books API

openlibrary.org · Data

Data No Auth Free & Open Books Reading Library

Internet Archive Open Library — search 20M+ book records, cover images, author data, and full text for public domain works. No API key required.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Search books

Search Open Library for books.

https://openlibrary.org/search.json?q=harry potter&limit=3

Hover any highlighted part to learn what it does

curl -X GET "https://openlibrary.org/search.json?q=harry%20potter&limit=3"
import requests
params = {
    "q": "harry potter",
    "limit": "3"
}
response = requests.get(
    "https://openlibrary.org/search.json",
    params=params,
)
print(response.json())
const url = new URL('https://openlibrary.org/search.json');
url.searchParams.set('q', 'harry potter');
url.searchParams.set('limit', '3');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://openlibrary.org/search.json")
	q := baseURL.Query()
	q.Set("q", "harry potter")
	q.Set("limit", "3")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://openlibrary.org/search.json")
uri.query = URI.encode_www_form({
  "q" => "harry potter",
  "limit" => "3"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://openlibrary.org/search.json?" . http_build_query([
    "q" => "harry potter",
    "limit" => "3"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get book by ISBN

Get book details for Hunger Games by ISBN.

https://openlibrary.org/isbn/9780439023481.json

Hover any highlighted part to learn what it does

curl -X GET "https://openlibrary.org/isbn/9780439023481.json"
import requests
response = requests.get(
    "https://openlibrary.org/isbn/9780439023481.json",
)
print(response.json())
const url = 'https://openlibrary.org/isbn/9780439023481.json';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "https://openlibrary.org/isbn/9780439023481.json"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://openlibrary.org/isbn/9780439023481.json")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://openlibrary.org/isbn/9780439023481.json";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed
  2. Search: GET /search.json?q=dune&author=frank+herbert&limit=5
  3. ISBN lookup: GET /isbn/{isbn}.json
  4. Author: GET /authors/OL26320A.json
  5. Cover image: https://covers.openlibrary.org/b/isbn/{isbn}-L.jpg

Open documentation ↗