Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Goodreads Books Metadata

Dataset Description

Goodreads Books Metadata is a structured dataset of book records scraped directly from Goodreads, a social platform for book readers and recommendations. The dataset was collected in July 2026 and contains rich metadata per book: bibliographic information, crowd-sourced ratings, reader engagement signals (currently reading, want to read), author-level statistics, genre tags, and descriptive text.

The primary research objectives behind this dataset are:

  • Understanding how users rate books on Goodreads — what drives average ratings, what genres score highest, how reviewer volume correlates with ratings.
  • Identifying the most preferred books — top-rated titles, best-sellers by engagement, most discussed books.
  • Profiling the type of readers on the platform — inferred from engagement metrics such as num_want_to_read, num_currently_reading, and num_reviews.

This dataset is part of a personal data science portfolio projects, demonstrating end-to-end data collection, transformation, and analysis on a real-world social platform.

  • Homepage: https://www.goodreads.com
  • Repository (source code): See book_scraper.py and main.py in this repo
  • Point of Contact: pfaha (Hugging Face profile)

Dataset Summary

Property Value
Source Goodreads books pages (scraped)
Collection date July 2026
Format Parquet (partitioned, ~100 rows per file)
Language English (primary)
Storage size ~28 MB
Number of files ~381 part files

Supported Tasks

This dataset can support various tasks among which we identify the following:

  • Book rating prediction — Predict a book's average_rating from other features in the dataset.
  • Genre classification — Classify books into genre categories using description text and other metadata.
  • Popularity analysis — Rank and compare books by reader engagement (num_want_to_read, num_currently_reading, num_reviews).
  • Author influence analysis — Study how author follower counts and book counts correlate with book ratings.
  • Reading behavior profiling — Use num_currently_reading and num_want_to_read as proxies for user interest distribution.

Data Collection

Scraping pipeline

The dataset was collected using a custom Python scraper (book_scraper.py) driven by a CLI entry point (main.py). The pipeline works as follows:

  1. A master list of Goodreads book IDs (books_ids.txt) is stored on this Hugging Face Hub repository. The scraper loads this list at startup.
  2. For each book ID, the scraper fetches https://www.goodreads.com/book/show/{id} using requests with browser-like headers to avoid bot detection.
  3. The page is parsed in priority order:
    • First: the __NEXT_DATA__ JSON hydration payload embedded in the Next.js-rendered page (most complete and reliable source).
    • Second: application/ld+json JSON-LD structured data blocks.
    • Third: regex extraction over raw page text (fallback, used only when structured data is absent).
  4. After extracting book metadata, the scraper additionally fetches the first author's Goodreads profile page to enrich the record with first_author_num_books and first_author_num_followers.
  5. Records are buffered in memory and checkpointed to the Hub every 100 books as numbered Parquet files (books-partN.parquet). A local scraped_ids.txt file tracks already-scraped IDs to allow resumable, fault-tolerant runs.
  6. IDs that fail after all retry attempts are collected in failed_books_ids.txt for later inspection.

Politeness and rate limiting

The scraper enforces a 2-second base delay between requests plus random jitter (up to 1 second), and implements exponential back-off when HTTP 429 (Too Many Requests) or 523 (origin unreachable) responses are received, capping the wait at 60 seconds. Two concurrent worker threads are used by default.

Text cleaning

All text fields undergo a cleaning pipeline: HTML entity unescaping, NFKC Unicode normalization, non-breaking space replacement, BOM stripping, control character removal, parenthesized segment removal, whitespace collapsing, and lowercasing.


Dataset Structure

Data Fields

Column Type Description
book_id int64 Numeric Goodreads book ID, extracted from the page URL.
url string Full Goodreads URL for the book page (e.g. https://www.goodreads.com/book/show/92).
title string Book title as displayed on Goodreads, lowercased.
first_author string Name of the first (primary) author listed on the page.
first_author_url string Goodreads author profile URL for the first author.
first_author_num_books int64 Number of distinct works listed on the author's Goodreads page. Proxy for author prolificacy.
first_author_num_followers int64 Number of Goodreads followers for the first author at the time of scraping. Proxy for author popularity.
average_rating float64 Crowd-sourced average star rating (1.0–5.0) aggregated across all Goodreads user ratings.
num_reviews int64 Total number of text reviews submitted by Goodreads users.
first_published string First publication date as a string (e.g. "January 28, 1997", "1880", or "January 1997"). Not normalized to a date type to preserve original granularity.
publisher string Publisher name for the edition referenced on the Goodreads page. null if not available or bad scraping.
language_code string Language of the edition (e.g. "english").
num_pages int64 Page count for the edition. 0 if not available or bad scraping.
description string Full book description text from the Goodreads page, lowercased and cleaned.
genres string Comma-separated list of genres tags (e.g. "fiction, historical fiction, classics"). null if not available or bad scraping.
format string Edition binding format (e.g. "paperback", "hardcover", "kindle edition", "audiobook"). null if not available or bad scraping.
series string Series name if the book belongs to a series (e.g. "rose trilogy"). null if standalone.
num_currently_reading int64 Number of Goodreads users who had this book marked as "currently reading" at scrape time. Engagement signal.
num_want_to_read int64 Number of Goodreads users who had this book on their "want to read" list at scrape time. Popularity/demand signal.

Data Splits

This dataset has no predefined train/validation/test split. All records are provided as a single collection partitioned across numbered Parquet files (books-part1.parquetbooks-part348.parquet). Each parquet file has 100 or less books information. Users should define their own splits depending on the downstream task.

Example Row

book_id                     : 1
url                         : https://www.goodreads.com/book/show/1
title                       : harry potter and the half-blood prince
first_author                : j.k. rowling
first_author_url            : https://www.goodreads.com/author/show/1077326.J_K_Rowling
first_author_num_books      : 743
first_author_num_followers  : 235611
average_rating              : 4.58
num_reviews                 : 73768
first_published             : july 16, 2005
publisher                   : scholastic inc
language_code               : english
num_pages                   : 652
description                 : it is the middle of the summer, ... 
genres                      : fantasy, fiction, young adult, harry potter, magic, audiobook, childrens
format                      : audiobook
series                      : harry potter
num_want_to_read            : 57250
num_currently_reading       : 607895

Dataset Creation

Curation Rationale

Goodreads is a social reading platform, hosting over million user ratings and reviews. This dataset was created to enable research into collective reading preferences, rating dynamics, and book popularity patterns as expressed by a large and diverse online community. It provides a real-world, richly annotated corpus suitable for social science research.

Source Data

All data originates from public Goodreads book pages. No authentication or account was required for access. Only publicly visible metadata was collected, and no user-identifiable information is present in this dataset.

Annotations

This dataset contains no manual annotations. All labels and values are scraped directly from Goodreads pages and reflect the community-aggregated state of the platform at the time of collection (July 2026).


Considerations for Using the Data

Social Impact

Findings derived from this data may not be representative of global reading preferences. Researchers should account for this selection bias.

Limitations

  • Snapshot in time

Data was scraped in July 2026 on the first 40000 books in Goodreads database. Books which are added after this date aren't taken into account, and even not all books added before this date are present in this dataset. Some information change daily on the live platform, for example, first_author_num_books, first_author_num_followers, num_reviews, num_want_to_read, and num_currently_reading.

  • Parsing coverage

The scraper uses fallback strategies. Fields may be null or 0 for pages where the fallback strategies failed to extract a value.

  • Language bias

While language_code is included, the scraper targeted book IDs without language filtering. The majority of records were English-language books.

  • Author enrichment

Only the first listed author is enriched with follower and book count data. Co-authors and secondary authors are not captured.

  • No ratings distribution

Individual star ratings (1★ to 5★ counts) are not included - only the aggregated average_rating was kept.

Licensing and Terms

This dataset was collected from publicly accessible Goodreads pages for research and educational purposes. Users of this dataset are responsible for complying with Goodreads' Terms of Service. This dataset is not affiliated with, endorsed by, or officially provided by Goodreads or Amazon.

Do not use this dataset for commercial purposes without verifying applicable terms.


How to Load

Using 🤗 datasets

from datasets import load_dataset

ds = load_dataset("pfaha/goodreads-books")

Using pandas directly (Parquet)

import pandas as pd
from huggingface_hub import HfFileSystem
fs = HfFileSystem()

# Load a single part (e.g. part1)
df = pd.read_parquet("hf://datasets/pfaha/goodreads-books/books-part1.parquet")

# Load all parts
files = fs.glob("datasets/pfaha/goodreads-books/books-part*.parquet")
df = pd.concat([pd.read_parquet(f"hf://{f}") for f in files])

Research Use Cases and Example Questions

Below are example analytical questions this dataset can help answer:

import pandas as pd

df = pd.concat([pd.read_parquet(f) for f in sorted(glob.glob("books-part*.parquet"))])

# Average rating by genre (explode comma-separated genres)
genre_ratings = df.assign(genre=df["genres"].str.split(", ")).explode("genre")
genre_ratings.groupby("genre")["average_rating"].mean().sort_values(ascending=False).head(20)

# Correlation between author followers and book rating
df[["first_author_num_followers", "average_rating"]].corr()

Citation

If you use this dataset in your research or projects, please cite it as:

@dataset{pfaha_goodreads_books_2026,
  author    = {pfaha},
  title     = {Goodreads Books Metadata},
  year      = {2026},
  month     = {July},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/pfaha/goodreads-books}
}
Downloads last month
38