# Goodreads Books Scraper (`scrapyx/goodreads-books-scraper`) Actor

Scrapes books from Goodreads Listopia lists: title, author, average rating, ratings count, cover and list rank/score per book, with an optional detail pass adding page count, format, language, awards, description and genres.

- **URL**: https://apify.com/scrapyx/goodreads-books-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** E-commerce, Education, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.56 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Goodreads Books Scraper (Listopia)

Scrapes books from [Goodreads](https://www.goodreads.com) Listopia lists —
community-curated rankings like *Best Books Ever*, *Best Fantasy of the 2020s*
or any genre/award list. HTTP-only, no browser.

### What you get

One row per book, plus a `LIST_SUMMARY` row per list and an `ERROR` row for any
input that fails — so **every input maps to at least one row**.

| Field | Example |
| --- | --- |
| `bookId` | `2767052` |
| `title` | `The Hunger Games (The Hunger Games, #1)` |
| `author` | `Suzanne Collins` |
| `avgRating` | `4.35` |
| `ratingsCount` | `10232595` |
| `listRank` | `1` (position in this list) |
| `listScore` | `4518690` (Listopia vote score) |
| `bookUrl` / `coverImage` | full URLs |

#### Optional detail pass

`includeBookDetails: true` fetches each book's page and attaches its JSON-LD
`Book` under `bookDetail`, adding `aggregateRating`, `numberOfPages`,
`bookFormat`, `inLanguage`, `awards` and the full author list — plus, under
`bookDetail.goodreadsExtras`, the **description** and **genres**, which the
JSON-LD does not carry. One extra request per book, so it is off by default.

### Input

```json
{
  "listUrls": [
    "https://www.goodreads.com/list/show/1.Best_Books_Ever"
  ],
  "maxItems": 100,
  "includeBookDetails": false
}
```

Open any Listopia list on Goodreads and paste its URL. Lists get large —
*Best Books Ever* holds ~79,000 books at 100 per page — so `maxItems` and
`maxPages` are the cost controls.

### Why list URLs instead of a search box

Goodreads' `robots.txt` disallows `/search`, `/work`, `/review/show` and
`/book/reviews/` for generic crawlers. Listopia (`/list/show/…`), book pages
and author pages are **not** disallowed, and Goodreads publishes
`siteindex.list.xml` advertising those lists for crawling.

So this actor takes list URLs and **refuses a pasted `/search` URL** rather than
quietly fetching a surface the site asks crawlers to stay off. Reviews are not
scraped at all, for the same reason.

### Known limits

**Pagination ends by repetition, not emptiness.** Past a long list's real end,
Goodreads re-serves the **last** page forever (pages 790–2000 of list 1 all
returned the identical 100 books). This actor dedups by book id and stops when
a page yields no new ids, reporting `paginationClampHit`. Short lists do end
honestly with an empty page; both paths are handled.

**`listTotalBooks` is the list's declared size**, not the number of rows you
will get — that depends on `maxItems`/`maxPages` and where the clamp begins.

**A dead book id answers HTTP 503, not 404.** Handled: such a book keeps its
list row with `bookDetail: null` rather than failing the run.

### Anti-bot / transport

No WAF, challenge page or JS gate was observed — 8 TLS profiles returned clean
200s cold, without warmup. List pages are large (~770 KB), and two transient
read timeouts appeared during deep-pagination probing, so the client keeps a
wide profile pool and rotates on retry rather than hammering one profile.
Residential proxy is the default, without a country pin.

# Actor input Schema

## `listUrls` (type: `array`):

One or more Goodreads Listopia list URLs, e.g. https://www.goodreads.com/list/show/1.Best\_Books\_Ever. Open any list on Goodreads and paste its URL. Each list gets its own LIST\_SUMMARY row. Only the /list/show/ form is accepted: Goodreads' robots.txt disallows its /search and /work surfaces for generic crawlers, so this actor refuses those URLs rather than fetching them.

## `includeBookDetails` (type: `boolean`):

Also fetch each book's page, adding its JSON-LD (average rating and rating count, page count, format, language, awards, full author list) plus description and genres from the page's Apollo cache. List rows already carry title, author, average rating, ratings count, cover and list rank/score. Off by default: one extra request per book.

## `maxItems` (type: `integer`):

Stop after this many books per list. Set to 0 for unlimited (still bounded by Max pages). Lists can be very large -- 'Best Books Ever' holds roughly 79,000 books at 100 per page.

## `maxPages` (type: `integer`):

Hard cap on pagination depth (100 books/page) as a cost guard. It is not the correctness stop condition: past a list's real end Goodreads re-serves the last page forever rather than returning an empty one, so this actor stops on its own once a page yields no new book ids and reports that as paginationClampHit.

## `maxConcurrency` (type: `integer`):

Upper bound on requests in flight at once, across list pages and detail fetches. Kept moderate by default: list pages are large (~770 KB each).

## `minRequestInterval` (type: `integer`):

Paces request starts without holding a concurrency slot. Raise it if you see repeated timeout or retry warnings in the log.

## `proxyConfiguration` (type: `object`):

No WAF or bot challenge was observed for Goodreads (8 TLS profiles, clean cold). Residential proxy is the default as this portfolio's standard baseline, deliberately without a country pin since the site is global.

## Actor input object example

```json
{
  "listUrls": [
    "https://www.goodreads.com/list/show/1.Best_Books_Ever"
  ],
  "includeBookDetails": false,
  "maxItems": 100,
  "maxPages": 10,
  "maxConcurrency": 3,
  "minRequestInterval": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "listUrls": [
        "https://www.goodreads.com/list/show/1.Best_Books_Ever"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/goodreads-books-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "listUrls": ["https://www.goodreads.com/list/show/1.Best_Books_Ever"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/goodreads-books-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "listUrls": [
    "https://www.goodreads.com/list/show/1.Best_Books_Ever"
  ]
}' |
apify call scrapyx/goodreads-books-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/goodreads-books-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/v3lhZdihd9XH4LAPu/builds/BWVeaUSbhtK4kUqWK/openapi.json
