{
  "openapi": "3.0.1",
  "info": {
    "title": "Archive of Our Own (AO3) Scraper",
    "description": "Scrape Archive of Our Own (AO3) - the largest fanfiction archive on the web. Search by keyword, browse by fandom or tag, list an author's works, or fetch full metadata for specific works. No login required.",
    "version": "1.0",
    "x-build-id": "mG8J0VvzjBo5msoQe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~archive-of-our-own-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-archive-of-our-own-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~archive-of-our-own-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-archive-of-our-own-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~archive-of-our-own-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-archive-of-our-own-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": [
              "search",
              "byFandom",
              "byTag",
              "byAuthor",
              "byUrls",
              "byCollection",
              "bySeries",
              "tagSearch",
              "authorSearch"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query searched across title, summary, tags and body. Required for mode=search. Also usable as an optional refine filter on byFandom/byTag/byAuthor — leave blank there to avoid narrowing results.",
            "default": ""
          },
          "titleQuery": {
            "title": "Title contains",
            "type": "string",
            "description": "Restrict to works whose title contains this text."
          },
          "creators": {
            "title": "Creator / author name",
            "type": "string",
            "description": "Restrict to works by this creator (pseud or username)."
          },
          "fandomNames": {
            "title": "Fandom names",
            "type": "string",
            "description": "Comma-separated fandom names to refine results, e.g. `Harry Potter - J. K. Rowling, Marvel Cinematic Universe`."
          },
          "relationshipNames": {
            "title": "Relationship tags",
            "type": "string",
            "description": "Comma-separated relationship tags to refine results, e.g. `Harry Potter/Draco Malfoy`."
          },
          "characterNames": {
            "title": "Character tags",
            "type": "string",
            "description": "Comma-separated character tags to refine results."
          },
          "freeformTags": {
            "title": "Additional (freeform) tags",
            "type": "string",
            "description": "Comma-separated additional/freeform tags to refine results, e.g. `Fluff, Slow Burn`."
          },
          "fandomTag": {
            "title": "Fandom (mode=byFandom)",
            "type": "string",
            "description": "Exact AO3 fandom tag to browse, e.g. `Harry Potter - J. K. Rowling`, `Marvel Cinematic Universe`, `Naruto`."
          },
          "tagName": {
            "title": "Tag (mode=byTag)",
            "type": "string",
            "description": "Exact AO3 tag to browse — a relationship, character, or freeform tag, e.g. `Fluff`, `Hurt/Comfort`."
          },
          "username": {
            "title": "Username (mode=byAuthor)",
            "type": "string",
            "description": "AO3 username whose public works to list."
          },
          "pseud": {
            "title": "Pseud (mode=byAuthor, optional)",
            "type": "string",
            "description": "Restrict to a specific pseudonym of the username above. Leave blank to include all of the user's pseuds."
          },
          "collectionName": {
            "title": "Collection name (mode=byCollection)",
            "type": "string",
            "description": "AO3 collection slug to browse, e.g. `yuletide2023` (from `archiveofourown.org/collections/yuletide2023`)."
          },
          "seriesId": {
            "title": "Series URL or ID (mode=bySeries)",
            "type": "string",
            "description": "AO3 series URL (e.g. `https://archiveofourown.org/series/5000`) or bare numeric series ID. Emits one series-summary record plus every work in the series."
          },
          "tagSearchQuery": {
            "title": "Tag name contains (mode=tagSearch)",
            "type": "string",
            "description": "Find AO3 tags whose name contains this text — useful for discovering the exact canonical tag name/spelling before using it in `fandomTag`, `tagName`, or the refine filters."
          },
          "tagSearchType": {
            "title": "Tag type (mode=tagSearch, optional)",
            "enum": [
              "",
              "Fandom",
              "Character",
              "Relationship",
              "Freeform"
            ],
            "type": "string",
            "description": "Restrict tag search results to one tag category.",
            "default": ""
          },
          "tagSearchCanonicalOnly": {
            "title": "Canonical tags only (mode=tagSearch)",
            "type": "boolean",
            "description": "Only return AO3's canonical (wrangled) tags, excluding synonyms/non-canonical variants.",
            "default": false
          },
          "authorSearchQuery": {
            "title": "Search all fields (mode=authorSearch)",
            "type": "string",
            "description": "Find AO3 users/pseuds matching this text — useful for discovering the exact username/pseud spelling before using it in `username` (mode=byAuthor)."
          },
          "authorSearchFandom": {
            "title": "Fandom filter (mode=authorSearch, optional)",
            "type": "string",
            "description": "Restrict author search results to users active in this fandom."
          },
          "workUrls": {
            "title": "Work URLs or IDs (mode=byUrls)",
            "type": "array",
            "description": "AO3 work URLs (e.g. `https://archiveofourown.org/works/12345678`) or bare numeric work IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeChapterText": {
            "title": "Include chapter text (mode=byUrls)",
            "type": "boolean",
            "description": "Fetch and include the full text of one chapter (see Chapter number below). Off by default — work-level metadata is the primary deliverable.",
            "default": false
          },
          "chapterNumber": {
            "title": "Chapter number (mode=byUrls)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Which chapter's text to include when 'Include chapter text' is on. 1 = first chapter.",
            "default": 1
          },
          "allChaptersText": {
            "title": "Include ALL chapters' text (mode=byUrls)",
            "type": "boolean",
            "description": "Overrides Chapter number — fetches every chapter's text into one field (capped at ~300,000 characters per work). Use sparingly, this is a heavy operation.",
            "default": false
          },
          "rating": {
            "title": "Rating",
            "maxItems": 1,
            "type": "array",
            "description": "Filter by a single content rating (AO3 gives each work exactly one rating, so its own site returns zero results if you select more than one at once — only the first selection is used). Leave empty for all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "enumTitles": [
                "Not Rated",
                "General Audiences",
                "Teen And Up Audiences",
                "Mature",
                "Explicit"
              ]
            },
            "default": []
          },
          "warnings": {
            "title": "Archive warnings",
            "type": "array",
            "description": "Filter by one or more archive warnings. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "14",
                "16",
                "17",
                "18",
                "19",
                "20"
              ],
              "enumTitles": [
                "Creator Chose Not To Use Archive Warnings",
                "No Archive Warnings Apply",
                "Graphic Depictions Of Violence",
                "Major Character Death",
                "Rape/Non-Con",
                "Underage Sex"
              ]
            },
            "default": []
          },
          "category": {
            "title": "Category",
            "type": "array",
            "description": "Filter by one or more relationship categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "21",
                "22",
                "23",
                "116",
                "2246",
                "24"
              ],
              "enumTitles": [
                "Gen",
                "F/M",
                "M/M",
                "F/F",
                "Multi",
                "Other"
              ]
            },
            "default": []
          },
          "language": {
            "title": "Language",
            "enum": [
              "",
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "pt-BR",
              "ru",
              "ja",
              "zh",
              "ko",
              "ar",
              "pl",
              "nl",
              "sv",
              "fi",
              "no",
              "da",
              "tr",
              "cs",
              "el",
              "he",
              "hi",
              "id",
              "th",
              "vi",
              "uk",
              "ro",
              "hu",
              "bg",
              "hr",
              "sr",
              "sk",
              "lt",
              "lv",
              "et",
              "ca",
              "eu",
              "gl",
              "af",
              "ms"
            ],
            "type": "string",
            "description": "Filter to a specific work language. Leave as 'Any language' to include all.",
            "default": ""
          },
          "wordCountMin": {
            "title": "Word count (min)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at least this many words."
          },
          "wordCountMax": {
            "title": "Word count (max)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at most this many words."
          },
          "hitsMin": {
            "title": "Hits (min)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only include works with at least this many hits (views)."
          },
          "hitsMax": {
            "title": "Hits (max)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only include works with at most this many hits (views)."
          },
          "kudosMin": {
            "title": "Kudos (min)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at least this many kudos."
          },
          "kudosMax": {
            "title": "Kudos (max)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at most this many kudos."
          },
          "commentsMin": {
            "title": "Comments (min)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at least this many comments."
          },
          "commentsMax": {
            "title": "Comments (max)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at most this many comments."
          },
          "bookmarksMin": {
            "title": "Bookmarks (min)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at least this many bookmarks."
          },
          "bookmarksMax": {
            "title": "Bookmarks (max)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include works with at most this many bookmarks."
          },
          "completeStatus": {
            "title": "Completion status",
            "enum": [
              "any",
              "complete",
              "wip"
            ],
            "type": "string",
            "description": "Filter by whether the work is finished.",
            "default": "any"
          },
          "crossoverStatus": {
            "title": "Crossover status",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Filter by whether the work crosses over multiple fandoms.",
            "default": "any"
          },
          "singleChapterOnly": {
            "title": "Single-chapter works only",
            "type": "boolean",
            "description": "Only include one-shots (works with exactly one posted chapter).",
            "default": false
          },
          "dateUpdatedFrom": {
            "title": "Updated after (mode=search/byFandom/byTag/byAuthor)",
            "type": "string",
            "description": "Only include works last updated after this date, e.g. `01 January 2024`."
          },
          "dateUpdatedTo": {
            "title": "Updated before (mode=search/byFandom/byTag/byAuthor)",
            "type": "string",
            "description": "Only include works last updated before this date, e.g. `31 December 2024`."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "_score",
              "created_at",
              "revised_at",
              "word_count",
              "hits",
              "kudos_count",
              "comments_count",
              "bookmarks_count",
              "title_to_sort_on",
              "authors_to_sort_on"
            ],
            "type": "string",
            "description": "Result ordering for listing modes.",
            "default": "_score"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending order for the chosen sort field.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}