{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Search Scraper",
    "description": "Search Bilibili videos by keyword in Chinese or English: title, views, danmaku, comments, favorites, duration, publication date, tags, category and uploader, up to 1,000 per keyword. Sort by best match, views, newest, danmaku or favorites; filter by length and date.",
    "version": "0.1",
    "x-build-id": "0rbggzJdNFMGFlJYh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blueskyscraper~bilibili-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blueskyscraper-bilibili-search-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/blueskyscraper~bilibili-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blueskyscraper-bilibili-search-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/blueskyscraper~bilibili-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blueskyscraper-bilibili-search-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": {
          "mode": {
            "title": "🧭 What to get",
            "enum": [
              "search"
            ],
            "type": "string",
            "description": "<b>Videos</b> — views, likes, coins, favorites, shares, danmaku and comment counts, tags, duration, uploader. <b>Search</b> — videos for a keyword. <b>Uploaders</b> — a creator's profile and followers, then their videos. <b>Danmaku</b> — the bullet comments shown over a video, with the second they appear. <b>Comments</b> — top-level comments in hot or newest order, then the replies under them. <b>Trending</b> — Bilibili's popular list or a category ranking.",
            "default": "search"
          },
          "keywords": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Search: Chinese or English, e.g. <code>minecraft</code>, <code>人工智能</code>, <code>露营</code>. Each keyword is one search, up to 1,000 videos.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Bilibili URLs",
            "type": "array",
            "description": "Any bilibili.com link, routed automatically: video, b23.tv-free video page, uploader space, search page (<code>search.bilibili.com/all?keyword=…</code>) or the popular page.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerInput": {
            "title": "💯 Results per video, keyword or uploader",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for each input: search results per keyword, videos per uploader, danmaku or comments per video, trending videos.",
            "default": 50
          },
          "sortBy": {
            "title": "↕️ Search order",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow"
            ],
            "type": "string",
            "description": "Bilibili's own search orders.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "⏱️ Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Search: Bilibili's length filter.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "📅 Published after",
            "type": "string",
            "description": "Search: <code>YYYY-MM-DD</code>."
          },
          "publishedBefore": {
            "title": "📅 Published before",
            "type": "string",
            "description": "Search: <code>YYYY-MM-DD</code>."
          },
          "includeDetails": {
            "title": "📊 Full stats for each result ($0.003 instead of $0.0015)",
            "type": "boolean",
            "description": "Search and uploader videos: open every video for likes, coins, favorites, shares, tags and uploader — billed as a video row.",
            "default": false
          },
          "includeTags": {
            "title": "🏷️ Video tags",
            "type": "boolean",
            "description": "Videos and Trending: add the video's tags (one extra request per video, no extra charge).",
            "default": true
          },
          "maxItems": {
            "title": "Maximum rows per run",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many rows in the whole run — a hard ceiling on cost.",
            "default": 10000
          },
          "monitoringStoreName": {
            "title": "🔔 Monitoring mode — store name",
            "type": "string",
            "description": "Give the run a name (e.g. <code>minecraft-new</code>) and every later run with the same name returns <b>only rows it has not delivered before</b> — new videos, new danmaku, new comments. Empty = normal run."
          },
          "dataContract": {
            "title": "🧾 Data contract (provenance + null reasons)",
            "type": "boolean",
            "description": "Adds to every row a <code>provenance</code> block (platform, upstream API, mode, source ID, canonical URL, position, observedAt / collectedAt, schema version, checksum of ID + counters, <code>rawChecksum</code> — SHA-256 of the raw Bilibili answer the row came from, the answer itself is not stored) and a <code>metrics</code> block: views, likes, coins, favorites, shares, comments and danmaku as separate counters, each a value or <code>null</code> with the reason. Each run also writes a <code>MANIFEST</code> record: per input its status and rows, for searches the requested and applied filters, pages read, Bilibili's numResults and the results our date check excluded, for comments the stated total against what visitors can open.",
            "default": false
          },
          "authorPrivacy": {
            "title": "🕶️ Author data",
            "enum": [
              "full",
              "pseudonymous"
            ],
            "type": "string",
            "description": "Pseudonymous replaces uploader and commenter names, IDs, links and avatars with <code>uploaderKey</code> / <code>userKey</code> — a salted, stable hash (the same key for one account in every row type) for concentration analysis, without storing profiles. Uploader profile rows lose name, UID, links, avatar, bio, birthday and school; danmaku <code>userHash</code> becomes a salted <code>userKey</code>; the \"回复 @name:\" prefix of replies is removed; @mentions inside comment, danmaku, title and description text become <code>@user_</code> + an 8-character key (the same salted hash, stable for one name); uploader inputs become the key in <code>sourceInput</code>.",
            "default": "full"
          },
          "stripSignedTokens": {
            "title": "✂️ Remove signed tokens from links",
            "type": "boolean",
            "description": "Removes signed parameters from links and image URLs. On by itself with pseudonymous authors.",
            "default": false
          },
          "snapshotId": {
            "title": "🏷️ Snapshot id",
            "type": "string",
            "description": "Optional label of this snapshot (e.g. the date), written into provenance of every row."
          },
          "panelId": {
            "title": "🏷️ Panel id / version",
            "type": "string",
            "description": "Optional id of your fixed panel of videos (re-measure them daily with the Videos mode), written into provenance. In the Videos mode it also keeps a panel journal under this name: free <code>panel_change</code> rows (added / removed / kept_unavailable, with the reason) and a <code>PANEL</code> record with the full membership. A new id or version starts a new panel."
          },
          "queryId": {
            "title": "🏷️ Query id / version",
            "type": "string",
            "description": "Optional id of your search profile version, written into provenance."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}