# Goodreads Scraper (`lulzasaur/goodreads-scraper`) Actor

Scrape Goodreads book data. Search by title, author, or ISBN. Returns ratings, reviews, genres, page counts, and publication info.

- **URL**: https://apify.com/lulzasaur/goodreads-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** Other
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Goodreads Scraper

An [Apify](https://apify.com) Actor that scrapes book data from [Goodreads](https://www.goodreads.com) shelf/genre pages. Built with [Crawlee](https://crawlee.dev) CheerioCrawler for fast, efficient HTML parsing.

### What it does

This scraper extracts book data from Goodreads shelf pages (e.g., `goodreads.com/shelf/show/science-fiction`). Each shelf page lists 50 popular books in that genre, ranked by how many users shelved them.

#### Two modes of operation

1. **Shelf mode** (default): Scrapes book listings from shelf pages. Fast -- extracts title, author, rating, rating count, published year, shelf count, and cover image directly from the listing.

2. **Detail mode** (`scrapeDetails: true`): Also visits each book's individual page to extract rich structured data from Goodreads' JSON-LD schema, including full description, genres, page count, ISBN, book format, language, awards, and review count.

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | string\[] | `["science-fiction"]` | Shelf/genre names to scrape. Maps to `goodreads.com/shelf/show/{name}`. |
| `maxBooks` | integer | `100` | Maximum books per shelf. Set to 0 for unlimited. |
| `scrapeDetails` | boolean | `false` | Visit each book's detail page for full data (slower). |
| `proxyConfiguration` | object | `{ useApifyProxy: false }` | Proxy settings for large-scale runs. |

#### Popular shelf names

`science-fiction`, `fantasy`, `mystery`, `romance`, `non-fiction`, `thriller`, `horror`, `historical-fiction`, `young-adult`, `classics`, `biography`, `self-help`, `poetry`, `graphic-novels`, `philosophy`, `true-crime`, `dystopian`, `adventure`, `humor`, `manga`

### Output

#### Shelf mode fields

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Book title (may include series info) |
| `author` | string | Author name |
| `authorUrl` | string | Link to author's Goodreads page |
| `rating` | number | Average rating (1-5 scale) |
| `ratingCount` | number | Total number of ratings |
| `publishedYear` | number | Year of first publication |
| `shelfCount` | number | Times shelved under this genre |
| `coverImage` | string | URL of book cover image |
| `bookId` | string | Goodreads book ID |
| `url` | string | Full Goodreads URL for the book |
| `searchQuery` | string | The shelf/genre name used |
| `scrapedAt` | string | ISO 8601 timestamp |

#### Additional detail mode fields

| Field | Type | Description |
|-------|------|-------------|
| `description` | string | Full book description |
| `genres` | string\[] | List of genres/tags |
| `isbn` | string | ISBN number |
| `bookFormat` | string | Format (Hardcover, Paperback, etc.) |
| `numberOfPages` | number | Page count |
| `language` | string | Book language |
| `awards` | string | Awards received |
| `reviewCount` | number | Total number of text reviews |
| `authors` | object\[] | Array of author objects with name and URL |
| `publicationInfo` | string | Full publication details |

### Example usage

#### Basic: Top science fiction books

```json
{
    "searchQueries": ["science-fiction"],
    "maxBooks": 50
}
```

#### Multiple genres with details

```json
{
    "searchQueries": ["fantasy", "mystery", "romance"],
    "maxBooks": 100,
    "scrapeDetails": true
}
```

#### Large-scale with proxy

```json
{
    "searchQueries": ["science-fiction", "fantasy", "thriller", "horror"],
    "maxBooks": 500,
    "scrapeDetails": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Example output

```json
{
    "title": "Dune (Dune, #1)",
    "author": "Frank Herbert",
    "authorUrl": "https://www.goodreads.com/author/show/58.Frank_Herbert",
    "rating": 4.29,
    "ratingCount": 1645579,
    "publishedYear": 1965,
    "shelfCount": 21643,
    "coverImage": "https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/books/1555447414l/44767458._SX318_.jpg",
    "bookId": "44767458",
    "url": "https://www.goodreads.com/book/show/44767458-dune",
    "searchQuery": "science-fiction",
    "scrapedAt": "2026-03-17T12:00:00.000Z"
}
```

### Technical notes

- Uses CheerioCrawler (HTTP-only, no browser) for maximum speed
- Shelf pages (`/shelf/show/`) and book pages (`/book/show/`) are allowed by Goodreads robots.txt
- Rate-limited to avoid overloading servers (30-40 requests/minute)
- Shelf pages return 50 books per page, paginated with `?page=N`
- Detail pages use Goodreads' JSON-LD `@type: Book` structured data for reliable extraction
- No Cloudflare or CAPTCHA protection on these endpoints

### Running locally

```bash
apify run --purge
```

Make sure to set your input in `storage/key_value_stores/default/INPUT.json`.

### Deploy to Apify

```bash
apify login
apify push
```

### Related Scrapers

More marketplace scrapers and data tools by [lulzasaur](https://apify.com/lulzasaur):

- [AbeBooks Scraper](https://apify.com/lulzasaur/abebooks-scraper) — Rare and used books
- [Bonanza Scraper](https://apify.com/lulzasaur/bonanza-scraper) — Online marketplace listings
- [Contractor License Verifier](https://apify.com/lulzasaur/contractor-license-scraper) — Multi-state license verification
- [Craigslist Scraper](https://apify.com/lulzasaur/craigslist-scraper) — Classifieds and for-sale posts
- [Grailed Scraper](https://apify.com/lulzasaur/grailed-scraper) — Luxury fashion resale
- [Houzz Scraper](https://apify.com/lulzasaur/houzz-scraper) — Home improvement professionals
- [IMDb Scraper](https://apify.com/lulzasaur/imdb-scraper) — Movie and TV show data
- [Nurse License Verifier](https://apify.com/lulzasaur/nurse-license-scraper) — State nursing board verification
- [OfferUp Scraper](https://apify.com/lulzasaur/offerup-scraper) — Local marketplace listings
- [Poshmark Scraper](https://apify.com/lulzasaur/poshmark-scraper) — Fashion resale marketplace
- [PSA Population Report](https://apify.com/lulzasaur/psa-pop-scraper) — Card grading data
- [Redfin Scraper](https://apify.com/lulzasaur/redfin-scraper) — Real estate listings and prices
- [Reverb Scraper](https://apify.com/lulzasaur/reverb-scraper) — Music gear marketplace
- [StubHub Scraper](https://apify.com/lulzasaur/stubhub-scraper) — Event ticket prices
- [Swappa Scraper](https://apify.com/lulzasaur/swappa-scraper) — Used electronics marketplace
- [TCGPlayer Scraper](https://apify.com/lulzasaur/tcgplayer-scraper) — Trading card prices
- [ThriftBooks Scraper](https://apify.com/lulzasaur/thriftbooks-scraper) — Used book prices
- [Thumbtack Scraper](https://apify.com/lulzasaur/thumbtack-scraper) — Local service professionals

# Actor input Schema

## `searchQueries` (type: `array`):

List of Goodreads shelf or genre names to scrape (e.g., 'science-fiction', 'fantasy', 'mystery', 'romance', 'non-fiction'). Each name corresponds to a shelf page at goodreads.com/shelf/show/{name}.

## `maxBooks` (type: `integer`):

Maximum number of books to scrape per shelf/genre. Each shelf page shows 50 books. Set to 0 for unlimited.

## `scrapeDetails` (type: `boolean`):

If enabled, visits each book's detail page to get full description, genres, page count, ISBN, book format, language, awards, and review count from JSON-LD structured data. Slower but much richer data. If disabled, only scrapes shelf listing data (title, author, rating, rating count, published year).

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

Proxy settings. Not required for basic Goodreads scraping but recommended for large-scale runs to avoid rate limiting.

## Actor input object example

```json
{
  "searchQueries": [
    "science-fiction"
  ],
  "maxBooks": 100,
  "scrapeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "searchQueries": [
        "science-fiction"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/goodreads-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 = { "searchQueries": ["science-fiction"] }

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/goodreads-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 '{
  "searchQueries": [
    "science-fiction"
  ]
}' |
apify call lulzasaur/goodreads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lulzasaur/goodreads-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/ZoW1w9sWCopH25yPB/builds/Mar2H0n1xK372OpB4/openapi.json
