Skip to main content
POST
/
webarchive
/
search
Run a search
curl --request POST \
  --url https://api.brightdata.com/webarchive/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": {
    "max_age": "Duration",
    "min_date": "YYYY-MM-DD",
    "max_date": "YYYY-MM-DD",
    "domain_whitelist": [
      "example.com"
    ],
    "domain_blacklist": [
      "example.com"
    ],
    "domain_regex_whitelist": [
      ".*example..*"
    ],
    "domain_regex_blacklist": [
      ".*example..*"
    ],
    "domain_like_whitelist": [
      "%.example.%",
      "example%"
    ],
    "domain_like_blacklist": [
      "%.example.ca"
    ],
    "category_whitelist": [
      "Automotive"
    ],
    "category_blacklist": [
      "Automotive"
    ],
    "url_regex_whitelist": [
      ".*/products/.*"
    ],
    "url_regex_blacklist": [
      ".*/products/.*"
    ],
    "url_like_whitelist": [
      "%/products/%",
      "%/search%"
    ],
    "url_like_blacklist": [
      "%/review/%"
    ],
    "language_whitelist": [
      "eng"
    ],
    "language_blacklist": [
      "eng"
    ],
    "ip_country_whitelist": [
      "us",
      "ie",
      "in"
    ],
    "ip_country_blacklist": [
      "mx",
      "ae",
      "ca"
    ],
    "captcha": true,
    "robots_block": true
  }
}
'
{
  "search_id": "ucd_abc123xyz"
}

Documentation Index

Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt

Use this file to discover all available pages before exploring further.

强制性:
要么使用 max_age,要么使用 min_date + max_date 的组合
如果搜索耗时超过 30 秒,响应将仅返回 search_id,您应该异步轮询状态。如果搜索在 30 秒内完成,响应将返回完整的搜索结果对象(与 GET /webarchive/search/<search_id> 相同)。
您每天可以运行最多 100 次搜索而不触发转储。 触发转储后,该搜索将不再计入您的限制。
  • 对于简单的模式匹配,使用 LIKE 过滤器(domain_like_*url_like_*),其中 % 表示任意序列,_ 表示单个字符。
  • LIKE 模式不区分大小写,对于简单的前缀/后缀匹配(如 %.comamazon%)通常比正则表达式更快。
  • 对于需要完整正则表达式语法的复杂模式,使用正则表达式过滤器(domain_regex_*url_regex_*)。LIKE 模式使用反斜杠转义:\% 表示字面上的 %\_ 表示字面上的 _

Authorizations

Authorization
string
header
required

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. Format: Authorization: Bearer YOUR_API_KEY

Example:

Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df

Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication

Body

application/json
filters
object

The filters used for this search (echoed back)

Response

Search initiated successfully

search_id
string

Returned if search is async

Example:

"ucd_abc123xyz"