{
  "openapi": "3.0.1",
  "info": {
    "title": "Royal Road Scraper",
    "description": "Scrape Royal Road - the leading platform for serialized web fiction (progression fantasy, LitRPG, GameLit). Browse curated lists, search by genre/tag/status, fetch full fiction details with chapter lists, or list an author's fictions. No login required.",
    "version": "1.0",
    "x-build-id": "omVREVgGIZ3VHzq8b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~royalroad-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-royalroad-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/crawlerbros~royalroad-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-royalroad-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/crawlerbros~royalroad-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-royalroad-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "browse",
              "search",
              "fictionDetail",
              "byAuthor"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "browse"
          },
          "listType": {
            "title": "Curated list (mode=browse)",
            "enum": [
              "bestRated",
              "trending",
              "activePopular",
              "complete",
              "weeklyPopular",
              "latestUpdates",
              "new",
              "risingStars",
              "writathon"
            ],
            "type": "string",
            "description": "Which curated Royal Road list to scrape.",
            "default": "bestRated"
          },
          "risingStarsGenre": {
            "title": "Rising Stars genre filter (listType=risingStars)",
            "enum": [
              "",
              "action",
              "adventure",
              "comedy",
              "contemporary",
              "drama",
              "fantasy",
              "historical",
              "horror",
              "mystery",
              "psychological",
              "romance_main",
              "satire",
              "sci_fi",
              "one_shot",
              "thriller",
              "tragedy"
            ],
            "type": "string",
            "description": "Optional. Royal Road publishes a separate Rising Stars ranking (~50 fictions) for each genre. Leave blank for the overall cross-genre Rising Stars list.",
            "default": ""
          },
          "searchTitle": {
            "title": "Title contains (mode=search)",
            "type": "string",
            "description": "Match fictions whose title contains this text."
          },
          "searchKeyword": {
            "title": "Keyword (mode=search)",
            "type": "string",
            "description": "Free-text keyword search across title and description.",
            "default": "dungeon"
          },
          "searchAuthor": {
            "title": "Author name contains (mode=search)",
            "type": "string",
            "description": "Match fictions by a specific author name."
          },
          "genres": {
            "title": "Genres (mode=search)",
            "type": "array",
            "description": "Only include fictions tagged with at least one of these genres.",
            "items": {
              "type": "string",
              "enum": [
                "action",
                "adventure",
                "comedy",
                "contemporary",
                "drama",
                "fantasy",
                "historical",
                "horror",
                "mystery",
                "psychological",
                "romance_main",
                "satire",
                "sci_fi",
                "one_shot",
                "thriller",
                "tragedy"
              ],
              "enumTitles": [
                "Action",
                "Adventure",
                "Comedy",
                "Contemporary",
                "Drama",
                "Fantasy",
                "Historical",
                "Horror",
                "Mystery",
                "Psychological",
                "Romance",
                "Satire",
                "Sci-fi",
                "Short Story",
                "Thriller",
                "Tragedy"
              ]
            },
            "default": []
          },
          "tags": {
            "title": "Tags (mode=search)",
            "type": "array",
            "description": "Only include fictions tagged with at least one of these secondary tags.",
            "items": {
              "type": "string",
              "enum": [
                "anti-hero_lead",
                "antivillain_lead",
                "apocalypse",
                "artificial_intelligence",
                "attractive_lead",
                "chivalry",
                "competing_love",
                "cozy",
                "crafting",
                "cultivation",
                "cyberpunk",
                "deck_building",
                "dungeon_core",
                "dungeon_crawler",
                "dystopia",
                "female_lead",
                "first_contact",
                "gamelit",
                "gender_bender",
                "genetically_engineered",
                "grimdark",
                "hard_sci-fi",
                "high_fantasy",
                "kingdom_building",
                "lesbian_romance",
                "litrpg",
                "local_protagonist",
                "low_fantasy",
                "magic",
                "magical_girl",
                "magitech",
                "gay_romance",
                "male_lead",
                "martial_arts",
                "mecha",
                "modern_knowledge",
                "monster_evolution",
                "multiple_lead",
                "harem",
                "mythos",
                "non-human_lead",
                "nonhumanoid_lead",
                "otome",
                "summoned_hero",
                "post_apocalyptic",
                "progression",
                "reader_interactive",
                "reincarnation",
                "romance",
                "ruling_class",
                "school_life",
                "secret_identity",
                "slice_of_life",
                "soft_sci-fi",
                "space_opera",
                "sports",
                "steampunk",
                "strategy",
                "strong_lead",
                "super_heroes",
                "supernatural",
                "survival",
                "system_invasion",
                "technologically_engineered",
                "loop",
                "time_travel",
                "tower",
                "urban_fantasy",
                "villainous_lead",
                "virtual_reality",
                "war_and_military",
                "wuxia"
              ],
              "enumTitles": [
                "Anti-Hero Lead",
                "Anti-Villain Lead",
                "Apocalypse",
                "Artificial Intelligence",
                "Attractive Lead",
                "Chivalry",
                "Competing Love Interest",
                "Cozy",
                "Crafting",
                "Cultivation",
                "Cyberpunk",
                "Deck Building",
                "Dungeon Core",
                "Dungeon Crawler",
                "Dystopia",
                "Female Lead",
                "First Contact",
                "GameLit",
                "Gender Bender",
                "Genetically Engineered",
                "Grimdark",
                "Hard Sci-fi",
                "High Fantasy",
                "Kingdom Building",
                "Lesbian Romance",
                "LitRPG",
                "Local Protagonist",
                "Low Fantasy",
                "Magic",
                "Magical Girl",
                "Magitech",
                "Male Gay Romance",
                "Male Lead",
                "Martial Arts",
                "Mecha",
                "Modern Knowledge",
                "Monster Evolution",
                "Multiple Lead Characters",
                "Multiple Lovers",
                "Mythos",
                "Non-Human Lead",
                "Non-Humanoid Lead",
                "Otome",
                "Portal Fantasy / Isekai",
                "Post Apocalyptic",
                "Progression",
                "Reader Interactive",
                "Reincarnation",
                "Romance Subplot",
                "Ruling Class",
                "School Life",
                "Secret Identity",
                "Slice of Life",
                "Soft Sci-fi",
                "Space Opera",
                "Sports",
                "Steampunk",
                "Strategy",
                "Strong Lead",
                "Super Heroes",
                "Supernatural",
                "Survival",
                "System Invasion",
                "Technologically Engineered",
                "Time Loop",
                "Time Travel",
                "Tower",
                "Urban Fantasy",
                "Villainous Lead",
                "Virtual Reality",
                "War and Military",
                "Wuxia"
              ]
            },
            "default": []
          },
          "contentWarnings": {
            "title": "Content warnings (mode=search)",
            "type": "array",
            "description": "Only include fictions flagged with at least one of these content warnings.",
            "items": {
              "type": "string",
              "enum": [
                "ai_assisted",
                "ai_generated",
                "graphic_violence",
                "profanity",
                "sensitive",
                "sexuality"
              ],
              "enumTitles": [
                "AI-Assisted Content",
                "AI-Generated Content",
                "Graphic Violence",
                "Profanity",
                "Sensitive Content",
                "Sexual Content"
              ]
            },
            "default": []
          },
          "excludeTags": {
            "title": "Exclude genres/tags/warnings (mode=search)",
            "type": "array",
            "description": "Exclude fictions tagged with any of these genres, tags, or content warnings.",
            "items": {
              "type": "string",
              "enum": [
                "action",
                "adventure",
                "comedy",
                "contemporary",
                "drama",
                "fantasy",
                "historical",
                "horror",
                "mystery",
                "psychological",
                "romance_main",
                "satire",
                "sci_fi",
                "one_shot",
                "thriller",
                "tragedy",
                "anti-hero_lead",
                "antivillain_lead",
                "apocalypse",
                "artificial_intelligence",
                "attractive_lead",
                "chivalry",
                "competing_love",
                "cozy",
                "crafting",
                "cultivation",
                "cyberpunk",
                "deck_building",
                "dungeon_core",
                "dungeon_crawler",
                "dystopia",
                "female_lead",
                "first_contact",
                "gamelit",
                "gender_bender",
                "genetically_engineered",
                "grimdark",
                "hard_sci-fi",
                "high_fantasy",
                "kingdom_building",
                "lesbian_romance",
                "litrpg",
                "local_protagonist",
                "low_fantasy",
                "magic",
                "magical_girl",
                "magitech",
                "gay_romance",
                "male_lead",
                "martial_arts",
                "mecha",
                "modern_knowledge",
                "monster_evolution",
                "multiple_lead",
                "harem",
                "mythos",
                "non-human_lead",
                "nonhumanoid_lead",
                "otome",
                "summoned_hero",
                "post_apocalyptic",
                "progression",
                "reader_interactive",
                "reincarnation",
                "romance",
                "ruling_class",
                "school_life",
                "secret_identity",
                "slice_of_life",
                "soft_sci-fi",
                "space_opera",
                "sports",
                "steampunk",
                "strategy",
                "strong_lead",
                "super_heroes",
                "supernatural",
                "survival",
                "system_invasion",
                "technologically_engineered",
                "loop",
                "time_travel",
                "tower",
                "urban_fantasy",
                "villainous_lead",
                "virtual_reality",
                "war_and_military",
                "wuxia",
                "ai_assisted",
                "ai_generated",
                "graphic_violence",
                "profanity",
                "sensitive",
                "sexuality"
              ],
              "enumTitles": [
                "Action",
                "Adventure",
                "Comedy",
                "Contemporary",
                "Drama",
                "Fantasy",
                "Historical",
                "Horror",
                "Mystery",
                "Psychological",
                "Romance",
                "Satire",
                "Sci-fi",
                "Short Story",
                "Thriller",
                "Tragedy",
                "Anti-Hero Lead",
                "Anti-Villain Lead",
                "Apocalypse",
                "Artificial Intelligence",
                "Attractive Lead",
                "Chivalry",
                "Competing Love Interest",
                "Cozy",
                "Crafting",
                "Cultivation",
                "Cyberpunk",
                "Deck Building",
                "Dungeon Core",
                "Dungeon Crawler",
                "Dystopia",
                "Female Lead",
                "First Contact",
                "GameLit",
                "Gender Bender",
                "Genetically Engineered",
                "Grimdark",
                "Hard Sci-fi",
                "High Fantasy",
                "Kingdom Building",
                "Lesbian Romance",
                "LitRPG",
                "Local Protagonist",
                "Low Fantasy",
                "Magic",
                "Magical Girl",
                "Magitech",
                "Male Gay Romance",
                "Male Lead",
                "Martial Arts",
                "Mecha",
                "Modern Knowledge",
                "Monster Evolution",
                "Multiple Lead Characters",
                "Multiple Lovers",
                "Mythos",
                "Non-Human Lead",
                "Non-Humanoid Lead",
                "Otome",
                "Portal Fantasy / Isekai",
                "Post Apocalyptic",
                "Progression",
                "Reader Interactive",
                "Reincarnation",
                "Romance Subplot",
                "Ruling Class",
                "School Life",
                "Secret Identity",
                "Slice of Life",
                "Soft Sci-fi",
                "Space Opera",
                "Sports",
                "Steampunk",
                "Strategy",
                "Strong Lead",
                "Super Heroes",
                "Supernatural",
                "Survival",
                "System Invasion",
                "Technologically Engineered",
                "Time Loop",
                "Time Travel",
                "Tower",
                "Urban Fantasy",
                "Villainous Lead",
                "Virtual Reality",
                "War and Military",
                "Wuxia",
                "AI-Assisted Content",
                "AI-Generated Content",
                "Graphic Violence",
                "Profanity",
                "Sensitive Content",
                "Sexual Content"
              ]
            },
            "default": []
          },
          "status": {
            "title": "Status (mode=search)",
            "type": "array",
            "description": "Only include fictions with one of these statuses. Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "COMPLETED",
                "DROPPED",
                "ONGOING",
                "HIATUS",
                "INACTIVE",
                "STUB"
              ],
              "enumTitles": [
                "Completed",
                "Dropped",
                "Ongoing",
                "Hiatus",
                "Inactive",
                "Stub"
              ]
            },
            "default": []
          },
          "fictionType": {
            "title": "Fiction type (mode=search)",
            "enum": [
              "ALL",
              "fanfiction",
              "original"
            ],
            "type": "string",
            "description": "Filter by original work vs fan fiction.",
            "default": "ALL"
          },
          "minPages": {
            "title": "Min pages (mode=search)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Minimum estimated printed-book page count (275 words/page)."
          },
          "maxPages": {
            "title": "Max pages (mode=search)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum estimated printed-book page count (275 words/page)."
          },
          "minRating": {
            "title": "Min rating (mode=search)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Minimum overall rating, 0-5."
          },
          "maxRating": {
            "title": "Max rating (mode=search)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Maximum overall rating, 0-5."
          },
          "orderBy": {
            "title": "Order by (mode=search)",
            "enum": [
              "relevance",
              "popularity",
              "rating",
              "last_update",
              "release_date",
              "followers",
              "length",
              "views",
              "title",
              "author"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "relevance"
          },
          "sortDirection": {
            "title": "Sort direction (mode=search)",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending sort order.",
            "default": "desc"
          },
          "fictionUrls": {
            "title": "Fiction URLs or IDs (mode=fictionDetail)",
            "type": "array",
            "description": "Royal Road fiction URLs (e.g. https://www.royalroad.com/fiction/21220/mother-of-learning) or bare numeric fiction IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorUrls": {
            "title": "Author profile URLs or IDs (mode=byAuthor)",
            "type": "array",
            "description": "Royal Road author profile URLs (e.g. https://www.royalroad.com/profile/100374) or bare numeric profile IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 25
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Royal Road works from Apify datacenter IPs without any proxy at all. Leave disabled (default) to avoid proxy usage entirely; only enable if you start seeing 403/429 errors from Royal Road.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}