# Open Library API

> Open Library returns book search results, catalog details, and author works as a workflow and API.

Open Library searches books by words, with optional author, subject, and publication-age sorting; it requires search words. Get book returns catalog details using a title, with optional author or ISBN to identify the right book. List author books returns an author profile and ordered works; it requires an author name, Open Library link, or author key.

- Page: https://fous.com/workflows/open-library
- Handle: `@open-library`
- Category: [Education](https://fous.com/workflows/category/education)
- Source website: https://openlibrary.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with Open Library.

## Methods

### Get book

Operation `get_book`, version 1. 1 credit per call.

Get a book’s catalog details from its title, with an optional author or ISBN to identify the right book. Reading availability reflects listed editions; details may be missing when the catalog has none.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `isbn` | string | no | `"9780140328721"` | An ISBN to identify the book instead of its title, for example 9780140328721. |
| `title` | string | yes | `"Fantastic Mr. Fox"` | The title of the book, for example Pride and Prejudice. |
| `author` | string | no | `"Jane Austen"` | The author to distinguish books with the same title, for example Jane Austen. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "isbn": {
      "type": "string",
      "default": "",
      "description": "An ISBN to identify the book instead of its title, for example 9780140328721.",
      "examples": [
        "9780140328721"
      ]
    },
    "title": {
      "type": "string",
      "description": "The title of the book, for example Pride and Prejudice.",
      "examples": [
        "Fantastic Mr. Fox",
        "Pride and Prejudice",
        "The Hunger Games"
      ]
    },
    "author": {
      "type": "string",
      "default": "",
      "description": "The author to distinguish books with the same title, for example Jane Austen.",
      "examples": [
        "Jane Austen",
        "Suzanne Collins"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "isbn": "9780140328721",
      "title": "Fantastic Mr. Fox"
    },
    {
      "title": "Pride and Prejudice",
      "author": "Jane Austen"
    },
    {
      "title": "The Hunger Games",
      "author": "Suzanne Collins"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `title` | string or null | `"Fantastic Mr Fox"` | Book title. |
| `authors` | array |  | Authors of the book. |
| `subjects` | array |  | Up to 20 catalog subjects. |
| `subtitle` | string or null |  | Book subtitle, if listed. |
| `work_key` | string | `"/works/OL45804W"` | Open Library work key. |
| `description` | string or null |  | Plain-text book description. |
| `ratings_count` | integer or null | `121` | Number of reader ratings, when available. |
| `average_rating` | number or null | `3.9504132` | Average reader rating from 1 to 5, when available. |
| `cover_image_link` | string or null | `"https://covers.openlibrary.org/b/id/6498519-L.jpg"` | Link to the cover image. |
| `open_library_link` | string | `"https://openlibrary.org/works/OL45804W"` | Link to the book on Open Library. |
| `number_of_editions` | integer or null | `161` | Number of known editions. |
| `first_published_year` | integer or null | `1970` | Year the book was first published. |
| `reading_availability` | string | `"borrow"` | How the book can be read online. |
| `typical_number_of_pages` | integer or null | `96` | Typical page count among editions. |

**Example input**

```json
{
  "isbn": "9780140328721",
  "title": "Fantastic Mr. Fox"
}
```

**Example output**

```json
{
  "title": "Fantastic Mr Fox",
  "authors": [
    "Roald Dahl"
  ],
  "subjects": [
    "Animals",
    "Hunger",
    "Open Library Staff Picks"
  ],
  "subtitle": null,
  "work_key": "/works/OL45804W",
  "description": "The main character of Fantastic Mr. Fox is an extremely clever anthropomorphized fox named Mr. Fox. He lives with his wife and four little foxes. In order to feed his family, he steals food from the c…",
  "ratings_count": 121,
  "average_rating": 3.9504132,
  "cover_image_link": "https://covers.openlibrary.org/b/id/6498519-L.jpg",
  "open_library_link": "https://openlibrary.org/works/OL45804W",
  "number_of_editions": 161,
  "first_published_year": 1970,
  "reading_availability": "borrow",
  "typical_number_of_pages": 96
}
```

### List author books

Operation `list_author_books`, version 1. 1 credit per call.

Find an Open Library author and list their works with publication years, edition counts, covers, and an author profile. Dates retain Open Library’s wording; missing details are null. Popular uses Open Library’s default relevance order.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"newest"` | Order of books, for example newest. Popular is the default. |
| `author` | string | yes | `"Toni Morrison"` | Author name, Open Library author link, or author key, for example Toni Morrison. |
| `max_results` | integer | no | `5` | Maximum number of books to return, for example 50 (up to 200). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "author"
  ],
  "properties": {
    "sort": {
      "enum": [
        "popular",
        "newest",
        "oldest"
      ],
      "type": "string",
      "default": "popular",
      "description": "Order of books, for example newest. Popular is the default.",
      "examples": [
        "newest",
        "oldest"
      ]
    },
    "author": {
      "type": "string",
      "minLength": 1,
      "description": "Author name, Open Library author link, or author key, for example Toni Morrison.",
      "examples": [
        "Toni Morrison",
        "Octavia Butler",
        "https://openlibrary.org/authors/OL31120A"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 200,
      "minimum": 1,
      "description": "Maximum number of books to return, for example 50 (up to 200).",
      "x-fous-developer": true,
      "examples": [
        5,
        3,
        2
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "author": "Toni Morrison"
    },
    {
      "sort": "newest",
      "author": "Octavia Butler",
      "max_results": 5
    },
    {
      "sort": "oldest",
      "author": "Toni Morrison",
      "max_results": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `books` | array |  | Books by this author in the requested order. |
| `books[].title` | string | `"Octavia E. Butler : Lilith's Brood : the Xenogenesis Trilogy"` |  |
| `books[].edition_count` | integer or null | `1` |  |
| `books[].cover_image_link` | string or null | `"https://covers.openlibrary.org/b/id/9317262-L.jpg"` |  |
| `books[].open_library_link` | string | `"https://openlibrary.org/works/OL42451189W"` |  |
| `books[].first_published_year` | integer or null | `2025` |  |
| `biography` | string or null | `"An American science fiction writer, one of the best-known among the few African-American women in the field."` | Short plain-text author biography. |
| `author_key` | string | `"OL30802A"` | Open Library author key. |
| `birth_date` | string or null | `"June 22, 1947"` | Birth date as listed by Open Library, which may be a partial date. |
| `death_date` | string or null | `"February 24, 2006"` | Death date as listed by Open Library, which may be a partial date. |
| `photo_link` | string or null | `"https://covers.openlibrary.org/a/id/6926216-L.jpg"` | Author portrait image link. |
| `author_link` | string | `"https://openlibrary.org/authors/OL30802A"` | Open Library author page. |
| `author_name` | string | `"Octavia E. Butler"` | Author name on Open Library. |
| `total_works` | integer | `35` | Number of works attributed to this author. |

**Example input**

```json
{
  "sort": "newest",
  "author": "Octavia Butler",
  "max_results": 5
}
```

**Example output**

```json
{
  "books": [
    {
      "title": "Octavia E. Butler : Lilith's Brood : the Xenogenesis Trilogy",
      "edition_count": 1,
      "cover_image_link": null,
      "open_library_link": "https://openlibrary.org/works/OL42451189W",
      "first_published_year": 2025
    },
    {
      "title": "Few Rules for Predicting the Future",
      "edition_count": 2,
      "cover_image_link": null,
      "open_library_link": "https://openlibrary.org/works/OL37620359W",
      "first_published_year": 2024
    },
    {
      "title": "Kindred",
      "edition_count": 1,
      "cover_image_link": null,
      "open_library_link": "https://openlibrary.org/works/OL37620555W",
      "first_published_year": 2024
    }
  ],
  "biography": "An American science fiction writer, one of the best-known among the few African-American women in the field.",
  "author_key": "OL30802A",
  "birth_date": "June 22, 1947",
  "death_date": "February 24, 2006",
  "photo_link": "https://covers.openlibrary.org/a/id/6926216-L.jpg",
  "author_link": "https://openlibrary.org/authors/OL30802A",
  "author_name": "Octavia E. Butler",
  "total_works": 35
}
```

### Search books

Operation `search_books`, version 1. 1 credit per call.

Find Open Library books by search words, optionally narrowing by author and subject and sorting by publication age. Returns work-level results; online availability indicates that at least one edition is marked public or borrowable, not that a loan is currently available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"newest"` | Order results by relevance or publication age, for example newest. |
| `query` | string | yes | `"Dune"` | Words to search for, for example Dune. |
| `author` | string | no | `"Frank Herbert"` | Narrow results to an author, for example Frank Herbert. |
| `subject` | string | no | `"gardening"` | Narrow results to a subject, for example gardening. |
| `max_results` | integer | no | `10` | Maximum number of books to return, for example 10. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "sort": {
      "enum": [
        "relevance",
        "newest",
        "oldest"
      ],
      "type": "string",
      "default": "relevance",
      "examples": [
        "newest"
      ],
      "description": "Order results by relevance or publication age, for example newest."
    },
    "query": {
      "type": "string",
      "examples": [
        "Dune"
      ],
      "minLength": 1,
      "description": "Words to search for, for example Dune."
    },
    "author": {
      "type": "string",
      "default": "",
      "examples": [
        "Frank Herbert"
      ],
      "description": "Narrow results to an author, for example Frank Herbert."
    },
    "subject": {
      "type": "string",
      "default": "",
      "examples": [
        "gardening"
      ],
      "description": "Narrow results to a subject, for example gardening."
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 100,
      "minimum": 1,
      "examples": [
        10
      ],
      "description": "Maximum number of books to return, for example 10.",
      "x-fous-developer": true
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "query": "Dune",
      "author": "Frank Herbert",
      "max_results": 3
    },
    {
      "sort": "oldest",
      "query": "gardening",
      "subject": "gardening",
      "max_results": 2
    },
    {
      "query": "abracadabra_unfound_708901239abc",
      "max_results": 2
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `books` | array |  | Matching books. |
| `books[].isbns` | array |  | Up to five ISBNs for editions of the work. |
| `books[].title` | string | `"Dune"` | Book title. |
| `books[].authors` | array |  | Authors of the work. |
| `books[].work_key` | string | `"/works/OL893414W"` | Open Library work key. |
| `books[].languages` | array |  | Languages of the work as names. |
| `books[].free_online` | boolean | `true` | Whether any edition is marked public or borrowable for online reading. |
| `books[].edition_count` | integer or null | `155` | Number of editions indexed for the work. |
| `books[].cover_image_url` | string or null | `"https://covers.openlibrary.org/b/id/11481354-L.jpg"` | Cover image link, if available. |
| `books[].open_library_url` | string | `"https://openlibrary.org/works/OL893414W"` | Open Library work page. |
| `books[].first_published_year` | integer or null | `1965` | First year of publication, if known. |

**Example input**

```json
{
  "query": "Dune",
  "author": "Frank Herbert",
  "max_results": 3
}
```

**Example output**

```json
{
  "books": [
    {
      "isbns": [
        "9780441013593",
        "9780340839935",
        "044100590X"
      ],
      "title": "Dune",
      "authors": [
        "Frank Herbert"
      ],
      "work_key": "/works/OL893414W",
      "languages": [
        "French",
        "Spanish",
        "Ukrainian"
      ],
      "free_online": true,
      "edition_count": 155,
      "cover_image_url": "https://covers.openlibrary.org/b/id/11481354-L.jpg",
      "open_library_url": "https://openlibrary.org/works/OL893414W",
      "first_published_year": 1965
    },
    {
      "isbns": [
        "8418037679",
        "9788466372015",
        "8373017259"
      ],
      "title": "Dune Messiah",
      "authors": [
        "Frank Herbert"
      ],
      "work_key": "/works/OL893461W",
      "languages": [
        "Spanish",
        "Polish",
        "Dutch"
      ],
      "free_online": true,
      "edition_count": 101,
      "cover_image_url": "https://covers.openlibrary.org/b/id/980253-L.jpg",
      "open_library_url": "https://openlibrary.org/works/OL893461W",
      "first_published_year": 1969
    },
    {
      "isbns": [
        "1427202915",
        "9789759971342",
        "9780425071793"
      ],
      "title": "Children of Dune",
      "authors": [
        "Frank Herbert"
      ],
      "work_key": "/works/OL893516W",
      "languages": [
        "Dutch",
        "Chinese",
        "Portuguese"
      ],
      "free_online": true,
      "edition_count": 77,
      "cover_image_url": "https://covers.openlibrary.org/b/id/6976407-L.jpg",
      "open_library_url": "https://openlibrary.org/works/OL893516W",
      "first_published_year": 1976
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@open-library",
  "visibility": "public",
  "operation": "get_book",
  "version": 1,
  "input": {
    "isbn": "9780140328721",
    "title": "Fantastic Mr. Fox"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@open-library\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_book\",\n  \"version\": 1,\n  \"input\": {\n    \"isbn\": \"9780140328721\",\n    \"title\": \"Fantastic Mr. Fox\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@open-library",
  "visibility": "public",
  "operation": "get_book",
  "version": 1,
  "input": {
    "isbn": "9780140328721",
    "title": "Fantastic Mr. Fox"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@open-library","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Find books by title, author, or subject.
- Check book details, subjects, ratings, and listed reading availability.
- Compare publication years and edition counts across matching books.
- Review an author's works, biography, and profile details.

## FAQ

### Is Fous affiliated with Open Library?

No. Fous is not affiliated with Open Library. This workflow reads the public openlibrary.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Open Library account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from openlibrary.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### Which books match a search phrase?

Search books returns matching works, with optional author or subject filters and publication-age sorting.

### What details are listed for a book?

Get book returns catalog details such as subjects, reader ratings when available, editions, and reading availability.

### What books are attributed to an author?

List author books returns ordered works and an author profile, including biography and total works.

## Related

- [OverDrive API](https://fous.com/workflows/overdrive.md): Find ebooks and audiobooks at public libraries.
- [Goodreads API](https://fous.com/workflows/goodreads.md): Goodreads returns public book searches, matched-book details with variable editions, popular or newest reviews, author books by popularity or date, and up to 100 quotes.
- [Google Books API](https://fous.com/workflows/google-books.md): Google Books searches books and provides book details, reader ratings, and local ebook prices when available; newest results sort by publication date.
- [Project Gutenberg API](https://fous.com/workflows/project-gutenberg.md): Project Gutenberg offers free public-domain ebooks and reading materials, with searchable book details and plain text from the most-downloaded matching edition available.
- [Audible API](https://fous.com/workflows/audible.md): Audible offers audiobooks, podcasts, and audio entertainment, with public book details and current bestselling audiobook charts; availability and categories vary by store.
- [Library of Congress API](https://fous.com/workflows/library-of-congress.md): Library of Congress returns searchable digital collections and historic newspaper pages; rights notes may be absent, and newspaper text may contain OCR errors.
- [OpenAlex API](https://fous.com/workflows/openalex.md): OpenAlex is an open catalog of scholarly research and connections, offering ranked papers and institution research summaries with annual output, leading topics, and coauthors.
- [Books to Scrape API](https://fous.com/workflows/books-to-scrape.md): Demo book catalog with synthetic prices.
- [All Education workflows](https://fous.com/workflows/category/education)
