# Project Gutenberg API: Get book text

> Gets 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 the Gutenberg header and license, and can cut the text after a chosen number of words.

Unofficial. Not affiliated with or endorsed by Project Gutenberg.

- Page: https://fous.com/methods/gutenberg.org/get-book-text
- Method: `gutenberg.org/get_book_text`, version 1
- Website: gutenberg.org
- Returns: title, author, language, release date, word count, book text, book page link, ebook number
- 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 |
|---|---|---|---|---|
| `title` | string | yes | `"War and Peace"` | Book title, for example Pride and Prejudice. |
| `author` | string | no | `"Leo Tolstoy"` | Author name to distinguish books, for example Jane Austen. |
| `language` | string | no |  | Book language, for example English or French. Default "English". |
| `max_words` | integer | no | `600000` | Maximum number of words to include in the returned text, for example 200000. Default 200000. |

## Output

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

```json
{
  "title": "War and Peace",
  "author": "Leo Tolstoy",
  "max_words": 600000
}
```

Its output:

```json
{
  "title": "War and Peace",
  "author": "Leo Tolstoy",
  "language": "English",
  "book_text": "WAR AND PEACE\r\n\r\n\r\nBy Leo Tolstoy/Tolstoi\r\n\r\n\r\n    Contents\r\n\r\n    BOOK ONE: 1805\r\n\r\n    CHAPTER I\r\n\r\n    CHAPTER II\r\n\r\n    CHAPTER III\r\n\r\n    CHAPTER IV\r\n\r\n    CHAPTER V\r\n\r\n    CHAPTER VI\r\n\r\n    CHAPTER VII\r\n\r\n    CHAPTER VIII\r\n\r\n    CHAPTER IX\r\n\r\n    CHAPTER X\r\n\r\n    CHAPTER XI\r\n\r\n    CHAPTER XII\r…",
  "ebook_number": 2600,
  "release_date": "2001-04-01",
  "text_was_cut": false,
  "book_page_link": "https://www.gutenberg.org/ebooks/2600",
  "total_word_count": 563286
}
```

## 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":"gutenberg.org/get_book_text","input":{"title":"War and Peace","author":"Leo Tolstoy","max_words":600000}}'
```

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

- Grab me the full plain text of Moby-Dick by Herman Melville from Project Gutenberg, without the license boilerplate at the top and bottom.
- I need the first 5,000 words of Les Misérables in the original French, by Victor Hugo.
- Pull the text of Frankenstein by Mary Shelley so I can run some word-frequency analysis on it. Also give me the ebook number and release date.
- Can you fetch the opening 2000 words of 'The Adventures of Sherlock Holmes' from gutenberg.org? I want to read a bit before committing.
- Get me the German text of Die Verwandlung by Franz Kafka, capped at 30000 words, plus a link to its book page.

## Input schema

```json
{
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "description": "Book title, for example Pride and Prejudice."
    },
    "author": {
      "type": "string",
      "description": "Author name to distinguish books, for example Jane Austen."
    },
    "language": {
      "type": "string",
      "default": "English",
      "description": "Book language, for example English or 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."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "title",
    "author",
    "language",
    "release_date",
    "total_word_count",
    "text_was_cut",
    "book_text",
    "book_page_link",
    "ebook_number"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Book title."
    },
    "author": {
      "type": "string",
      "description": "Book author."
    },
    "language": {
      "type": "string",
      "description": "Book language."
    },
    "book_text": {
      "type": "string",
      "description": "Book text with Project Gutenberg header and license footer removed."
    },
    "ebook_number": {
      "type": "integer",
      "description": "Project Gutenberg ebook number."
    },
    "release_date": {
      "type": "string",
      "description": "Project Gutenberg release date."
    },
    "text_was_cut": {
      "type": "boolean",
      "description": "Whether the returned text was shortened to max_words."
    },
    "book_page_link": {
      "type": "string",
      "description": "Project Gutenberg book page."
    },
    "total_word_count": {
      "type": "integer",
      "description": "Words in the full cleaned text before cutting."
    }
  },
  "additionalProperties": false
}
```

## See more

- [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.
- [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.
- [Goodreads API: Get book](https://fous.com/methods/goodreads.com/get-book.md): Gets one Goodreads book's details, reader ratings and edition information. The book can be a title, an ISBN or a book link; a title uses the best search match.
- [Google API: Get book](https://fous.com/methods/books.google.com/get-book.md): Looks up a Google Books book by title or ISBN. Returns its details, reader ratings and the Google Play ebook offer in a chosen country.
- [Poetry Foundation API: Get poem by title](https://fous.com/methods/poetryfoundation.org/get-poem.md): Finds a poem on Poetry Foundation by title (optionally by poet) and returns its full public text, poet, printed source, publication year and subject tags.
- [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.
- [Wikipedia API: Get full article](https://fous.com/methods/wikipedia.org/get-full-article.md): Returns the full text of a Wikipedia article in ordered sections, with its last edit time, reference count and visible categories, in any language edition. Footnotes, tables and navigation material are excluded; a topic that is not an exact title uses the best search match.
- [Audible API: Get audiobook details](https://fous.com/methods/audible.com/get-audiobook.md): Looks up an audiobook in an Audible store by title (optionally narrowed by author) or by Audible book link, and returns its details, narrators, length, rating, visitor price, series, publisher summary and whether that store's Plus Catalog includes it.
- [All Project Gutenberg methods](https://fous.com/methods/gutenberg.org.md)
