# Project Gutenberg API

> Project Gutenberg returns public-domain book listings and plain text as a workflow and API.

Project Gutenberg (Gutenberg) Search free books finds books by required title, author, or topic, with optional language and sorting. Get book text returns a book’s plain text by required title, with optional author, language, and word limit.

- Page: https://fous.com/tools/project-gutenberg
- Handle: `@project-gutenberg`
- Category: [Education](https://fous.com/tools/category/education)
- Source website: https://gutenberg.org
- Last verified: Sep 29, 2026

## Methods

### Get book text

Operation `get_book_text`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the plain text of a public-domain Project Gutenberg book by title, optionally matching its author and language. Chooses the most downloaded matching edition with a plain-text file; removes Gutenberg notices and can cut the text after a chosen number of words.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `title` | string | yes | `"Pride and Prejudice"` | Book title, for example Pride and Prejudice. |
| `author` | string | no | `"Jane Austen"` | Author name to distinguish books, for example Jane Austen. |
| `language` | string | no | `"French"` | Book language, for example English or French. |
| `max_words` | integer | no | `600000` | Maximum number of words to include in the returned text, for example 200000. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "description": "Book title, for example Pride and Prejudice.",
      "examples": [
        "Pride and Prejudice",
        "War and Peace",
        "Candide"
      ]
    },
    "author": {
      "type": "string",
      "description": "Author name to distinguish books, for example Jane Austen.",
      "examples": [
        "Jane Austen",
        "Leo Tolstoy",
        "Voltaire"
      ]
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Book language, for example English or French.",
      "examples": [
        "French"
      ]
    },
    "max_words": {
      "type": "integer",
      "default": 200000,
      "maximum": 600000,
      "minimum": 1,
      "description": "Maximum number of words to include in the returned text, for example 200000.",
      "examples": [
        600000,
        300
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "title": "Pride and Prejudice",
      "author": "Jane Austen"
    },
    {
      "title": "War and Peace",
      "author": "Leo Tolstoy",
      "max_words": 600000
    },
    {
      "title": "Candide",
      "author": "Voltaire",
      "language": "French",
      "max_words": 300
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `title` | string | `"Candide, ou l'optimisme"` | Book title. |
| `author` | string | `"Voltaire"` | Book author. |
| `language` | string | `"French"` | Book language. |
| `book_text` | string |  | Book text with Project Gutenberg header and license footer removed. |
| `ebook_number` | integer | `4650` | Project Gutenberg ebook number. |
| `release_date` | string | `"2003-11-01"` | Project Gutenberg release date. |
| `text_was_cut` | boolean | `true` | Whether the returned text was shortened to max_words. |
| `book_page_link` | string | `"https://www.gutenberg.org/ebooks/4650"` | Project Gutenberg book page. |
| `total_word_count` | integer | `34080` | Words in the full cleaned text before cutting. |

**Example input**

```json
{
  "title": "Candide",
  "author": "Voltaire",
  "language": "French",
  "max_words": 300
}
```

**Example output**

```json
{
  "title": "Candide, ou l'optimisme",
  "author": "Voltaire",
  "language": "French",
  "book_text": "OEUVRES\r\n\r\nDE\r\n\r\nVOLTAIRE.\r\n\r\nTOME XXXIII\r\n\r\nDE L’ IMPRIMERIE DE A. FIRMIN DIDOT,\r\n\r\n\r\nRUE JACOB, Nº 24.\r\n\r\nOEUVRES\r\n\r\nDE\r\n\r\nVOLTAIRE\r\n\r\nPRÉFACES, AVERTISSEMENTS, NOTES, ETC.\r\n\r\nPAR M. BEUCHOT.\r\n\r\nTOM…",
  "ebook_number": 4650,
  "release_date": "2003-11-01",
  "text_was_cut": true,
  "book_page_link": "https://www.gutenberg.org/ebooks/4650",
  "total_word_count": 34080
}
```

### Search free books

Operation `search_free_books`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find 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.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"newest"` | Sort by popularity, newest release, or title; for example popular. |
| `query` | string | yes | `"Jane Austen"` | Book title, author, or topic, for example Sherlock Holmes. |
| `language` | string | no | `"French"` | Language name or two-letter code, for example French or fr; default any. |
| `max_results` | integer | no | `5` | Maximum number of books to return, for example 20; at most 100. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "sort": {
      "enum": [
        "popular",
        "newest",
        "title"
      ],
      "type": "string",
      "default": "popular",
      "description": "Sort by popularity, newest release, or title; for example popular.",
      "examples": [
        "newest",
        "title"
      ]
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Book title, author, or topic, for example Sherlock Holmes.",
      "examples": [
        "Jane Austen",
        "xzxzqwyarandomnobooktitle",
        "Sherlock Holmes"
      ]
    },
    "language": {
      "type": "string",
      "default": "any",
      "description": "Language name or two-letter code, for example French or fr; default any.",
      "examples": [
        "French"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of books to return, for example 20; at most 100.",
      "x-fous-developer": true,
      "examples": [
        5,
        30
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "newest",
      "query": "Jane Austen",
      "language": "French",
      "max_results": 5
    },
    {
      "query": "xzxzqwyarandomnobooktitle"
    },
    {
      "query": "Sherlock Holmes"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `books` | array |  |  |
| `books[].title` | string | `"Raison et sensibilité, ou les deux manières d'aimer (Tome 4)"` |  |
| `books[].authors` | array |  |  |
| `books[].subjects` | array |  |  |
| `books[].languages` | array |  |  |
| `books[].ebook_number` | integer | `37634` |  |
| `books[].book_page_link` | string | `"https://www.gutenberg.org/ebooks/37634"` |  |
| `books[].cover_image_link` | string or null | `"https://www.gutenberg.org/cache/epub/37634/pg37634.cover.medium.jpg"` |  |
| `books[].read_online_link` | string or null | `"https://www.gutenberg.org/cache/epub/37634/pg37634-images.html"` |  |
| `books[].epub_download_link` | string or null | `"https://www.gutenberg.org/ebooks/37634.epub3.images"` |  |
| `books[].downloads_last_30_days` | integer or null | `385` |  |
| `books[].plain_text_download_link` | string or null | `"https://www.gutenberg.org/ebooks/37634.txt.utf-8"` |  |

**Example input**

```json
{
  "sort": "newest",
  "query": "Jane Austen",
  "language": "French",
  "max_results": 5
}
```

**Example output**

```json
{
  "books": [
    {
      "title": "Raison et sensibilité, ou les deux manières d'aimer (Tome 4)",
      "authors": [
        {
          "name": "Austen, Jane",
          "birth_year": 1775,
          "death_year": 1817
        }
      ],
      "subjects": [
        "England -- Social life and customs -- 19th century -- Fiction",
        "Inheritance and succession -- Fiction"
      ],
      "languages": [
        "French"
      ],
      "ebook_number": 37634,
      "book_page_link": "https://www.gutenberg.org/ebooks/37634",
      "cover_image_link": "https://www.gutenberg.org/cache/epub/37634/pg37634.cover.medium.jpg",
      "read_online_link": "https://www.gutenberg.org/cache/epub/37634/pg37634-images.html",
      "epub_download_link": "https://www.gutenberg.org/ebooks/37634.epub3.images",
      "downloads_last_30_days": 385,
      "plain_text_download_link": "https://www.gutenberg.org/ebooks/37634.txt.utf-8"
    },
    {
      "title": "Persuasion",
      "authors": [
        {
          "name": "Austen, Jane",
          "birth_year": 1775,
          "death_year": 1817
        }
      ],
      "subjects": [
        "England -- Social life and customs -- 19th century -- Fiction",
        "Psychological fiction"
      ],
      "languages": [
        "French"
      ],
      "ebook_number": 36777,
      "book_page_link": "https://www.gutenberg.org/ebooks/36777",
      "cover_image_link": "https://www.gutenberg.org/cache/epub/36777/pg36777.cover.medium.jpg",
      "read_online_link": "https://www.gutenberg.org/cache/epub/36777/pg36777-images.html",
      "epub_download_link": "https://www.gutenberg.org/ebooks/36777.epub3.images",
      "downloads_last_30_days": 698,
      "plain_text_download_link": "https://www.gutenberg.org/ebooks/36777.txt.utf-8"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@project-gutenberg",
  "visibility": "public",
  "operation": "get_book_text",
  "version": 1,
  "input": {
    "title": "Pride and Prejudice",
    "author": "Jane Austen"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@project-gutenberg\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_book_text\",\n  \"version\": 1,\n  \"input\": {\n    \"title\": \"Pride and Prejudice\",\n    \"author\": \"Jane Austen\"\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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@project-gutenberg",
  "visibility": "public",
  "operation": "get_book_text",
  "version": 1,
  "input": {
    "title": "Pride and Prejudice",
    "author": "Jane Austen"
  },
  "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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/project-gutenberg`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_book_text`: Get book text. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `search_free_books`: Search free books. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-project-gutenberg https://api.fous.com/mcp/tools/project-gutenberg --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find books by title, author, or topic
- Filter book searches by language
- Compare recent book downloads
- Read book text for research
- Limit returned text to a chosen word count

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Project Gutenberg tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Project Gutenberg account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from gutenberg.org when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### How can I find books by topic or author?

Search free books finds books by title, author, or topic, with optional language and sorting.

### Can I get the text of a book?

Get book text returns plain text by title, with optional author and language matching.

### Can I limit how much book text is returned?

Get book text can cut the returned text after a chosen maximum number of words.

## Related

- [Google Books API](https://fous.com/tools/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.
- [Open Library API](https://fous.com/tools/open-library.md): Open Library returns book search results, catalog details, and author works; availability reflects listed editions, not current loan availability, and catalog details may be missing.
- [Goodreads API](https://fous.com/tools/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.
- [OverDrive API](https://fous.com/tools/overdrive.md): Find ebooks and audiobooks at public libraries.
- [Bible Gateway API](https://fous.com/tools/bible-gateway.md): Bible Gateway provides passage readings up to one chapter, searches returning up to 100 related verses, and a daily verse that may differ by date or translation availability.
- [Britannica API](https://fous.com/tools/britannica.md): Britannica returns public encyclopedia articles with introductions, quick facts, headings, update dates and images, plus search results with titles, descriptions, links and images when shown.
- [Audible API](https://fous.com/tools/audible.md): Audible offers audiobooks, podcasts, and audio entertainment, with public book details and current bestselling audiobook charts; availability and categories vary by store.
- [Poetry Foundation API](https://fous.com/tools/poetry-foundation.md): Poetry Foundation provides poems, poets, and poetry resources; poem searches follow its search order, while full text is limited to publicly available poems.
- [All Education tools](https://fous.com/tools/category/education)
