Skip to main content
WattPDL logo

WattPDL: Wattpad Story Downloader

Download Wattpad stories as offline .txt, .docx, .epub, .md, or .pdf files,
whole or chapter by chapter, with no login or API key.

Release CI Python 3.10+ Platform License Status


English | Bahasa Indonesia


Table of Contents


About

WattPDL is a lightweight Python script that downloads the chapters of a Wattpad story of your choice and saves them as a clean, tidy plain .txt file, a Word .docx document, an .epub ebook, a Markdown .md file, or a .pdf. You can download the whole story as a single file, every chapter separately in one .zip, or only the chapters you pick, complete with the story cover automatically embedded in .docx/.epub/.pdf. No login, no API key, just the story link or ID.

"Because a good story deserves to be read anytime, even without internet."


Features

Download Modes

Feature Description
4 download modes Everything in 1 file, everything separate in a .zip, pick several chapters, or just 1 chapter
Download by author --user <username> downloads all or selected stories from one author at once
Batch from file --file PATH downloads every story listed in a file, one ID or link per line (# for comments), in mode 1 or 2
Search stories --search "<query>" lists matching stories by index (title, author, chapter count, status), 10 per page; download several at once with --select 1-8,10. --search-status, --search-min-chapters, --search-sort, and --search-language filter the list; --search --json prints it as JSON
Non-interactive mode Run with command line arguments for scripting/automation, no prompts to answer
Automatic resume If the process stops midway, run the same story again: chapters that already succeeded are not downloaded again
Skip existing files Skip the download if the output file already exists in the target folder, so nothing is overwritten by accident

Formats and Output

Feature Description
5 file formats Save as plain .txt, Word .docx, .epub ebook, Markdown .md, or .pdf. --format txt,epub or all writes several from the same download
Atomic output files Each file is written to a temporary file first and renamed on success, so a crash never leaves a half-written result
PDF tuning --pdf-pagesize A4|A5 and --pdf-font-size N (6-24) control the PDF layout
Automatic cover The story cover is embedded in .docx/.epub/.pdf files (can be turned off with --no-cover)
Inline images Optional (--include-images) download & embed of images inside chapter text, not just the cover. Very tall images (webtoon/comic strips) are sliced across PDF pages so they stay readable
Rich EPUB metadata Genre/tags, story description, publish date, status (Completed/Ongoing), and source URL are saved as book metadata
--lang Sets the EPUB metadata language code (default id) for stories in other languages
Source link saved The story URL is included in the header of the resulting file
Safe file names Illegal characters are removed from file names automatically
Choose the save folder Defaults to the system Downloads folder, customizable
Custom file name --filename "My Series - Book 1" overrides the output base name for single-story downloads (--id)

Reliability and Performance

Feature Description
No login Uses Wattpad's public endpoint, so no account is needed
Auto-retry A failed chapter is retried up to 3 times before being skipped
Parallel download --workers N downloads several chapters at once, speeding up long stories significantly
Adaptive rate limit The delay between chapters slows down automatically when Wattpad starts limiting requests (429/503), then gradually speeds up again
Metadata cache Story info is cached briefly so repeated attempts in a short time do not always hit the API
Specific error messages Different messages for a deleted story (404) vs a private/restricted one (403)
HTTP tuning --retries N sets the retry count per chapter before skipping (default 3, max 10), --timeout N is the timeout in seconds for every HTTP request
Download report --report PATH.json or .csv writes a machine-readable report of every download in the run
Download history Every successful download is recorded locally; --history (or --history --json) shows the last entries. --no-library skips recording for privacy
Author info --author-info USER lists an author's stories with chapter totals, no download

Automation

Feature Description
New chapter detection --check-updates reports which ongoing stories already have new chapters
Update library --update-library re-downloads every recorded story that has new chapters, so your whole reading list stays current in one command
Library commands --library lists every recorded story, --library-forget <id> stops tracking one story
Watch mode --watch monitors 1 story continuously and re-downloads as soon as a new chapter appears
--json output --library and --check-updates print JSON for scripting and automation
wattpdl update check Notifies you automatically when a newer wattpdl version is on PyPI

Interface and Experience

Feature Description
Neat CLI display Panels, story info tables, and colors thanks to the rich library
English and Indonesian UI The CLI is in English by default; switch with --ui-lang id (menus, messages, and --help)
Animated progress bar Spinner, percentage, chapter count, and estimated time remaining
Final summary A report panel listing failed chapters (if any) when finished
Remembers preferences The last save folder, file format, and language are reused in the next session
Story info wattpdl --info --id <id> shows a story's details (author, chapter count, status, genre, description) without downloading
Dry run --dry-run prints what a download would do (target file, chapters to download and reuse) without writing anything
Doctor --doctor checks dependency imports, data folders, preferences and Wattpad API connectivity
Shell completion --completion bash|zsh|fish|powershell prints a completion script for wattpdl's flags
Preference commands --config shows saved preferences; --config-set file_format=epub changes one
Quiet / verbose --quiet suppresses normal output for cron; --verbose adds a detail line about the active options
Watch notifications --watch-notify-json prints one JSON line per new chapter; --watch-max-iterations N stops a watch loop after N checks

Requirements

Dependency Minimum Version Notes
Python 3.10 Runtime; Windows, macOS, or Linux
Internet connection - Required to reach Wattpad's public API
requests 2.31 HTTP client
rich 13.7 Terminal display
python-docx 1.1 .docx output
EbookLib 0.18 .epub output
reportlab 4.0 .pdf output
pillow 10.0 Image processing for .pdf output

The libraries are installed automatically together with wattpdl, no manual install needed.

Never used a terminal? Start here

How to open a terminal on Windows
  1. Press the Windows key, type PowerShell, then press Enter
  2. A black/blue window opens. That is where you type commands
  3. Every python ... or pip ... command in this guide is typed in that window, followed by Enter
How to open a terminal on macOS
  1. Press Cmd + Space, type Terminal, then press Enter
  2. Type the commands from this guide there, followed by Enter
How to open a terminal on Linux

Press Ctrl + Alt + T, or search for the "Terminal" app in your application menu.

Don't have Python yet?

  1. Go to python.org/downloads and download the latest version
  2. Windows only: during installation, tick the "Add Python to PATH" box on the first screen before clicking Install. If you miss this, the python command will not be recognized later
  3. After installing, open a terminal (see the guide above) and check with:
python --version
# or
python3 --version

If a version number appears (for example Python 3.12.1), you are ready.


Installation

Option A: Install from PyPI (easiest)

  1. Open a terminal (see Never used a terminal? Start here)
  2. Install wattpdl:
pip install wattpdl
  1. Verify the install:
wattpdl --version

If pip is not recognized, try:

python -m pip install wattpdl

If you get an externally-managed-environment error (usually on Linux):

pip install wattpdl --break-system-packages

Once installed, the wattpdl command works from any terminal. Continue to Usage.

Option B: Build from source (for development / to read or change the code)

1. Get the project code

I have Git installed
git clone https://github.com/nekonaru/wattpdl.git
cd wattpdl
I don't have Git
  1. Open the repository page on GitHub
  2. Click the green Code button, choose Download ZIP
  3. Extract the downloaded ZIP file to a folder of your choice
  4. In the terminal, go into the extracted folder, for example:
cd Downloads/wattpdl-main

2. Install dependencies and verify

pip install -e .
wattpdl --version

Same as Option A, add --break-system-packages at the end if you get an externally-managed-environment error.

This also registers the wattpdl command, but it loads the code directly from this folder, which is ideal if you want to modify the code and see the result right away without reinstalling.

3. Run the tests

pip install -e .[dev]
pytest tests/ -v
ruff check .

Option C: Arch Linux (AUR)

Arch Linux users can install it from the AUR. The package is community maintained by @Vaishnav-Sabari-Girish: wattpdl on the AUR.

# Using yay
yay -S wattpdl

# Using paru
paru -S wattpdl

The AUR package is maintained separately, so a new version may show up there a little after the PyPI release.


Usage

First launch

  1. Run:
wattpdl
  1. Enter the story link or ID when asked:
Wattpad story link or ID: https://www.wattpad.com/story/123456789-story-title

or just the ID:

Wattpad story link or ID: 123456789

The story ID is the number in the Wattpad URL, right after /story/.

  1. Choose the download mode:
  1  All chapters -> 1 combined file
  2  All chapters -> separate file per chapter, packed as .zip
  3  Select several chapters -> 1 combined file
  4  Select 1 chapter only

Select mode [1/2/3/4] (1):
  • Mode 1: the most common way, the whole story as one tidy file from the first to the last chapter
  • Mode 2: good if you want to read chapter by chapter, producing one .zip with a file per chapter
  • Mode 3: a numbered list of all chapter titles appears, then type the numbers you want, combining commas and ranges, for example: 1,3,5-8
  • Mode 4: a list of all chapter titles appears, type a single number to download only that chapter
  1. Choose the file format:
  1  Plain text (.txt)
  2  Word document (.docx)
  3  Ebook (.epub)
  4  Markdown (.md)
  5  PDF (.pdf)

Select file format [1/2/3/4/5] (1):
  1. Choose the save folder:
Default folder: C:\Users\user\Downloads
Press Enter to use that folder, or type another path:

Press Enter to save in Downloads, or type a custom path such as:

  • Windows: D:\Stories\Wattpad
  • Linux/macOS: /home/user/stories
  1. Wait for it to finish:
⠋ Chapter 24...              ████████████████░░░░░░░░░░░░░░  53.3%  24/45  0:00:12  left 0:00:11
  1. When it finishes, a summary panel is shown with the path of the saved file and the number of succeeded chapters (for example 45/45). If some chapters failed, the panel lists them.

Everyday use

  • Download a whole story as one .epub for the most comfortable reading in ebook apps
  • Download a long story in Mode 2 to read it chapter by chapter, or use --workers to speed it up
  • Schedule --mode 1 --skip-existing with cron or Task Scheduler for ongoing stories you re-download often
  • Use --check-updates to see which downloaded ongoing stories have new chapters
  • Use --update-library to refresh every recorded story that has new chapters in one command
  • Use --search to find fanfics by title (e.g. --search "Railgun in Fairy Tail") and download several at once
  • Use --watch to re-download automatically as soon as a new chapter appears

Output structure

The name and shape of the generated files depend on the mode & format you choose:

Mode .txt format .docx format .epub format .md format .pdf format
1 - All, combined Story_Title.txt Story_Title.docx Story_Title.epub Story_Title.md Story_Title.pdf
2 - All, separate Story_Title.zip (contains: one .txt per chapter) Story_Title.zip (contains: one .docx per chapter) Story_Title.zip (contains: one .epub per chapter) Story_Title.zip (contains: one .md per chapter) Story_Title.zip (contains: one .pdf per chapter)
3 - Several chapters Story_Title_selected.txt Story_Title_selected.docx Story_Title_selected.epub Story_Title_selected.md Story_Title_selected.pdf
4 - One chapter Story_Title_Ch003_Chapter_Name.txt Story_Title_Ch003_Chapter_Name.docx Story_Title_Ch003_Chapter_Name.epub Story_Title_Ch003_Chapter_Name.md Story_Title_Ch003_Chapter_Name.pdf

Content of the combined file (modes 1 & 3): the story title, author, and source at the top, then each chapter separated by a ##### marker.

Story Title
by Author Name
Source: https://www.wattpad.com/story/123456789

==================================================

##### Chapter 1 Title #####

Text of chapter 1...

##### Chapter 2 Title #####

Text of chapter 2...

In the .docx version, the story title becomes the main heading and each chapter automatically becomes a Heading 1 on a new page, so it is comfortable to read right away in Word or Google Docs.

In the .epub version, the story becomes a standard ebook with an automatic table of contents per chapter, ready to open in your favorite ebook reader (Google Play Books, Apple Books, Calibre, and others).

In the .md version, the story is written with standard Markdown headings (# for the title, ## per chapter), which is pleasant to open in any editor or render directly on GitHub/Obsidian/Notion.

If the story has a cover, the image is embedded automatically on the first page/paragraph of the .docx/.epub/.pdf file (unless run with --no-cover). The story's genre/tags, description, and publish date are also saved as official metadata in the .epub file, usually shown on the book detail page in ebook reader apps.

Zip content (mode 2): one file per chapter, numbered by its position in the story, plus 000_info.txt/000_info.md/000_info.docx/000_info.epub/000_info.pdf (matching the format) containing the title, author, and source. The file extension inside the zip follows the format you chose when running the script:

Story_Title.zip
├── 000_info.txt
├── 001_Chapter_1_Title.txt
├── 002_Chapter_2_Title.txt
└── ...

Default save folder per OS

Operating System Default Folder
Windows C:\Users\<username>\Downloads
macOS /Users/<username>/Downloads
Linux /home/<username>/Downloads

Automatic resume

If the download stops midway (connection lost, terminal closed, laptop shut down), every chapter that already succeeded is saved automatically in ~/.wattpdl/progress/<story_id>.json.

Run again with the same story (same ID/link), and WattPDL will:

  • Skip chapters that already succeeded (used from the cache, not fetched again)
  • Download only the chapters that have not succeeded yet or failed earlier

The progress file is deleted automatically once all chapters have been downloaded in a single session. To force a download from scratch, delete the ~/.wattpdl/progress/ folder manually.

Not the same as --skip-existing: the resume above works at the chapter level (continuing a download that stopped midway). --skip-existing works at the output file level: if the final file (for example Story_Title.epub) already exists in the target folder, the whole download is skipped entirely, which is handy together with cron/Task Scheduler so stories that were already downloaded are not downloaded again.

Saved preferences

The last save folder, file format, and display language you chose are saved automatically in ~/.wattpdl/config.json and reused as defaults in the next session, so there is no need to fill them in every time you run the script.

Library and update automation

Stories you download in Mode 1 or Mode 2 are recorded automatically in ~/.wattpdl/library.json. That registry powers the update tooling:

wattpdl --library                 # list every recorded story
wattpdl --check-updates           # which ones have new chapters right now?
wattpdl --update-library          # re-download all of them that changed
wattpdl --library --json          # the same listing, as JSON for scripts
wattpdl --check-updates --json    # the update report, as JSON for scripts

--update-library rewrites each changed story's output file in full (all formats write the whole document) using your saved format and the default save folder. The resume progress for updated stories is kept on purpose, so the next update only downloads the chapters that are new; the resulting file always contains every chapter, old and new.

Progress files for updated stories are kept in ~/.wattpdl/progress/ so the next update is cheap; delete that folder if you want to reclaim the space. Stories deleted or made private on Wattpad are reported as deleted/failed and skipped, without aborting the other stories.

To stop tracking a story, remove it from the library:

wattpdl --library-forget 398440633

A few stories can be watched instead with --watch, which re-downloads as soon as a new chapter appears (see --help).

Non-interactive mode (scripting/automation)

Besides the question-and-answer mode, WattPDL can also be run through command line arguments, which is great for scheduling (cron/Task Scheduler) or calling from other scripts.

wattpdl --id 398440633 --mode 1 --format docx

Available arguments:

Argument Description
--id Wattpad story ID or link. Setting this enables non-interactive mode.
--mode {1,2,3,4} 1 = everything in 1 file, 2 = everything separate in a .zip, 3 = select several chapters, 4 = select 1 chapter
--format {txt,docx,epub,md,pdf} Output file format. Default: from saved config, or txt
--chapters Chapter numbers for --mode 3, example: 1,3,5-8
--chapter Chapter number for --mode 4, example: 5
--output-dir Custom save folder. In interactive mode it replaces the default-folder prompt; otherwise the default is from saved config, or the Downloads folder
--skip-existing Skip the download if the target output file already exists, instead of overwriting it
--no-cover Do not embed the story cover image in .docx/.epub/.pdf files
--include-images Also download & embed inline images inside chapters (adds download time)
--workers N Number of chapters downloaded at the same time (default 1)
--no-cache Do not use the story metadata cache, always fetch fresh data
--lang ISO 639-1 language code for EPUB metadata (default id)
--ui-lang {id,en} CLI display language (default en, remembered once chosen)
--user / --user-select Download from an author's story list, optionally selecting which stories
--check-updates Report which downloaded stories have new chapters
--watch / --watch-interval Monitor a story and re-download when new chapters appear (default check interval 1800 seconds)
--no-update-check Do not check for the latest wattpdl version on PyPI at startup
--library List every story recorded as fully downloaded (with --json, machine-readable)
--library-forget Remove one story from the library
--file Download the stories listed in a file, one ID or link per line (# for comments), mode 1 or 2
--filename Custom output base name for a single story (--id only), e.g. --filename "My Series - Book 1"
--update-library Re-download every recorded story that has new chapters (mode 1 or 2 only)
--search Search Wattpad stories and list them by index (title, author, chapter count, status), 10 per page
--search-limit How many --search results to fetch (default 40, max 100)
--select Story indices from the --search results to download, example: 1-8,10 or all
--json With --library or --check-updates, print JSON to stdout
--info Show a story's details without downloading anything
--retries Retries per chapter before it is skipped (default 3, max 10)
--timeout Timeout for every HTTP request in seconds (default 20)
--dry-run Simulate a download: show the target file and chapter counts, write nothing
--version Show the wattpdl version
--report Write a JSON or CSV report of all downloads in the run
--config Show the saved preferences
--config-set Change a saved preference, e.g. --config-set file_format=epub
--doctor Check dependencies, data folders, preferences and API connectivity
--completion Print a shell completion script (bash, zsh, fish, powershell)
--quiet Suppress normal console output (for cron)
--verbose Print an extra line with the active options
--search-status Filter --search results: completed or ongoing
--search-min-chapters Only show stories with at least N chapters
--search-sort Sort results: votes, chapters, or title
--search-language Filter results by language name (e.g. English)
--author-info List an author's stories with chapter totals, without downloading
--history Show the local download history (--json for machine-readable)
--no-library Do not record this download in the library or history
--pdf-pagesize PDF page size: A4 or A5 (default A5)
--pdf-font-size PDF body font size in points (6-24, default 10)
--watch-notify-json Print one JSON line whenever a new chapter is found in watch mode
--watch-max-iterations Stop watch mode after N checks

More examples:

# Download all chapters as separate files in a .zip
wattpdl --id 398440633 --mode 2 --format txt

# Download only chapters 1, 3, and 5-8 as 1 combined file
wattpdl --id 398440633 --mode 3 --chapters 1,3,5-8 --format docx

# Download only chapter 10, save to a custom folder
wattpdl --id 398440633 --mode 4 --chapter 10 --output-dir "D:\Wattpad Stories"

# Download all chapters as 1 .epub ebook
wattpdl --id 398440633 --mode 1 --format epub

# Download as Markdown, skip if the file already exists (good for scheduling)
wattpdl --id 398440633 --mode 1 --format md --skip-existing

# Show a story's details without downloading
wattpdl --info --id 398440633

# Update every recorded story that has new chapters
wattpdl --update-library --format epub

# See what a download would do, without writing any file
wattpdl --dry-run --id 398440633 --mode 1 --format epub

# Search Wattpad and download the listed stories (indices from the output)
wattpdl --search "Railgun in Fairy Tail" --select 1-8,10 --mode 1 --format epub

# Download every story listed in a file, one ID/link per line
wattpdl --file "stories.txt" --mode 1 --format epub

# Download one story under a custom file name
wattpdl --id 398440633 --mode 1 --format epub --filename "My Series - Book 1"

# Download one story into two formats and write a report
wattpdl --id 398440633 --mode 1 --format txt,epub --report "download.json"

# Tooling: check the environment, change a preference, get shell completion
wattpdl --doctor
wattpdl --config-set file_format=epub --config
wattpdl --completion bash

# Discovery and history
wattpdl --search "Railgun in Fairy Tail" --json --search-status completed --search-sort votes
wattpdl --author-info MisakaLovesYou --json
wattpdl --history --json

# PDF layout
wattpdl --id 398440633 --mode 1 --format pdf --pdf-pagesize A4 --pdf-font-size 12

# Show all options
wattpdl --help

Display Language

The CLI display (menus, prompts, error messages, and --help text) is available in English (default) and Indonesian.

  1. Switch the display language once:
wattpdl --ui-lang id              # Indonesian, this choice is remembered for next runs
wattpdl --ui-lang en              # back to English
  1. Or set it through an environment variable:
WATTPDL_LANG=id wattpdl

Priority order: --ui-lang -> env WATTPDL_LANG -> ui_lang in ~/.wattpdl/config.json -> default en.

--ui-lang only changes the CLI display. Do not confuse it with --lang, which sets the language code in the EPUB metadata.


Data Sources

WattPDL talks to public endpoints only. No login or API key is needed.

Purpose Source
Story metadata (title, author, chapter list, genres, description, publish date) Wattpad public API v3 (wattpad.com/api/v3)
Chapter text Wattpad public story text endpoint (wattpad.com/apiv2/storytext)
Author story list (--user) Wattpad public API v3 (wattpad.com/api/v3/users/{username}/stories/published)
wattpdl update check PyPI JSON API (pypi.org/pypi/wattpdl/json)

Project Structure

wattpdl/
├── assets/
│   └── logo.png             # project logo, used in the README
├── src/
│   └── wattpdl/
│       ├── __init__.py       # package metadata (__version__)
│       ├── __main__.py       # entry point for `python -m wattpdl`
│       ├── app.py            # program flow orchestration (main())
│       ├── api.py            # communication with the Wattpad public API
│       ├── writers.py        # text conversion & writing .txt/.docx/.epub/.md/.pdf/.zip files
│       ├── cli.py            # terminal display (rich), user interaction
│       ├── cli_args.py       # argument parsing for non-interactive mode
│       ├── config.py         # saves user preferences (save folder, format, language)
│       ├── i18n.py           # CLI display translations (en/id)
│       ├── library.py        # local library of downloaded stories (used by --check-updates)
│       ├── metacache.py      # short-lived cache of story metadata
│       ├── updater.py        # wattpdl update check on PyPI
│       └── progress.py       # download progress cache for the resume feature
├── requirements.txt          # dependency list (for manual reference)
├── pyproject.toml            # package metadata + build config + ruff
├── tests/
│   ├── __init__.py
│   └── test_wattpdl.py       # unit tests (pytest)
├── .github/
│   └── workflows/
│       ├── tests.yml         # CI: automatic test, lint, & build check
│       └── publish.yml       # auto-publish to PyPI on a new release
├── CHANGELOG.md              # version history (English)
├── CHANGELOG.id.md           # version history (Bahasa Indonesia)
├── CONTRIBUTING.md           # contribution guide (English)
├── CONTRIBUTING.id.md        # contribution guide (Bahasa Indonesia)
├── SECURITY.md               # vulnerability reporting policy
├── LICENSE
├── README.md                 # main documentation (English)
└── README.id.md              # documentation (Bahasa Indonesia)

Module separation principles:

  • api.py: knows nothing about the display (rich), purely fetches data
  • writers.py: makes no network requests, purely converts & writes files
  • cli.py: all user interaction & progress bar display
  • cli_args.py: command line argument parsing & validation, no business logic
  • i18n.py: display text dictionary (English/Indonesian), pure data, knows nothing about rich or the network
  • config.py / progress.py: read/write JSON files in ~/.wattpdl/, know nothing about the CLI or the network
  • app.py: ties everything together, with no business logic of its own (invoked through the wattpdl command after install)

Development

Built with Python, requests, rich, python-docx, EbookLib, reportlab, and pillow.

The CLI flows live in src/wattpdl/flows/: common.py (shared helpers), download.py (the download pipeline), single.py, batch.py, library.py and tooling.py. app.py is a thin facade that dispatches from main(). When adding a command, put its flow in the matching module and re-export it from app.py.

Adding a new user-facing string

  1. Add the English and Indonesian strings next to each other in src/wattpdl/i18n.py
  2. Use t("your_key") in the code, never a raw string literal
  3. Run the tests; the test suite checks that both languages always have the same keys and placeholders

Keeping the docs in sync

  1. Update README.md first, then README.id.md, in the same commit
  2. Use the exact same section order, tables, and callouts in both files
  3. If the release changes user-facing behavior, update CHANGELOG.md and CHANGELOG.id.md too

Want to help? Read CONTRIBUTING.md for the project structure and contribution flow.


Testing

There are unit tests for the core functions (story ID parsing, file name validation, chapter selection parsing, HTML to text conversion, config, progress/resume, CLI argument parsing, translations, and more).

pip install -e .[dev]
pytest tests/ -v
ruff check .
Check Requirement
pytest tests/ -v Must pass the full suite
ruff check . Must report zero issues

Lint rules live in pyproject.toml under [tool.ruff] (line-length 110, target Python 3.10). CI requires at least 80% test coverage.


Continuous Integration

Workflow Purpose
tests.yml ruff lint, pip-audit dependency audit, pytest on Python 3.10-3.13 with an 80% coverage floor, and a package build with twine check on every push to main, pull request to main, and push to a v* tag
publish.yml builds and publishes to PyPI via trusted publishing (OIDC) when a GitHub Release is published

Lint, the dependency audit, tests, and the build check must be green before every push (the main branch enforces this). Publishing to PyPI happens only through a published GitHub Release.


Troubleshooting

Problem Solution
ModuleNotFoundError: No module named 'requests' Run pip install requests
ModuleNotFoundError: No module named 'rich' Run pip install rich
Library 'python-docx' is not installed Run pip install python-docx (only needed if you choose the .docx format)
Library 'EbookLib' is not installed Run pip install EbookLib (only needed if you choose the .epub format)
Library 'reportlab' is not installed Run pip install reportlab (only needed if you choose the .pdf format)
ModuleNotFoundError: No module named 'PIL' Run pip install pillow (only needed if you choose the .pdf format)
404 error / "No chapters found" Make sure the ID/link is correct & the story is not private
Folder cannot be created Check that the path is valid & you have write permission there
The process hangs on one chapter Check your internet connection and run again, progress will continue

FAQ

Is this legal / safe to use?

This script uses the same public Wattpad endpoint as when you read a story in the browser, so it does not hack anything. But use it responsibly: download for personal/offline reading, and respect the authors' copyright. Do not redistribute or sell other people's stories.

Do I need a Wattpad account?

No. No login or API key is needed at all.

Can I download private / deleted stories?

No. The script can only access stories that are public.

Why does it take so long?

There is a 0.5 second delay between chapters (on purpose, so Wattpad's servers are not overloaded). For stories with hundreds of chapters, it is normal for the process to take a few minutes. You can speed it up with --workers.

Which mode and format should I pick?
  • Want to read from start to finish like a book: Mode 1, the .epub format is the most comfortable in ebook apps
  • Want each chapter as its own file: Mode 2
  • Only need a few specific chapters (for example re-reading a certain part): Mode 3
  • Just curious about one chapter: Mode 4
  • Want to read casually on a phone/tablet with an ebook app (Google Play Books, Apple Books, etc.): choose the .epub format
  • Want to edit or print neatly with Word: choose the .docx format
  • Want a small, simple file, or to read it in an e-reader/notes app: choose the .txt format
How do I keep ongoing stories up to date?

Download the story in Mode 1 or Mode 2, which records it in your library automatically. Later, run:

wattpdl --check-updates       # which recorded stories have new chapters
wattpdl --update-library      # re-download all of the changed ones

--update-library rewrites each changed story's file in full; because the resume progress is kept for updated stories, only the new chapters are fetched from Wattpad. Run it with cron or Task Scheduler for a hands-off refresh, or use --watch to monitor one story continuously.

How do I search for a story by name?

Run wattpdl with --search and a query, for example:

wattpdl --search "Railgun in Fairy Tail"

The matching stories are listed with numbers (title, author, chapter count, status), 10 per page. Type n for the next page and p for the previous one; the indices are global across pages, so story #13 is picked with 13 no matter which page is on screen. To fetch more results than the default 40, use --search-limit N (up to 100). Without --select, you are asked which indices to download (a range like 1-8,10 works, or all). For scripting, pass them directly: wattpdl --search "Railgun in Fairy Tail" --select 1-8,10 --mode 1.

Can I save several formats at once?

Yes. Pass a comma-separated list or all. Chapter text is downloaded once, then written to every requested format:

wattpdl --id 398440633 --mode 1 --format txt,epub
wattpdl --id 398440633 --mode 1 --format all

In Mode 2 (separate files per chapter), each format gets its own zip, named Story_txt.zip, Story_epub.zip, and so on. Add --report download.json (or .csv) to get a machine-readable summary of what was saved.


Author

Nicolas Dwi Dharma
Nicolas Dwi Dharma
github.com/nekonaru

Disclaimer

WattPDL is an independent open-source project and is not affiliated with or endorsed by Wattpad. It reads publicly available story data through Wattpad's public endpoints, for personal offline reading only. Respect the authors' copyright: do not redistribute, upload, or sell downloaded stories.


License

Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for wattpdl 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wattpdl 2.0.0
File Size Uploaded Provenance Actions
wattpdl-2.0.0.tar.gz 117.3 kB With provenance Details for wattpdl-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wattpdl 2.0.0
File Interpreter ABI Platform Actions
wattpdl-2.0.0-py3-none-any.whl Python 3 none any Details for wattpdl-2.0.0-py3-none-any.whl

Total release size: 193.4 kB

Release files / wattpdl-2.0.0.tar.gz

Download URL wattpdl-2.0.0.tar.gz
Size 117.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8141cea28cb41cfdf79580f7d129b5cfd3821a1a9c7617567dc9fff7a4d157eb
BLAKE2b-256 checksum
How to use checksums
32dcb78431fd175fb17f3c33effc142520c1e65b1d8b2984447abe0f21771397
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / wattpdl-2.0.0-py3-none-any.whl

Download URL wattpdl-2.0.0-py3-none-any.whl
Size 76.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca61e5ba2317225004302c15e69d6dec22a8d9e399223e368f2db59630cd355
BLAKE2b-256 checksum
How to use checksums
c0cec85d795960132c6e830264c10cc8a20beea91b2e934a0150313036e4c9fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for wattpdl 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wattpdl-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page