curl --request GET \
--url https://api.brightdata.com/unblocker/success_rate/{domain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brightdata.com/unblocker/success_rate/{domain}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brightdata.com/unblocker/success_rate/{domain}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brightdata.com/unblocker/success_rate/{domain}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.brightdata.com/unblocker/success_rate/{domain}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.brightdata.com/unblocker/success_rate/{domain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/unblocker/success_rate/{domain}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"example.com": 0.9835548316870116,
"example.fr": 0.987469724604454,
"example.co.uk": 0.9503769840916476,
"example.ca": 0.9904893224078992,
"example.de": 0.9864620859972142
}"需要用户身份验证"Web Unlocker API 成功率
使用 Bright Data Web Unlocker API 成功率端点。GET /unblocker/success_rate/ 按日期范围和 URL 返回按域名统计的成功率。
curl --request GET \
--url https://api.brightdata.com/unblocker/success_rate/{domain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.brightdata.com/unblocker/success_rate/{domain}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brightdata.com/unblocker/success_rate/{domain}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brightdata.com/unblocker/success_rate/{domain}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.brightdata.com/unblocker/success_rate/{domain}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.brightdata.com/unblocker/success_rate/{domain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/unblocker/success_rate/{domain}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"example.com": 0.9835548316870116,
"example.fr": 0.987469724604454,
"example.co.uk": 0.9503769840916476,
"example.ca": 0.9904893224078992,
"example.de": 0.9864620859972142
}"需要用户身份验证"example.com)可获取该域名的成功率。传入通配符(例如 example.*)可获取该名称下每个受监控顶级域名的成功率。
如何按日期范围或 URL 筛选成功率?
添加可选的查询参数from_datetime、to_datetime 和 url_pattern。每个参数都可以单独使用,也可以组合使用:
from_datetime和to_datetime设置统计窗口。两者均接受 ISO 8601 UTC 日期(例如2026-09-20)或日期时间(例如2026-09-20T00:00:00Z)。url_pattern仅保留 URL 包含该字符串的请求。匹配方式为不区分大小写的子字符串匹配,并支持通配符域名。
/ip/ 的 example.com 请求的成功率:
curl -G "https://api.brightdata.com/unblocker/success_rate/example.com" \
--data-urlencode "from_datetime=2026-09-20" \
--data-urlencode "to_datetime=2026-09-24" \
--data-urlencode "url_pattern=/ip/" \
-H "Authorization: Bearer YOUR_API_KEY"
from_datetime 晚于 to_datetime 或日期无法解析时,请求将失败。
相关指南:Web Unlocker API 功能授权
在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。
认证方法:
- 从 Bright Data 账户设置获取您的 API Key: https://brightdata.com/cp/setting/users
- 在请求的 Authorization 头中包含 API Key
- 格式:
Authorization: Bearer YOUR_API_KEY
示例:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
了解如何获取 Bright Data API Key: https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key?
路径参数
要查询的域名。可使用单个域名(例如 example.com),或使用通配符(例如 example.*)返回所有受监控的顶级域名。
"example.com"
查询参数
统计窗口的开始时间,采用 ISO 8601 UTC 格式。可传入日期(例如 2026-09-20)或日期时间(例如 2026-09-20T00:00:00Z)。from_datetime 可以单独使用,也可以与 to_datetime 一起使用。当 from_datetime 晚于 to_datetime 或参数值无法解析时,请求将失败。
"2026-09-20T00:00:00Z"
统计窗口的结束时间,采用 ISO 8601 UTC 格式。可传入日期(例如 2026-09-24)或日期时间(例如 2026-09-24T00:00:00Z)。to_datetime 可以单独使用,也可以与 from_datetime 一起使用。
"2026-09-24"
仅返回 URL 包含该字符串的请求的统计数据。匹配方式为不区分大小写的子字符串匹配,因此 /ip/ 会匹配任何包含 /ip/ 或 /IP/ 的请求 URL。支持通配符域名,例如 example.*。
"/ip/"
响应
OK
统计窗口内域名到成功率的映射,取值为 0 到 1 之间的数字。
此页面对您有帮助吗?