{
  "openapi": "3.0.1",
  "info": {
    "title": "Wattpad Story Scraper",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "BH1DCj4UPlPYiIMVF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~wattpad-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-wattpad-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/parsebird~wattpad-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-wattpad-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/parsebird~wattpad-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-wattpad-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "What to scrape",
            "enum": [
              "searchByKeyword",
              "searchByTag",
              "browseGenreOrCategory",
              "storyDetails",
              "authorStories",
              "chapterText"
            ],
            "type": "string",
            "description": "Choose one task per run, then fill in the matching list below. The other lists are ignored.",
            "default": "searchByKeyword"
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "genresOrCategories": {
            "title": "Genres or categories",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "storyIdsOrUrls": {
            "title": "Story IDs or URLs",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "chapterIdsOrUrls": {
            "title": "Chapter IDs or URLs",
            "maxItems": 500,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Story language",
            "enum": [
              "en",
              "ar",
              "pt_BR",
              "ca",
              "cs",
              "da",
              "nl",
              "fi",
              "fr",
              "de",
              "el",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "ko",
              "ms",
              "other",
              "fa",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "zh",
              "sk",
              "es",
              "sv",
              "tl",
              "th",
              "zh_TW",
              "tr",
              "uk",
              "vi"
            ],
            "type": "string",
            "description": "Show stories written in this language. Wattpad searches one language at a time; leave empty for English."
          },
          "completion": {
            "title": "Completion",
            "enum": [
              "completed",
              "ongoing"
            ],
            "type": "string",
            "description": "Show only completed or only ongoing stories. Leave empty for both."
          },
          "access": {
            "title": "Access",
            "enum": [
              "free",
              "paywalled"
            ],
            "type": "string",
            "description": "Show only free stories or only Paid Stories. This filters results and does not unlock paid chapters. Leave empty for both."
          },
          "maturity": {
            "title": "Maturity",
            "enum": [
              "general",
              "mature"
            ],
            "type": "string",
            "description": "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": {
            "title": "Minimum votes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip stories with fewer votes. Leave empty for no minimum."
          },
          "minimumReads": {
            "title": "Minimum reads",
            "minimum": 0,
            "type": "integer",
            "description": "Skip stories with fewer reads. Leave empty for no minimum."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "votes",
              "reads",
              "comments",
              "recentlyUpdated"
            ],
            "type": "string",
            "description": "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.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many rows in total (stories, authors or chapters). Leave empty to save everything available."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "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.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}