curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.google.com/travel/hotels/New+York?...","country":"US","currency":"USD"}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_mg3gjfmg12tc2n5d4d¬ify=false&include_errors=true&type=discover_new&discover_by=filter_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_mg3gjfmg12tc2n5d4d",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "filter_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.google.com/travel/hotels/New+York?...",
"country": "US",
"currency": "USD",
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_mg3gjfmg12tc2n5d4d",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "filter_url",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
url: "https://www.google.com/travel/hotels/New+York?...",
country: "US",
currency: "USD",
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"hotel_id": "CgoI_example",
"name": "The Plaza",
"address": "768 5th Ave, New York, NY 10019",
"rating": 4.5,
"reviews_count": 8200,
"price_per_night": "795.00",
"currency": "USD"
}
]
Google
按筛选 URL 发现 Google 酒店
使用 Bright Data Scraper API 按筛选 URL 发现 Google 酒店。POST /datasets/v3/scrape 以 JSON 格式返回酒店记录。
POST
/
datasets
/
v3
/
scrape
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.google.com/travel/hotels/New+York?...","country":"US","currency":"USD"}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_mg3gjfmg12tc2n5d4d¬ify=false&include_errors=true&type=discover_new&discover_by=filter_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_mg3gjfmg12tc2n5d4d",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "filter_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.google.com/travel/hotels/New+York?...",
"country": "US",
"currency": "USD",
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_mg3gjfmg12tc2n5d4d",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "filter_url",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
url: "https://www.google.com/travel/hotels/New+York?...",
country: "US",
currency: "USD",
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"hotel_id": "CgoI_example",
"name": "The Plaza",
"address": "768 5th Ave, New York, NY 10019",
"rating": 4.5,
"reviews_count": 8200,
"price_per_night": "795.00",
"currency": "USD"
}
]
查询参数
string
默认值:"gd_mg3gjfmg12tc2n5d4d"
必填
用于此请求的数据集 ID。
必须设置为
gd_mg3gjfmg12tc2n5d4d 以发现按筛选 URL 的 Google 酒店数据。string
默认值:"discover_new"
必填
必须设置为
discover_new。string
默认值:"filter_url"
必填
必须设置为
filter_url。boolean
默认值:false
请求完成时是否发送通知。
boolean
默认值:true
是否在响应中包含错误。
请求体
object[]
必填
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":[{"url":"https://www.google.com/travel/hotels/New+York?...","country":"US","currency":"USD"}],"limit_per_input":10}' \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_mg3gjfmg12tc2n5d4d¬ify=false&include_errors=true&type=discover_new&discover_by=filter_url"
import requests
response = requests.post(
"https://api.brightdata.com/datasets/v3/scrape",
params={
"dataset_id": "gd_mg3gjfmg12tc2n5d4d",
"notify": "false",
"include_errors": "true",
"type": "discover_new",
"discover_by": "filter_url",
},
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"input": [
{
"url": "https://www.google.com/travel/hotels/New+York?...",
"country": "US",
"currency": "USD",
},
],
"limit_per_input": 10,
},
)
print(response.text)
const params = new URLSearchParams({
dataset_id: "gd_mg3gjfmg12tc2n5d4d",
notify: "false",
include_errors: "true",
type: "discover_new",
discover_by: "filter_url",
});
const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: [
{
url: "https://www.google.com/travel/hotels/New+York?...",
country: "US",
currency: "USD",
},
],
limit_per_input: 10,
}),
});
console.log(await response.text());
[
{
"hotel_id": "CgoI_example",
"name": "The Plaza",
"address": "768 5th Ave, New York, NY 10019",
"rating": 4.5,
"reviews_count": 8200,
"price_per_night": "795.00",
"currency": "USD"
}
]
此页面对您有帮助吗?