{
  "openapi": "3.0.1",
  "info": {
    "title": "Bahamut 巴哈姆特 Gaming Forum & VOC Scraper",
    "description": "Discover Bahamut game boards and collect complete public discussions, floors, comments, GP/BP, available views, media links, crawl audits, and incremental VOC updates.",
    "version": "0.0",
    "x-build-id": "9ffOT2hpaDaOTy6Na"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/research_master~bahamut-gaming-forum-voc-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-research_master-bahamut-gaming-forum-voc-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/research_master~bahamut-gaming-forum-voc-scraper/runs": {
      "post": {
        "operationId": "runs-sync-research_master-bahamut-gaming-forum-voc-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/research_master~bahamut-gaming-forum-voc-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-research_master-bahamut-gaming-forum-voc-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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "SCRAPE_DISCUSSIONS",
              "DISCOVER_BOARDS"
            ],
            "type": "string",
            "description": "Discover boards only, or discover/select boards and collect discussion records.",
            "default": "SCRAPE_DISCUSSIONS"
          },
          "boardQueries": {
            "title": "Game or board names",
            "maxItems": 20,
            "type": "array",
            "description": "Game or board names used to discover candidate BSNs through Bahamut's public ACG directory.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "bsns": {
            "title": "Board BSNs",
            "maxItems": 50,
            "type": "array",
            "description": "Known Bahamut board IDs as numeric strings. These are validated at runtime, merged with discovered boards, and deduplicated.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "startUrls": {
            "title": "Discussion URLs",
            "type": "array",
            "description": "Optional public Bahamut C.php discussion URLs. Direct URLs are collected before discovered candidates.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "A public https://forum.gamer.com.tw/C.php discussion URL."
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Discussion keywords",
            "maxItems": 30,
            "type": "array",
            "description": "Search each selected board for these keywords. Leave empty to collect from board listings.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort discussions by",
            "enum": [
              "LATEST",
              "HOT"
            ],
            "type": "string",
            "description": "Latest uses thread creation/search time. Hot uses GP for keyword results and page-bounded GP ranking for board listings.",
            "default": "LATEST"
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Optional ISO date or datetime. Filtering uses the first floor's publication time in Asia/Taipei."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Optional ISO date or datetime. A date-only value includes the entire local day."
          },
          "maxBoards": {
            "title": "Maximum boards",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum unique boards retained after merging explicit and discovered BSNs.",
            "default": 10
          },
          "maxListPages": {
            "title": "Maximum listing/search pages",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum pages read per board or board-keyword combination.",
            "default": 3
          },
          "maxThreads": {
            "title": "Maximum discussions",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global maximum unique discussions selected for detail collection.",
            "default": 20
          },
          "maxThreadPages": {
            "title": "Maximum pages per discussion",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Use 0 for every available page. A positive safety cap makes longer discussions incomplete; they are saved to INCOMPLETE_DISCUSSIONS in the default Key-Value Store and are not pushed to the Dataset.",
            "default": 0
          },
          "includeComments": {
            "title": "Include all comments",
            "type": "boolean",
            "description": "Expand the public comment endpoint for every collected floor.",
            "default": true
          },
          "includeImages": {
            "title": "Include image URLs",
            "type": "boolean",
            "description": "Return image URLs referenced in posts and comments. Images are never downloaded.",
            "default": true
          },
          "includeExternalLinks": {
            "title": "Include external links",
            "type": "boolean",
            "description": "Return external URLs without visiting them. Bahamut Anime and Store URLs are excluded.",
            "default": true
          },
          "authorMode": {
            "title": "Author ID handling",
            "enum": [
              "HASHED",
              "RAW",
              "OMIT"
            ],
            "type": "string",
            "description": "Hash author IDs by default, retain raw IDs, or omit IDs. Display names follow the same omission rule.",
            "default": "HASHED"
          },
          "authorHashSalt": {
            "title": "Author hash salt",
            "type": "string",
            "description": "Optional secret salt for stable hashes across unrelated runs. Monitoring runs persist a generated salt when this is empty."
          },
          "monitoring": {
            "title": "Incremental monitoring",
            "type": "object",
            "description": "Persist discussion fingerprints across runs and emit only new or updated discussions after a game version marker.",
            "properties": {
              "enabled": {
                "title": "Enable monitoring",
                "type": "boolean",
                "description": "Store fingerprints across runs under the selected monitor key.",
                "default": false
              },
              "key": {
                "title": "Monitor key",
                "type": "string",
                "description": "Stable key shared by repeated runs of the same monitor.",
                "default": "default",
                "minLength": 1,
                "maxLength": 80
              },
              "onlyNew": {
                "title": "Emit only changed records",
                "type": "boolean",
                "description": "Skip unchanged discussions already stored by this monitor.",
                "default": true
              },
              "includeUpdated": {
                "title": "Include updated discussions",
                "type": "boolean",
                "description": "Emit previously seen discussions when floors, comments, metrics, or content changed.",
                "default": true
              },
              "versionLabel": {
                "title": "Game version label",
                "type": "string",
                "description": "Optional release label attached to emitted records and saved monitor state.",
                "default": "",
                "maxLength": 100
              },
              "reset": {
                "title": "Reset saved state",
                "type": "boolean",
                "description": "Clear the selected monitor state before this run.",
                "default": false
              }
            },
            "default": {
              "enabled": false,
              "key": "default",
              "onlyNew": true,
              "includeUpdated": true,
              "versionLabel": ""
            }
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Polite delay before each request to Bahamut.",
            "default": 500
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for transient public-page failures. Inaccessible or sensitive pages are not bypassed.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Taiwan residential proxy is the verified default because Bahamut blocks the tested direct and generic data-center exits. Changing it can cause HTTP 403 responses and may change proxy cost.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "TW"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}