{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper: Views, Coins, Danmaku & Tags per Video",
    "description": "Scrapes Bilibili with a Bilibili scraper for search results, the popular list and video links. Give search terms or links; get each video's views, likes, coins, danmaku, tags, uploader and publish time as rows, never the video file.",
    "version": "0.1",
    "x-build-id": "bmDV68x3bLW7us0Ed"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h1018y~anvil-bilibili-videos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h1018y-anvil-bilibili-videos",
        "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/h1018y~anvil-bilibili-videos/runs": {
      "post": {
        "operationId": "runs-sync-h1018y-anvil-bilibili-videos",
        "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/h1018y~anvil-bilibili-videos/run-sync": {
      "post": {
        "operationId": "run-sync-h1018y-anvil-bilibili-videos",
        "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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search for on Bilibili, one per line, in any language, e.g. cat or 原神. Also accepted as keywords.",
            "default": [
              "cat"
            ],
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video links or IDs",
            "type": "array",
            "description": "Optional Bilibili video links or BV ids to read directly, e.g. https://www.bilibili.com/video/BV1GJ411x7h7 or a b23.tv short link.",
            "items": {
              "type": "string"
            }
          },
          "video_url": {
            "title": "Single video link (drop-in field)",
            "type": "string",
            "description": "One Bilibili video link or BV id, same field name as the Bilibili Video Downloader actor, e.g. BV1GJ411x7h7."
          },
          "popular": {
            "title": "Add the popular list",
            "type": "boolean",
            "description": "Set true to also return Bilibili's current popular videos, true or false, e.g. true.",
            "default": false
          },
          "maxResults": {
            "title": "Videos per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum videos per search term (and for the popular list), from 1 to 200, e.g. 20.",
            "default": 10
          },
          "sortBy": {
            "title": "Sort search by",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites"
            ],
            "type": "string",
            "description": "Order of search results: relevance, views, newest, danmaku (comments on screen) or favorites, e.g. views.",
            "default": "relevance"
          },
          "minViews": {
            "title": "Minimum views",
            "type": "integer",
            "description": "Keep only videos with at least this many views, e.g. 100000. Use 0 for no filter.",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum likes",
            "type": "integer",
            "description": "Keep only videos with at least this many likes, e.g. 5000. Use 0 for no filter.",
            "default": 0
          },
          "includeDetails": {
            "title": "Add full details",
            "type": "boolean",
            "description": "Adds coins, shares, video size and tags with one extra request per video, true or false, e.g. true.",
            "default": true
          },
          "includeUploaderStats": {
            "title": "Add uploader follower count",
            "type": "boolean",
            "description": "Adds the uploader's follower count with one extra request per uploader, true or false, e.g. false.",
            "default": false
          },
          "onlyNew": {
            "title": "Only videos not seen before",
            "type": "boolean",
            "description": "Return only videos that were not in the last run with the same input. Use it on a schedule, e.g. true.",
            "default": false
          },
          "video_quality": {
            "title": "Video quality (ignored)",
            "type": "string",
            "description": "Accepted so inputs of the Bilibili Video Downloader actor work unchanged. No video files are downloaded."
          },
          "max_comments": {
            "title": "Max comments (ignored)",
            "type": "integer",
            "description": "Accepted so inputs of the Bilibili Video Downloader actor work unchanged. Comments are not collected."
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy, true or false. The plain datacenter proxy is enough, e.g. true.",
            "default": true
          },
          "proxyGroups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Optional Apify Proxy group names, e.g. [\"RESIDENTIAL\"]. Leave empty for the default group.",
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Send results to (webhook URL)",
            "type": "string",
            "description": "Optional. An https address - your own system, Zapier, Make or a Slack incoming webhook - that gets each run's results as JSON (with 'only new' on: just the new ones). Example: https://hooks.slack.com/services/T000/B000/XXXX"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}