# Open Library API: Search books

> Finds Open Library books by search words, optionally narrowed by author and subject, sorted by relevance or publication age. Returns work-level results; free_online means at least one edition is marked public or borrowable, not that a loan is available now.

Unofficial. Not affiliated with or endorsed by Open Library.

- Page: https://fous.com/methods/openlibrary.org/search-books
- Method: `openlibrary.org/search_books`, version 1
- Website: openlibrary.org
- Returns: title, authors, first publication year, edition count, ISBNs, languages, cover image, free online flag, Open Library URL
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `sort` | string | no |  | Order results by relevance or publication age, for example newest. One of "relevance", "newest", "oldest". Default "relevance". |
| `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. Default "". |
| `subject` | string | no |  | Narrow results to a subject, for example gardening. Default "". |
| `max_results` | integer | no | `3` | Maximum number of books to return, for example 10. Default 10. |

## Output

From a run on Oct 23, 2026, shortened. Its input:

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

Its output:

```json
{
  "books": [
    {
      "isbns": [
        "9780340839935",
        "9782266320481",
        "9788497596824"
      ],
      "title": "Dune",
      "authors": [
        "Frank Herbert"
      ],
      "work_key": "/works/OL893414W",
      "languages": [
        "Hebrew",
        "Dutch",
        "Romanian"
      ],
      "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
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"openlibrary.org/search_books","input":{"query":"Dune","author":"Frank Herbert","max_results":3}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find books matching the words dune by frank herbert, sorted newest first
- Show me public domain books about gardening, 20 results
- Search Open Library for science fiction from the 1960s oldest first
- List free online editions of books on cooking by Julia Child
- Look up Dune and related titles, relevance order, max 5 results

## 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."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "books"
  ],
  "properties": {
    "books": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "authors",
          "first_published_year",
          "edition_count",
          "isbns",
          "languages",
          "cover_image_url",
          "free_online",
          "open_library_url",
          "work_key"
        ],
        "properties": {
          "isbns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 5,
            "description": "Up to five ISBNs for editions of the work."
          },
          "title": {
            "type": "string",
            "description": "Book title."
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Authors of the work."
          },
          "work_key": {
            "type": "string",
            "description": "Open Library work key."
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Languages of the work as names."
          },
          "free_online": {
            "type": "boolean",
            "description": "Whether any edition is marked public or borrowable for online reading."
          },
          "edition_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of editions indexed for the work."
          },
          "cover_image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cover image link, if available."
          },
          "open_library_url": {
            "type": "string",
            "description": "Open Library work page."
          },
          "first_published_year": {
            "type": [
              "integer",
              "null"
            ],
            "description": "First year of publication, if known."
          }
        },
        "additionalProperties": false
      },
      "description": "Matching books."
    }
  },
  "additionalProperties": false
}
```

## See more

- [Open Library API: List books by author](https://fous.com/methods/openlibrary.org/list-author-books.md): Finds an Open Library author by name, link or key and lists their works with first publication year, edition count, cover and an author profile.
- [Open Library API: Get book details](https://fous.com/methods/openlibrary.org/get-book.md): Gets a book's catalog details from Open Library by 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.
- [Google API: Search Google Books](https://fous.com/methods/books.google.com/search-books.md): Searches Google Books by words, author, subject or ISBN, with language, free-ebook and newest-first options. Ratings counts are not shown by the public book feed; newest sorts the available matches by publication date.
- [Project Gutenberg API: Search free books](https://fous.com/methods/gutenberg.org/search-free-books.md): Finds free public-domain Project Gutenberg books by title, author or topic, with authors, languages, subjects, recent downloads, and reading and download links. Public-domain status is based on the United States.
- [loc.gov API: Search Library of Congress collections](https://fous.com/methods/loc.gov/search-collections.md): Searches Library of Congress digital collections by keywords, material format and date range, in Library search relevance order. Rights notes may be unavailable for some records.
- [OverDrive API: Check library availability](https://fous.com/methods/overdrive.com/check-library-availability.md): Finds ebook and audiobook editions a public library owns on OverDrive, with copies, holds and estimated wait when unavailable.
- [Bluesky API: Search posts](https://fous.com/methods/bsky.app/search-posts.md): Searches public Bluesky posts for words, optionally ordered by latest or top and filtered by date, author or language. Search indexing may lag behind new posts.
- [OpenAlex API: Search scholarly papers](https://fous.com/methods/openalex.org/search-papers.md): Searches OpenAlex scholarly works by topic, with optional institution, publication-year and open-access filters, ranked by relevance, citations or newest date.
- [All Open Library methods](https://fous.com/methods/openlibrary.org.md)
