{
  "openapi": "3.0.1",
  "info": {
    "title": "BookWyrm Public Reviews & Export Cleaner",
    "description": "Collect supported public BookWyrm RSS and HTML pages or clean supplied review exports, with explicit source coverage. ActivityPub and Literal API routes are unavailable.",
    "version": "0.1",
    "x-build-id": "0qhyAIpKuho4dpvq0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thescrapelab~bookwyrm-book-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thescrapelab-bookwyrm-book-reviews-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/thescrapelab~bookwyrm-book-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-thescrapelab-bookwyrm-book-reviews-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/thescrapelab~bookwyrm-book-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-thescrapelab-bookwyrm-book-reviews-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",
        "properties": {
          "providedRecords": {
            "title": "Your records (JSON)",
            "type": "array",
            "description": "Paste records you have permission to process. These are normalized, validated and deduplicated without fetching their original websites. Use this OR a supplied dataset ID. Invalid web URLs, non-finite values and negative prices or counts are rejected. Unknown values remain unknown.",
            "items": {
              "type": "object"
            }
          },
          "providedDatasetId": {
            "title": "Your Apify dataset ID",
            "type": "string",
            "description": "Optional 17-character ID of a dataset you can access. Clear the JSON records to [] when using a dataset. Only a bounded number of records is read."
          },
          "startUrls": {
            "title": "Any BookWyrm URLs",
            "type": "array",
            "description": "Paste public BookWyrm URLs when you already have them. Book, profile, review, shelf, list, RSS, and ActivityPub JSON URLs are accepted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "instanceUrl": {
            "title": "Default BookWyrm instance",
            "type": "string",
            "description": "Instance used for unqualified profile handles and book searches. You can still target other instances in the same run.",
            "default": "https://bookwyrm.world"
          },
          "maxReviews": {
            "title": "Maximum reviews",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many public reviews have been collected. Keep this low for tests; increase it for production runs.",
            "default": 10
          },
          "instances": {
            "title": "Instances to discover",
            "type": "array",
            "description": "BookWyrm instance base URLs used only when instance discovery is enabled.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "enableInstanceDiscovery": {
            "title": "Discover public instance activity",
            "type": "boolean",
            "description": "Visit a bounded set of public discovery pages on each listed instance to find public books, reviews, profiles, lists, and statuses.",
            "default": false
          },
          "maxDiscoveryPagesPerInstance": {
            "title": "Maximum discovery pages per instance",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety limit for public discovery pages on each selected instance.",
            "default": 3
          },
          "books": {
            "title": "Book URLs",
            "type": "array",
            "description": "Paste public BookWyrm book URLs. The Actor enriches each book and collects public reviews that the book page or ActivityPub data exposes.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "Add one profile per line. Use a federated handle such as sigvie@bookwyrm.world, a profile URL, or instance | handle.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "search": {
            "title": "Book search",
            "type": "array",
            "description": "Add one book title, author, or ISBN per line. The Actor searches BookWyrm and processes matching book pages. You can also use instance | title to target a specific BookWyrm instance.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxSearchResults": {
            "title": "Maximum search results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum book results to process per search query.",
            "default": 5
          },
          "includeReviewerProfiles": {
            "title": "Advanced: enrich full reviewer profiles",
            "type": "boolean",
            "description": "Fetch extra public reviewer profile pages and ActivityPub data. Leave off for faster large book runs; review rows still include visible reviewer name, handle, and profile URL when available.",
            "default": false
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "reviews_flat",
              "books_with_nested_reviews",
              "normalized"
            ],
            "type": "string",
            "description": "Choose flat book/review rows, books with nested reviews, or normalized federated entities.",
            "default": "reviews_flat"
          },
          "includeFederationSummary": {
            "title": "Add federation summary",
            "type": "boolean",
            "description": "Add one aggregate row with entity counts, instance coverage, discovery methods, request mix, and public rating statistics.",
            "default": false
          },
          "includeShelves": {
            "title": "Include public shelves",
            "type": "boolean",
            "description": "Collect public shelf entities when they are discovered. Use normalized output to emit standalone shelf rows.",
            "default": false
          },
          "includeLists": {
            "title": "Include public lists",
            "type": "boolean",
            "description": "Collect public list entities when they are discovered. Use normalized output to emit standalone list rows.",
            "default": false
          },
          "includeQuotes": {
            "title": "Include public quotations",
            "type": "boolean",
            "description": "Collect public quotation statuses exposed by the selected profiles and feeds.",
            "default": false
          },
          "includeComments": {
            "title": "Include public comments",
            "type": "boolean",
            "description": "Collect public comment statuses exposed by the selected profiles and feeds.",
            "default": false
          },
          "monitoringMode": {
            "title": "Monitoring mode",
            "enum": [
              "snapshot",
              "compare_and_update"
            ],
            "type": "string",
            "description": "Snapshot keeps runs independent. Compare and update emits a change summary and updates compact state only after a fully successful run.",
            "default": "snapshot"
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "maxLength": 120,
            "type": "string",
            "description": "Required in compare-and-update mode. Use a different private key for each customer, project, or source set.",
            "default": ""
          },
          "literalInput": {
            "title": "Optional Literal public source",
            "type": "object",
            "description": "Optional Literal seeds and per-source limits. Results share the overall BookWyrm limits and output mode. Omit this object for BookWyrm-only behavior. Book-level review listing is unavailable.",
            "properties": {
              "startUrls": {
                "title": "Literal URLs",
                "type": "array",
                "description": "Public Literal.club book, search, author, shelf, profile, or profile-review URLs resolved through Literal's public API.",
                "items": {
                  "type": "string"
                }
              },
              "searchQueries": {
                "title": "Book names",
                "type": "array",
                "description": "Book titles or search terms to look up through Literal's public API.",
                "items": {
                  "type": "string"
                }
              },
              "isbns": {
                "title": "ISBNs",
                "type": "array",
                "description": "Optional ISBN-10 or ISBN-13 values. Spaces and hyphens are removed automatically.",
                "items": {
                  "type": "string"
                }
              },
              "authorNames": {
                "title": "Author names",
                "type": "array",
                "description": "Optional author names to search for related public Literal.club book pages.",
                "items": {
                  "type": "string"
                }
              },
              "profileHandles": {
                "title": "Profile handles",
                "type": "array",
                "description": "Public Literal.club profile handles. Enable reviews to collect their recent public book reviews.",
                "items": {
                  "type": "string"
                }
              },
              "includeReviews": {
                "title": "Scrape reviews",
                "type": "boolean",
                "description": "Collect recent public reviews from profile handles or profile-review URLs. Literal does not provide a public list of reviews for a book URL; a book-only review request fails before fetching data."
              },
              "maxReviews": {
                "title": "Maximum reviews",
                "type": "integer",
                "description": "Maximum number of review records to save for the whole run. This is a cap, not a guarantee that reviews exist publicly.",
                "minimum": 0,
                "maximum": 10000
              },
              "maxBooks": {
                "title": "Maximum books",
                "type": "integer",
                "description": "Maximum book pages to enrich during the run. Lower values keep runs cheaper and more predictable.",
                "minimum": 0,
                "maximum": 10000
              },
              "maxSearchResultsPerQuery": {
                "title": "Books per search",
                "type": "integer",
                "description": "Maximum Literal.club book links to follow for each book name, author name, or ISBN search.",
                "minimum": 1,
                "maximum": 50
              },
              "enableIsbnDiscovery": {
                "title": "Use extra ISBN discovery",
                "type": "boolean",
                "description": "When an exact official ISBN lookup has no match, also try Literal's public book search. Turn it off for the fewest API requests."
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}