# Wattpad Story Scraper (`parsebird/wattpad-scraper`) Actor

Search Wattpad stories by keyword, tag or genre and get title, author, tags, votes, reads, comments, word count, chapter list and paywall status. Get story details, author bios with every published story, and public chapter text. Export JSON, CSV, Excel.

- **URL**: https://apify.com/parsebird/wattpad-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Features:** Limited permissions
- **Stats:** 7 total users, 0 monthly users, 85.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.29 / 1,000 stories

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

### Wattpad Story Scraper

Wattpad Story Scraper extracts story data from [Wattpad](https://www.wattpad.com): titles, descriptions, authors, tags, genres, votes, reads, comments, word counts, chapter lists and paywall status. It works from keyword searches, tags, genre pages, story links, author profiles and chapter links.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">
Search Wattpad by keyword, tag or genre in 36 languages. Filter by completion, free or Paid Stories, maturity and minimum votes or reads. Sort by votes, reads, comments or latest update. Get author bios, websites and contact emails, plus the full text of public chapters.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
Apify actor parsebird/wattpad-scraper scrapes public Wattpad data. Call it with the apify-client package: client.actor("parsebird/wattpad-scraper").call(run_input={"target": "searchByKeyword", "keywords": ["fantasy"], "maxItems": 25}). Inputs: target (string, required: searchByKeyword, searchByTag, browseGenreOrCategory, storyDetails, authorStories, chapterText; default searchByKeyword); keywords, tags, genresOrCategories, storyIdsOrUrls, usernames, chapterIdsOrUrls (arrays of strings, up to 500 each, only the one matching the target is used; several tags on one line such as "magic, dragons" means stories with all of them; a story link in chapterIdsOrUrls returns all its chapters); language (string code such as en, es, fr, de, pt, id, tl; empty = English); completion (completed or ongoing); access (free or paywalled, does not unlock paid content); maturity (general or mature); minimumVotes, minimumReads (integers); sortBy (relevance, votes, reads, comments, recentlyUpdated; default relevance); maxItems (integer, total rows, empty = all); proxyConfiguration (object, optional). Output rows have recordType story (storyId, title, description, storyUrl, coverUrl, author{username, displayName, profileUrl, avatarUrl, bio, location, websiteUrl, contactEmail, contactEmailSource}, tags, categories, language, completionStatus, maturity, accessStatus, wordCount, chapterCount, engagement{votes, reads, comments}, publication{firstPublishedAt, lastPublishedAt}, chapters[]{chapterId, title, chapterUrl, position, publishedAt, wordCount, accessStatus, engagement}), author (author{...}, engagement{votes, followers, following}, publishedStoryCount, readingListCount, joinedAt, stories[]) or chapter (chapterId, chapterTitle, chapterUrl, storyId, storyTitle, storyUrl, author{...}, position, publishedAt, wordCount, accessStatus, engagement, text). Unavailable fields are omitted. A run summary is saved as the OUTPUT record of the run's key-value store. API docs: https://apify.com/parsebird/wattpad-scraper/api. Get a token: https://console.apify.com/settings/integrations
```

### What does Wattpad Story Scraper do?

**Wattpad Story Scraper** turns Wattpad's public story listings, story pages, author profiles and chapters into structured data. It works as a **Wattpad API alternative**: you don't need a Wattpad account or developer key. To try it, keep the prefilled keyword search in the Apify Console and click **Start**.

Pick one task per run:

- 🔎 **Search stories by keyword**: the same search as Wattpad's search box, with filters and sorting.
- 🏷️ **Search stories by tag**: stories with one tag, or with several tags at once (`magic, dragons`).
- 📚 **Browse a genre or category**: Wattpad's genre pages (Romance, Fantasy, Teen Fiction, Werewolf and more), either hot or recently updated.
- 📖 **Story details**: paste story links or IDs. Each story comes with its full chapter list, and each chapter shows its votes, reads, comments, word count and whether it is paywalled.
- ✍️ **Author profiles and their stories**: bio, location, website, follower count, votes received and every published story.
- 📄 **Chapter text**: the readable text of public chapters, from chapter links or a whole story at once. Paywalled chapters of Paid Stories are listed without text and are not charged. Paid content is never unlocked.

Apify platform features come with it:

- Run on a [schedule](https://docs.apify.com/platform/schedules).
- Call it through the [Apify API](https://docs.apify.com/api/v2).
- Connect it to [integrations](https://apify.com/integrations) such as Google Sheets, Slack, Zapier or Make.
- Export results as JSON, CSV, Excel, XML or HTML.

### What data can you extract from Wattpad?

| Field | Description |
|-------|-------------|
| `title`, `description`, `storyUrl`, `coverUrl` | Story title, blurb, link and cover image |
| `author` | Username, display name, profile link, avatar, bio, location, website, and the contact email if one is written in the bio |
| `tags`, `categories`, `language` | Wattpad tags, category names (for example Fantasy, Romance) and story language |
| `completionStatus` | `completed` or `ongoing` |
| `accessStatus` | `free`, or `paywalled` for Wattpad Paid Stories |
| `maturity` | `general` or `mature`, from Wattpad's mature label |
| `engagement` | Votes, reads and comments for the story, and for each chapter |
| `wordCount`, `chapterCount` | Total words across published chapters, and number of chapters |
| `publication` | Dates of the first and latest published chapter |
| `chapters` | Chapter ID, title, link, position, publish date, word count, access status and engagement |
| `text` | Plain chapter text, with paragraphs separated by blank lines (chapter text target) |
| `engagement.followers`, `publishedStoryCount`, `joinedAt` | Author followers, number of published stories, join date (author rows) |

Every row has a `recordType` (`story`, `author` or `chapter`), a `discoveryInput` that names the keyword, tag, genre, link or username it came from, and a `scrapedAt` time. Fields Wattpad doesn't provide for a story or profile are left out instead of being filled with empty values.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| target | string | **Yes** | `searchByKeyword` | Task: `searchByKeyword`, `searchByTag`, `browseGenreOrCategory`, `storyDetails`, `authorStories`, `chapterText` |
| keywords | array | For keyword search | — | Words or phrases, up to 500 |
| tags | array | For tag search | — | Tags without `#`; several on one line = stories with all of them |
| genresOrCategories | array | For genre browsing | — | Genre names such as `Romance`, `Science Fiction`, or a `wattpad.com/stories/...` link |
| storyIdsOrUrls | array | For story details | — | Story links or numeric IDs |
| usernames | array | For author profiles | — | Usernames or `wattpad.com/user/...` links |
| chapterIdsOrUrls | array | For chapter text | — | Chapter links or IDs; a story link returns every chapter |
| language | string | No | English | Story language code: `en`, `es`, `fr`, `de`, `pt`, `id`, `tl`, `tr`, `ru` and more |
| completion | string | No | both | `completed` or `ongoing` |
| access | string | No | both | `free` or `paywalled` |
| maturity | string | No | both | `general` or `mature` |
| minimumVotes | integer | No | — | Skip stories with fewer votes |
| minimumReads | integer | No | — | Skip stories with fewer reads |
| sortBy | string | No | `relevance` | `relevance`, `votes`, `reads`, `comments`, `recentlyUpdated` |
| maxItems | integer | No | all | Stop after this many rows in total |
| proxyConfiguration | object | No | no proxy | Optional. Not needed in normal use |

Filters, sorting and language apply to the keyword, tag and genre tasks. Story details, author and chapter tasks return what you ask for directly.

### Output example

A story row (description and chapter list shortened):

```json
{
  "recordType": "story",
  "storyId": "413460327",
  "title": "The Thirteenth Sovereign.",
  "description": "No human has crossed the Sovereign Veil.\n\nNo human was ever meant to.\n\nYet Nyra did. ...",
  "storyUrl": "https://www.wattpad.com/story/413460327-the-thirteenth-sovereign",
  "coverUrl": "https://img.wattpad.com/cover/413460327-256-k441427.jpg",
  "author": {
    "username": "ronda234",
    "displayName": "Ronda Star",
    "profileUrl": "https://www.wattpad.com/user/ronda234",
    "avatarUrl": "https://img.wattpad.com/useravatar/ronda234.128.577565.jpg",
    "bio": "Welcome, dear reader. Here, every story is a different world waiting to be explored. ..."
  },
  "tags": ["academy", "fantasy", "fantasy-romance", "magic-academy", "mystery", "royalty", "slowburn"],
  "categories": ["Fantasy"],
  "language": "English",
  "completionStatus": "completed",
  "maturity": "general",
  "accessStatus": "free",
  "wordCount": 129316,
  "chapterCount": 53,
  "engagement": { "votes": 301, "reads": 9267, "comments": 73 },
  "publication": {
    "firstPublishedAt": "2026-07-07T17:16:37Z",
    "lastPublishedAt": "2026-10-26T17:00:16Z"
  },
  "chapters": [
    {
      "chapterId": "1641589972",
      "title": "✨ Author's Note",
      "chapterUrl": "https://www.wattpad.com/1641589972-the-thirteenth-sovereign-%E2%9C%A8-author%27s-note",
      "position": 1,
      "publishedAt": "2026-07-07T17:16:37Z",
      "wordCount": 269,
      "accessStatus": "free",
      "engagement": { "votes": 21, "reads": 797, "comments": 11 }
    }
  ],
  "discoveryInput": { "target": "storyDetails", "input": "413460327" },
  "scrapedAt": "2026-11-11T22:50:24Z"
}
```

A chapter row (text shortened):

```json
{
  "recordType": "chapter",
  "chapterId": "1641589972",
  "chapterTitle": "✨ Author's Note",
  "chapterUrl": "https://www.wattpad.com/1641589972-the-thirteenth-sovereign-%E2%9C%A8-author%27s-note",
  "storyId": "413460327",
  "storyTitle": "The Thirteenth Sovereign.",
  "storyUrl": "https://www.wattpad.com/story/413460327-the-thirteenth-sovereign",
  "author": { "username": "ronda234", "displayName": "Ronda Star", "profileUrl": "https://www.wattpad.com/user/ronda234" },
  "position": 1,
  "publishedAt": "2026-07-07T17:16:37Z",
  "wordCount": 269,
  "accessStatus": "free",
  "engagement": { "votes": 21, "reads": 797, "comments": 11 },
  "text": "Welcome to The Thirteenth Sovereign.\n\nIf you've decided to give this story a chance, thank you. ...",
  "discoveryInput": { "target": "chapterText", "input": "1641589972" },
  "scrapedAt": "2026-11-11T22:50:29Z"
}
```

Author rows have the same `author` object, plus `engagement` (`votes` received, `followers`, `following`), `publishedStoryCount`, `readingListCount`, `joinedAt` and a `stories` array with the story fields above (without chapter lists). The dataset has three ready-made views: **Stories**, **Authors** and **Chapters**. Download results in JSON, CSV, Excel, XML or HTML from the Storage tab.

### How to scrape Wattpad

1. Open [Wattpad Story Scraper](https://apify.com/parsebird/wattpad-scraper) in Apify Console and go to the **Input** tab.
2. Choose **What to scrape**, for example *Search stories by tag*.
3. Fill in the matching list, for example `werewolf` in **Tags**. You can add up to 500 values.
4. Optionally set filters: language, completed or ongoing, free or paywalled, minimum votes or reads.
5. Choose **Sort by**, for example *Most votes*.
6. Set **Max items** to keep the first run small, then click **Start**.
7. When the run finishes, open the **Stories**, **Authors** or **Chapters** view, or export the dataset as CSV, Excel or JSON.

To get chapter text, run a story search or story details first, then paste the story links into **Chapter IDs or URLs** with the *Chapter text* task.

### Use cases

- **Publishing and agent scouting**: find completed stories with high reads in a genre, then contact authors through the website or email in their bio.
- **Trend research**: track which tags and genres collect the most votes and comments, and what was updated this week.
- **Fan and reader communities**: build reading lists from tags and minimum vote counts.
- **Author analytics**: compare an author's stories by reads, votes, comments and word count over time.
- **Text and NLP datasets**: collect the text of public chapters for research, with the source link on every row.
- **Competitive analysis for writers**: see how stories in your niche are tagged, how long they are, and how often they update.

### How it works

1. Keyword and tag searches use Wattpad's own search. Genre browsing uses Wattpad's genre pages, which list hot stories and recently updated stories.
2. Language, completion and free/paid filters are sent to Wattpad where it supports them. The remaining filters are applied to each result.
3. With *Relevance*, results arrive in Wattpad's order and the run stops at **Max items**. With *Most votes*, *Most reads*, *Most comments* or *Recently updated* on a keyword, the actor first reads every result Wattpad returns for that input, then sorts them.
4. For every story it saves, the actor reads the story page for chapters, word counts and categories, and the author's profile for bio, location and website. Paid Stories also get a per-chapter paywall check.
5. Requests are paced to stay within Wattpad's rate limit. If Wattpad still pauses the connection, the run waits and continues on its own.

Wattpad shows at most about 10,000 results per keyword or tag search, about 1,200 hot stories per genre, and 1,500 stories in each recently updated feed. To cover more, split a broad search into several narrower keywords or tags.

### Using the Wattpad Story Scraper API

Run the actor from your own code with the [Apify API client](https://docs.apify.com/api/client/python). Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("parsebird/wattpad-scraper").call(run_input={
    "target": "searchByTag",
    "tags": ["werewolf"],
    "completion": "completed",
    "sortBy": "votes",
    "maxItems": 100,
})
for story in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(story["title"], story["engagement"]["votes"], story["author"]["username"])
```

JavaScript (Node.js):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('parsebird/wattpad-scraper').call({
    target: 'chapterText',
    chapterIdsOrUrls: ['https://www.wattpad.com/story/413460327-the-thirteenth-sovereign'],
    maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((ch) => console.log(ch.position, ch.chapterTitle, ch.wordCount));
```

See the [API tab](https://apify.com/parsebird/wattpad-scraper/api) for every endpoint, and get your token in [Apify Console](https://console.apify.com/settings/integrations).

### How much does it cost to scrape Wattpad?

Wattpad Story Scraper uses pay-per-event pricing. Compute and proxy costs are included in the event prices.

| Event | Free plan | Bronze | Silver | Gold |
|-------|-----------|--------|--------|------|
| Run start (`apify-actor-start`) | $0.005 per run | $0.005 | $0.005 | $0.005 |
| Story (`story-scraped`), per 1,000 | **$0.39** | $0.35 | $0.29 | $0.29 |
| Chapter text (`chapter-text`), per 1,000 | **$3.99** | $3.49 | $2.99 | $2.49 |

What counts as an event:

- **Story**: each saved story row is one Story event, chapter list included. An author row counts one Story event for each story in its `stories` list, and at least one per author.
- **Chapter text**: one Chapter text event for each public chapter saved with its text.
- **Not charged**: chapter rows without text, such as paywalled chapters of Paid Stories.

Example costs on the Free plan:

- 1,000 stories from a search cost about $0.39.
- The text of 1,000 public chapters costs about $3.99.

You can set a maximum cost per run in Apify Console, and the run stops when it is reached.

### FAQ

**Do I need a Wattpad account or a proxy?**
No. Wattpad Story Scraper reads public Wattpad data without logging in, and it works without a proxy. If Wattpad rate-limits the connection repeatedly while running on Apify, the actor switches to Apify Proxy by itself (when your Apify plan includes proxy access).

**How fast is it?**
Wattpad limits how many requests one connection can make, and the actor paces itself to stay within that limit. In our test runs on Apify it saved about 50 to 60 stories a minute with full details (for example, 500 stories in under 10 minutes). Chapter text, story details and author lookups need fewer requests per row. Small runs finish in seconds.

**Can it get the text of Paid Stories?**
No. Paywalled chapters are returned with their title, position, word count, engagement and `accessStatus: "paywalled"`, but without text, and they are not charged. The free preview chapters of a Paid Story return text as usual.

**Why can't I search all languages at once?**
Wattpad's search works one language at a time, and English is the default. Pick a language in **Story language**, or run one search per language.

**Why does "Mature only" return few or no stories?**
Wattpad's public listings rarely include stories with the mature label when no one is logged in. If no story matches in the first 3,000 results for an input, the actor moves on to the next input instead of reading the full result list.

**Where does the contact email come from?**
From the author's public profile bio, when the author has written an email address there. `contactEmailSource` is then `profile bio`. Wattpad doesn't show account emails, so most authors have no `contactEmail`.

**How are sorted results chosen?**
With *Relevance*, results arrive in Wattpad's order. Votes, reads and comments sort all the results Wattpad returns for each input, up to its limit of about 10,000 per keyword or tag. *Recently updated* uses Wattpad's newest-updates feed for tags and genres, and sorts keyword results by the date of the latest chapter.

**Does Max items apply per keyword?**
No. It is the total number of rows for the whole run. To get the same number per keyword, run one keyword per run, or schedule several tasks.

**Can I schedule it or connect it to other tools?**
Yes. Use [Apify schedules](https://docs.apify.com/platform/schedules) to run it daily or weekly, and [integrations](https://apify.com/integrations) to send results to Google Sheets, Slack, Zapier, Make, webhooks and more.

**Something doesn't work. What should I do?**
Open an issue in the [Issues tab](https://apify.com/parsebird/wattpad-scraper/issues) with your run link, and we'll take a look.

### Is it legal to scrape Wattpad?

Wattpad Story Scraper collects publicly available information shown on Wattpad: story listings, statistics, public author profiles and the text of public chapters. It never unlocks paid content. Author profiles include usernames and sometimes names, locations or emails, which may count as personal data under the GDPR and similar laws. Story text is protected by its authors' copyright. Only collect and store personal data or story text when you have a legitimate reason, and check Wattpad's terms of service for your use case. If you are unsure, consult a lawyer. Read more in Apify's blog post [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

### Other ParseBird scrapers

- [Goodreads Book Scraper](https://apify.com/parsebird/goodreads-book-scraper): books, ratings and reviews from Goodreads
- [Substack Scraper](https://apify.com/parsebird/substack-scraper): newsletters and posts from Substack
- [Genius.com Scraper](https://apify.com/parsebird/genius-scraper): song lyrics and metadata from Genius
- [Letterboxd Film Review Scraper](https://apify.com/parsebird/letterboxd-scraper): film reviews and ratings from Letterboxd
- [Reddit Search Scraper](https://apify.com/parsebird/reddit-search-scraper): posts from Reddit search
- [Spotify Podcast Scraper](https://apify.com/parsebird/spotify-podcast-scraper): podcast shows and episodes from Spotify
- [YouTube Transcript Scraper](https://apify.com/parsebird/youtube-transcript-scraper): transcripts of YouTube videos
- [Threads Scraper](https://apify.com/parsebird/threads-scraper): Threads profiles, posts and search

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/wattpad-scraper/changelog.md

# Actor input Schema

## `target` (type: `string`):

Choose one task per run, then fill in the matching list below. The other lists are ignored.

## `keywords` (type: `array`):

Enter words or phrases to search Wattpad stories, as in the site's search box. Used by <b>Search stories by keyword</b>. Up to 500.

## `tags` (type: `array`):

Enter Wattpad tags without the #, for example <code>werewolf</code>. Put several tags on one line (<code>magic, dragons</code>) to find stories that have all of them. Used by <b>Search stories by tag</b>. Up to 500.

## `genresOrCategories` (type: `array`):

Enter genres such as <code>Romance</code>, <code>Science Fiction</code>, <code>Teen Fiction</code> or <code>Werewolf</code>, or a genre page link like https://www.wattpad.com/stories/fantasy. Used by <b>Browse a genre or category</b>. Up to 500.

## `storyIdsOrUrls` (type: `array`):

Enter story links (https://www.wattpad.com/story/82040526-...) or numeric story IDs. Each story comes with its chapter list. Used by <b>Story details</b>. Up to 500.

## `usernames` (type: `array`):

Enter Wattpad usernames or profile links (https://www.wattpad.com/user/...). Each author row lists all of their published stories. Used by <b>Author profiles</b>. Up to 500.

## `chapterIdsOrUrls` (type: `array`):

Enter chapter links (https://www.wattpad.com/300363744-...) or numeric chapter IDs. A story link returns every chapter of that story. Paywalled chapters are listed without text and are not charged. Used by <b>Chapter text</b>. Up to 500.

## `language` (type: `string`):

Show stories written in this language. Wattpad searches one language at a time; leave empty for English.

## `completion` (type: `string`):

Show only completed or only ongoing stories. Leave empty for both.

## `access` (type: `string`):

Show only free stories or only Paid Stories. This filters results and does not unlock paid chapters. Leave empty for both.

## `maturity` (type: `string`):

Filter by Wattpad's mature label. Wattpad's public listings rarely include mature-labelled stories, so <i>Mature only</i> usually returns little or nothing. Leave empty for both.

## `minimumVotes` (type: `integer`):

Skip stories with fewer votes. Leave empty for no minimum.

## `minimumReads` (type: `integer`):

Skip stories with fewer reads. Leave empty for no minimum.

## `sortBy` (type: `string`):

Relevance keeps Wattpad's order (for genres, Wattpad's hot ranking). Votes, reads and comments sort all results Wattpad returns for each input (up to about 10,000 per keyword or tag, about 1,200 per genre). Recently updated uses Wattpad's newest-updates feed for tags and genres (up to 1,500 stories) and sorts keyword results by last chapter date.

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

Stop after saving this many rows in total (stories, authors or chapters). Leave empty to save everything available.

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

Not needed in normal use: Wattpad's public data loads without a proxy, and the Actor switches to Apify Proxy by itself if Wattpad starts rate-limiting.

## Actor input object example

```json
{
  "target": "searchByKeyword",
  "keywords": [
    "fantasy"
  ],
  "tags": [
    "werewolf"
  ],
  "genresOrCategories": [
    "Romance"
  ],
  "storyIdsOrUrls": [
    "https://www.wattpad.com/story/82040526-a-different-virus-heartfire"
  ],
  "usernames": [
    "CrystalScherer"
  ],
  "chapterIdsOrUrls": [
    "https://www.wattpad.com/300363744-a-different-virus-heartfire-chapter-1"
  ],
  "sortBy": "relevance",
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "target": "searchByKeyword",
    "keywords": [
        "fantasy"
    ],
    "tags": [
        "werewolf"
    ],
    "genresOrCategories": [
        "Romance"
    ],
    "storyIdsOrUrls": [
        "https://www.wattpad.com/story/82040526-a-different-virus-heartfire"
    ],
    "usernames": [
        "CrystalScherer"
    ],
    "chapterIdsOrUrls": [
        "https://www.wattpad.com/300363744-a-different-virus-heartfire-chapter-1"
    ],
    "maxItems": 25,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/wattpad-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 = {
    "target": "searchByKeyword",
    "keywords": ["fantasy"],
    "tags": ["werewolf"],
    "genresOrCategories": ["Romance"],
    "storyIdsOrUrls": ["https://www.wattpad.com/story/82040526-a-different-virus-heartfire"],
    "usernames": ["CrystalScherer"],
    "chapterIdsOrUrls": ["https://www.wattpad.com/300363744-a-different-virus-heartfire-chapter-1"],
    "maxItems": 25,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/wattpad-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 '{
  "target": "searchByKeyword",
  "keywords": [
    "fantasy"
  ],
  "tags": [
    "werewolf"
  ],
  "genresOrCategories": [
    "Romance"
  ],
  "storyIdsOrUrls": [
    "https://www.wattpad.com/story/82040526-a-different-virus-heartfire"
  ],
  "usernames": [
    "CrystalScherer"
  ],
  "chapterIdsOrUrls": [
    "https://www.wattpad.com/300363744-a-different-virus-heartfire-chapter-1"
  ],
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call parsebird/wattpad-scraper --silent --output-dataset

```

## MCP server setup

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