{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper in English",
    "description": "Scrape Bilibili videos by keyword, URL or the Popular list, with titles, descriptions and tags translated into English and optional AI summaries. Search in English. No login and no personal data.",
    "version": "0.0",
    "x-build-id": "2JnhDGbDisH4cgGrX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sinolens~bilibili-scraper-english/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sinolens-bilibili-scraper-english",
        "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/sinolens~bilibili-scraper-english/runs": {
      "post": {
        "operationId": "runs-sync-sinolens-bilibili-scraper-english",
        "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/sinolens~bilibili-scraper-english/run-sync": {
      "post": {
        "operationId": "run-sync-sinolens-bilibili-scraper-english",
        "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 queries",
            "type": "array",
            "description": "Keywords to search on Bilibili, in English or Chinese. English queries are converted into the Chinese keywords Bilibili users type (turn this off under \"English output\").",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video links or IDs",
            "type": "array",
            "description": "Bilibili video links (bilibili.com/video/…, b23.tv short links), BV IDs such as BV1xx411c7mD, or av numbers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeTrending": {
            "title": "Include trending videos",
            "type": "boolean",
            "description": "Also scrape Bilibili's site-wide Popular list (热门).",
            "default": false
          },
          "maxResultsPerQuery": {
            "title": "Max videos per search query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Bilibili returns at most about 1,000 results per query.",
            "default": 20
          },
          "maxTrendingResults": {
            "title": "Max trending videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many videos to take from the Popular list.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites"
            ],
            "type": "string",
            "description": "Order in which Bilibili returns search results.",
            "default": "relevance"
          },
          "durationFilter": {
            "title": "Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Only return search results of this length.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only search results published on or after this date (UTC)."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only search results published on or before this date (UTC)."
          },
          "translateToEnglish": {
            "title": "Translate to English",
            "type": "boolean",
            "description": "Add English title, description, tags and category to every video. Charged per translated video.",
            "default": true
          },
          "aiSummary": {
            "title": "Add an AI summary in English",
            "type": "boolean",
            "description": "One or two English sentences on what each video is about, based on its title, description and tags (not on the audio). Charged per summarized video.",
            "default": false
          },
          "translateQueries": {
            "title": "Convert English search queries to Chinese",
            "type": "boolean",
            "description": "Free. Turn off to search with your exact keywords.",
            "default": true
          },
          "includeComments": {
            "title": "Add top comments in English",
            "type": "boolean",
            "description": "Add top comments to every video, translated into English with a sentiment label. Charged per comment.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pinned comments count toward this number. About one extra request per 20 comments, so runs with comments take longer.",
            "default": 20
          },
          "commentSort": {
            "title": "Which comments",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Bilibili's own ranking of the most liked and discussed comments, or the newest ones.",
            "default": "top"
          },
          "includeDetails": {
            "title": "Fetch full statistics and tags",
            "type": "boolean",
            "description": "Adds coins, shares, the original/repost flag and the full description to search results, and tags to trending and linked videos. About one extra request per video. If Bilibili blocks these requests, the run continues without them.",
            "default": true
          },
          "deduplicate": {
            "title": "Skip duplicate videos",
            "type": "boolean",
            "description": "Save each video only once per run, even if several queries find it. You are not charged for skipped duplicates.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Requests sent to Bilibili at the same time. Higher is faster but more likely to be throttled.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Use a proxy if Bilibili throttles requests from Apify servers.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}