{
  "openapi": "3.0.1",
  "info": {
    "title": "Wattpad Story Scraper",
    "description": "Find public Wattpad stories by keyword, tag, or genre without credentials. Get story details, author story lists, chapter lists, or readable chapter text with public filters.",
    "version": "0.0",
    "x-build-id": "9Dx8f5fhkqLOJPcAy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~wattpad/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-wattpad",
        "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/maximedupre~wattpad/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-wattpad",
        "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/maximedupre~wattpad/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-wattpad",
        "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": "Target",
            "enum": [
              "searchByKeyword",
              "searchByTag",
              "browseGenreOrCategory",
              "storyDetails",
              "authorStories",
              "chapterText"
            ],
            "type": "string",
            "description": "Choose one public Wattpad task for this run. Use a separate run for each task and its settings."
          },
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more words or phrases to find public Wattpad stories. You can enter up to 500 keywords.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more Wattpad tags to find public stories. You can enter up to 500 tags.",
            "items": {
              "type": "string"
            }
          },
          "genresOrCategories": {
            "title": "Genres or categories",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more Wattpad genres or categories to browse public stories. You can enter up to 500 values.",
            "items": {
              "type": "string"
            }
          },
          "storyIdsOrUrls": {
            "title": "Story IDs or URLs",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more public Wattpad story IDs or URLs. Results include story details and a public chapter list when available. You can enter up to 500 values.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more public Wattpad usernames. Results include available public profile details and author engagement. You can enter up to 500 usernames.",
            "items": {
              "type": "string"
            }
          },
          "chapterIdsOrUrls": {
            "title": "Chapter IDs or URLs",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more public Wattpad chapter IDs or URLs to extract readable chapter text. You can enter up to 500 values.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Optionally filter discovery by a Wattpad language code. Leave it blank to include all languages. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "completion": {
            "title": "Completion",
            "enum": [
              "completed",
              "ongoing"
            ],
            "type": "string",
            "description": "Optionally show only completed or ongoing stories. Leave it blank to include both. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "access": {
            "title": "Access",
            "enum": [
              "free",
              "paywalled"
            ],
            "type": "string",
            "description": "Optionally show only free or paywalled stories. This filters public results and does not unlock paid content. Leave it blank to include both. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "maturity": {
            "title": "Maturity",
            "enum": [
              "general",
              "mature"
            ],
            "type": "string",
            "description": "Optionally filter by the story maturity label. Mature-gated items are skipped when they are not publicly available. Leave it blank to include both. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "minimumVotes": {
            "title": "Minimum votes",
            "minimum": 0,
            "type": "integer",
            "description": "Optionally return stories with at least this many votes. Leave it blank for no minimum. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "minimumReads": {
            "title": "Minimum reads",
            "minimum": 0,
            "type": "integer",
            "description": "Optionally return stories with at least this many reads. Leave it blank for no minimum. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "sortBy": {
            "title": "Sort stories by",
            "enum": [
              "relevance",
              "votes",
              "reads",
              "comments",
              "recentlyUpdated"
            ],
            "type": "string",
            "description": "Choose how to order discovered stories: relevance, votes, reads, comments, or recent updates. Choosing Recent updates also requests the recently updated feed for genre or category browsing. This applies to Search by keyword, Search by tag, and Browse a genre or category."
          },
          "includeAuthorContactEmails": {
            "title": "Include public author contact emails",
            "type": "boolean",
            "description": "Request publicly visible author contact emails and their source context when available. This applies to Search by keyword, Search by tag, Browse a genre or category, Story details, and Author stories. It is ignored for Chapter text and never bypasses access controls.",
            "default": false
          },
          "maxItems": {
            "title": "Stop after this many items",
            "minimum": 1,
            "type": "integer",
            "description": "Optionally stop after this many returned items. Leave it blank to return all available results until the source is exhausted. This is a work limit, not a promise of that many results."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}