bright data api

如何使用 Bright Data API?购买前学习手册

Want to scraping data by Bright Data API? We make a some examples of code for popular programming languages, with it you can easily to know how ot use Bright Data proxy API.

Bright Data homepage

Luminati proxy API

For Browser or Software,

Use the following settings in your Bot, Crawler or other software,

  1. Proxy: zproxy.lum-superproxy.io
  2. Port: 22225
  3. User: lum-customer-Your_username- Your_zonesetting
  4. Password: 0Yourpasswords0

Shell

卷曲 --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-Your_username- Your_zonesetting:0Yourpasswords0 "http://lumtest.com/myip.json"

Node.js

#!/usr/bin/env node
require('request-promise')({
url: 'http://lumtest.com/myip.json',
proxy: 'http://lum-customer-Your_username- Your_zonesetting:[email protected]:22225',
})
.then(function(data){ console.log(data); },
function(err){ console.error(err); });

Java

package example;

import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;

public class Example {
public static void main(String[] args) throws Exception {
System.out.println("To enable your free eval account and get "
+"CUSTOMER, YOURZONE and YOURPASS, please contact "
+"[email protected]");
HttpHost proxy = new HttpHost("zproxy.lum-superproxy.io", 22225);
String res = Executor.newInstance()
.auth(proxy, "lum-customer-Your_username- Your_zonesetting", "0Yourpasswords0")
.execute(Request.Get("http://lumtest.com/myip.json").viaProxy(proxy))
.returnContent().asString();
System.out.println(res);
}
}

C#

using System;
using System.Net;

class Example
{
static void Main()
{
Console.WriteLine("To enable your free eval account and get CUSTOMER, "
+"YOURZONE and YOURPASS, please contact [email protected]");
var client = new WebClient();
client.Proxy = new WebProxy("zproxy.lum-superproxy.io:22225");
client.Proxy.Credentials = new NetworkCredential("lum-customer-Your_username- Your_zonesetting", "0Yourpasswords0");
Console.WriteLine(client.DownloadString("http://lumtest.com/myip.json"));
}
}

VB

Imports System.Net

Module Module1
Sub Main()
Console.WriteLine("To enable your free eval account and get " & 
"CUSTOMER, YOURZONE and YOURPASS, please contact " &
"[email protected]")
Dim Client As New WebClient
Client.Proxy = New WebProxy("http://zproxy.lum-superproxy.io:22225")
Client.Proxy.Credentials = New NetworkCredential("lum-customer-Your_username- Your_zonesetting", "0Yourpasswords0")
Console.WriteLine(Client.DownloadString("http://lumtest.com/myip.json"))
End Sub
End Module

PHP

<?php
echo 'To enable your free eval account and get CUSTOMER, YOURZONE and '
.'YOURPASS, please contact [email protected]';
$curl = curl_init('http://lumtest.com/myip.json');
curl_setopt($curl, CURLOPT_PROXY, 'http://zproxy.lum-superproxy.io:22225');
curl_setopt($curl, CURLOPT_PROXYUSERPWD, 'lum-customer-Your_username- Your_zonesetting:0Yourpasswords0');
curl_exec($curl);
?>

Python

#!/usr/bin/env python
print('If you get error "ImportError: No module named \'six\'" install six:\n'+\
'$ sudo pip install six');
print('To enable your free eval account and get CUSTOMER, YOURZONE and ' + \
'YOURPASS, please contact [email protected]')
import sys
if sys.version_info[0]==2:
import six
from six.moves.urllib import request
opener = request.build_opener(
request.ProxyHandler(
{'http': 'http://lum-customer-Your_username- Your_zonesetting:[email protected]:22225',
'https': 'http://lum-customer-Your_username- Your_zonesetting:[email protected]:22225'}))
print(opener.open('http://lumtest.com/myip.json').read())
if sys.version_info[0]==3:
import urllib.request
opener = urllib.request.build_opener(
urllib.request.ProxyHandler(
{'http': 'http://lum-customer-Your_username- Your_zonesetting:[email protected]:22225',
'https': 'http://lum-customer-Your_username- Your_zonesetting:[email protected]:22225'}))
print(opener.open('http://lumtest.com/myip.json').read())

Ruby

#!/usr/bin/ruby

require 'uri'
require 'net/http'
require 'net/https'

puts 'To enable your free eval account and get CUSTOMER, YOURZONE and YOURPASS, please contact [email protected]'

uri = URI.parse('http://lumtest.com/myip.json')
proxy = Net::HTTP::Proxy('zproxy.lum-superproxy.io', 22225, 'lum-customer-Your_username- Your_zonesetting', '0Yourpasswords0')

req = Net::HTTP::Get.new(uri.path)

result = proxy.start(uri.host,uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(req)
end

puts result.body

Perl

#!/usr/bin/perl
print 'To enable your free eval account and get CUSTOMER, YOURZONE and '
.'YOURPASS, please contact [email protected]';
use LWP::UserAgent;
my $agent = LWP::UserAgent->new();
$agent->proxy(['http', 'https'], "http://lum-customer-Your_username- Your_zonesetting:0Yourpasswords0\@zproxy.lum-superproxy.io:22225");
print $agent->get('http://lumtest.com/myip.json')->content();

Search Engine Crawler API

Google Search Crawler API

搜索

Localization

gl     Two-letter country code used to define the country of search
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&gl=us"
hl     Two-letter language code used to define the page language
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&hl=us"

Type of search

tbm     Define search type. For regular search there is no need to use the tbm parameter while other types have
            a unique tbm value.
            Example:
            tbm=isch – images
            tbm=shop – shopping
[%nws] – news
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&tbm=shop"
ibp     Use the ibp parameter for Jobs search type.
           Example:
           ibp=htl;jobs – Jobs
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&ibp=htl%3Bjobs"

Pagination

start     Define the result offset – results to start from the selected value. Used for managing pagination.
             Examples:
             start=0 (default) – first page of results
             start=10 – second page of results
             start=20 – third page of results, etc.
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&start=10"
num     Defines the number of results to return.
             Examples:
             num=10 (default) returns 10 results
             num=30 returns 30 results, etc.
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&num=100"

Geographic Location

uule     Stands for the encoded location you want to use for your search and will be used to change geo-location. A CSV with all available uule values can be downloaded here
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&uule=w+CAIQICINVW5pdGVkK1N0YXRlcw"

Device and output format

lum_mobile     Define what device type to be represented in user-agent

                           Default or lum_mobile=0 will provide random desktop user-agent while lum_mobile=1 will provide random mobile user-agent

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PA
lum_json     Bright Data parameter allowing to return parsed JSON instead of raw HTML
                      Examples:
                      lum_json=1 – return results in JSON
                      lum_json=html – return JSON with “html” field containing raw HTML
                      lum_json=hotel – make additional request to retrieve hotel prices
                      lum_json=hotel,html – two values can be combined while separated by comma
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/search?q=pizza&lum_json=1"

Search by image

download     Download image on the proxy side and post it to google using POST request
                       Examples:
default – download-and-post if google isn't able to download the image
                       download=1 – force download-and-post image
                       download=0 – regular GET request with image URL
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/searchbyimage?image_url=https%3A%2F%2Flive.staticflickr.com%2F213%2F491726079_4f46636859_w.jpg&download=1"

Multiple requests

multi     Make parallel requests through our API server using POST request.
               Parallel requests will be using the same peer and session and can be used for comparison tests, I.e. making an identical pair of requests with 2 different values for a selected parameter
               multi=[{“keyword”:”pizza”,”num”:20},{“keyword”:”pizza”,”num”:100}] – the same keyword with different num param
               multi=[{“keyword”:”pizza”},{“keyword”:”burger”}] – different keywords
curl -v --compressed "https://brightdata.com/api/serp/req" -H "Content-Type: application/json" -H "Authorization: Bearer API_TOKEN" -d "{\"country\":\"us\",\"multi\":[{\"keyword\":\"pizza\",\"num\":20},{\"keyword\":\"pizza\",\"num\":100}]}"

Asynchronous requests

Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

RESPONSE_ID=`curl -i --silent --compressed "https://brightdata.com/api/serp/req?customer=username&zone=ZONE" -H "Content-Type: application/json" -H "Authorization: Bearer <API_TOKEN>" -d "{\"query\":{\"q\":\"pizza\"},\"country\":\"us\"}" | sed -En 's/^x-response-id: (.*)//p' | tr -d '\r'`

`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result

curl -v --compressed "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&response_id=${RESPONSE_ID}" -H "Authorization: Bearer <API_TOKEN>"

You can adjust your zone async settings on zones page.
Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


Parsing schema

The parsing scheme can be obtained by the following endpoint: GET /api/serp/google/parsing_schema

To get schema, perform:

curl --compressed "https://brightdata.com/api/serp/google/parsing_schema" -H "Authorization: Bearer API_TOKEN"

Maps

Localization

gl     Two-letter country code used to define the country of search
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/maps/search/restaurants+new+york/?gl=us"
hl Two-letter language code used to define the page language
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/maps/search/restaurants+new+york/?hl=en"

Pagination

start     Define the result offset – results to start from the selected value. Used for managing pagination.
             Examples:
             start=0 (default) – first page of results
             start=20 – second page of results
             start=40 – third page of results, etc.
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/maps/search/restaurants+new+york/?start=20"
num     Defines the number of results to return.
             Examples:
             num=40 (default) returns 40 results
             num=50 returns 50 results, etc.
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/maps/search/restaurants+new+york/?num=40"

Output format

lum_json     Bright Data parameter allowing to return parsed JSON instead of raw HTML
                       Examples:
                       lum_json=1 – return results in JSON
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/maps/search/restaurants+new+york/?lum_json=1"

Trends

Geo

geo Location of interest, two-letter country code

curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://trends.google.com/trends/explore?q=pizza&geo=us"

Localization

hl     Preferred language, two-letter language code
curl -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://trends.google.com/trends/explore?q=pizza&hl=de"

Time range

date     Time range to search. Available values are:
             default: Past 12 month
             now 1-H – Past hour
             now 4-H – Past 4 hours
             now 1-d – Past day
             now 7-d – Past 7 days
             today 1-m – Past 30 days
             today 3-m – Past 90 days
             today 12-m – Past 12 months
             today 5-y – Past 5 years
             2020-07-01 2020-12-31 – custom date range

卷曲 -v --compressed --proxy zproxy.lum-

Category
cat     Category to search within. By default search within all categories.

           You can find list of all categories 这里.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http:/

Type of search
gprop      Google property to filter on. Defaults to web search.

                 Possible values are: imagesnewsgroogleyoutube

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http

Asynchronous requests
Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

响应标识=`卷曲 -i --静音 --压缩 "https://brightdata.com/api/serp/trends?customer=username&zone=ZONE" -H "内容类型:应用程序/json" -H "授权:Bearer " -d "{\"询问\":{\"q\":\"比萨饼\"},\"国家\":\"我们\"}" | 欙腓 -更多 's/^x-response-id: (.*)//p' |  -d '\r'`

`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result

卷曲 -v-压缩 "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&output=json&response_id=${response_id}" -H "授权:Bearer "

You can adjust your zone async settings on zones page.
Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


Reviews

Feature id
fid    Feature id what you want to fetch reviews to.
fid parameter can be found in knowledge.fid field of google search response.
For example: http://www.google.com/search?q=hilton%20new%20york%20midtown
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/reviews?fid=0x808fba02425dad8f%3A0x6c296c66619367e0"

Localization

hl      Preferred language, two-letter language code
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/reviews?hl=de&fid=0x808fba02425dad8f%3A0x6c296c66619367e0"

Sorting and filtering

sort      The way reviews are sorted. Possible values are:
             sort=qualityScore (default) – most relevant first
             sort=newestFirst – newest first
             sort=ratingHigh – highest rating first
             sort=ratingLow – lowest rating first

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/reviews?fid=0x808fba02425dad8f%3A0x6c296c66619367e0&sort=newestFirst"
filter     Filter keyword. Will respond with reviews that contain specified keyword only. Example:

              filter=awesome – search for reviews containing ‘awesome' word

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/reviews?filter=awesome&fid=0x808fba02425dad8f%3A0x6c296c66619367e0"

Pagination

start     Define the result offset – results to start from the selected value. Used for managing pagination.
             Examples:
             start=0 (default) – first page of results
             start=10 – second page of results
             start=20 – third page of results, etc.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.google.com/reviews?start=10&fid=0x808fba02425dad8f%3A0x6c296c66619367e0"

Asynchronous requests

Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

响应标识=`卷曲 -i --静音 --压缩 "https://brightdata.com/api/serp/reviews?customer=username&zone=ZONE" -H "内容类型:应用程序/json" -H "授权:Bearer " -d "{\"询问\":{\"\":\"0x808fba02425dad8f:0x6c296c66619367e0\"},\"国家\":\"我们\"}" | 欙腓 -更多 's/^x-response-id: (.*)//p' |  -d '\r'`

`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result

卷曲 -v-压缩 "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&response_id=${response_id}" -H "授权:Bearer "

You can adjust your zone async settings on zones page.
Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


Bing Search Crawler API

Localization
cc     Two-letter country code used to define the country of search
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&cc=us"

Geographic Location

location     A location for the search origin.

                    lat 和 lon parameters must be specified as well

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&location=New+York%2C+New+York%2C+United+States&lat=40.7001958&lon=-74.1087142"
lat     A GPS latitude for the search origin
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&lat=40.7001958&lon=-74.1087142"
lon     A GPS longitude for the search origin
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&lat=40.7001958&lon=-74.1087142"
mkt     The market where the search results come from. Use this link to view all optional values.
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&mkt=en-US"

Pagination

first     Define the result offset – results to start from the selected value. Used for managing pagination.
             Examples:
             first=1 (default) – first page of results
             first=11 – second page of results
             first=21 – third page of results, etc.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&first=11"
count     Defines the number of results to return.
                Examples:
                count=10 (default) returns 10 results
                count=30 returns 30 results, etc.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&num=20"

Device and output format

lum_mobile     Define what device type to be represented in user-agent

                           Default or lum_mobile=0 will provide random desktop user-agent while lum_mobile=1 will provide random mobile user-agent

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&lum_mobile=1"
lum_json     Bright Data parameter allowing to return parsed JSON instead of raw HTML
                       Examples:
                       lum_json=1 – return results in JSON
                       lum_json=html – return JSON with “html” field containing raw HTML
                       lum_json=hotel – make additional request to retrieve hotel prices
                       lum_json=hotel,html – two values can be combined while separated by comma

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "http://www.bing.com/search?q=pizza&lum_json=1"

Asynchronous requests

Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

响应标识=`卷曲 -i --静音 --压缩 "https://brightdata.com/api/serp/bing/search?customer=username&zone=ZONE" -H "内容类型:应用程序/json" -H "授权:Bearer " -d "{\"询问\":{\"q\":\"比萨饼\"},\"国家\":\"我们\"}" | 欙腓 -更多 's/^x-response-id: (.*)//p' |  -d '\r'`
`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result
卷曲 -v-压缩 "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&response_id=${response_id}" -H "授权:Bearer "
You can adjust your zone async settings on zones page.

Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


Parsing schema

The parsing scheme can be obtained by the following endpoint: GET /api/serp/bing/parsing_schema

To get schema, perform:

卷曲 --压缩 "https://brightdata.com/api/serp/bing/parsing_schema" -H "授权:Bearer API_TOKEN"

Yandex Search Crawler API

Localization
lr     Region or country to search. Examples:
        1 – Moscow
        2 – Saint-Petersburg
        84 – USA
        95 – Canada
       134 – China

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&lr=84"
lang     Two-letter language code used to define the page language
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&lang=en"

Pagination

p     Define the result page – results to start from the selected value. Used for managing pagination.
       Examples:
       p=1 (default) – first page of results
       p=2 – second page of results
       p=4 – fourth page of results, etc.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&p=1"
numdoc      Defines the number of results to return.

                     Takes the values 102030和 10. When using numbers other than these values which less than 50, rounding up to the nearest of them occurs. When using numbers over 50,                                 rounding up to 50 occurs.

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&numdoc=10"

Time range

内     Time range to search. Available values are:
                 1 - 过去两周
                 2 - 过去一个月
                 3 - 过去 3 个月
                 4 - 过去 6 个月
                 5 - 过去一年
                 6 - 过去两年
                 7 – Past day
                 77 - 过去 24 小时
                 8 - 过去 3 天
                 9 - 过去一周

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&within=1"
完整日期     定义结果开始日期。用于管理时间范围(格式为 DD.MM.YYYY)。
                                 Examples:
                                 from_date_full=12.12.2020 - 起始日期

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&from_date_full=12.12.2020"
至完整日期      定义结果结束日期。用于管理时间范围(格式为 DD.MM.YYYY)。
                             Examples:
                             to_date_full=01.01.2021 - 搜索结束日期

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?text=pizza&to_date_full=01.01.2021"
lum_mobile      Define what device type to be represented in user-agent

                            Default or lum_mobile=0 will provide random desktop user-agent while lum_mobile=1 will provide random mobile user-agent

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://www.yandex.com/search/?lum_mobile=1&text=pizza"

Asynchronous requests

Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

响应标识=`卷曲 -i --静音 --压缩 "https://brightdata.com/api/serp/yandex/search?customer=username&zone=ZONE" -H "内容类型:应用程序/json" -H "授权:Bearer " -d "{\"询问\":{\"文本\":\"比萨饼\"},\"国家\":\"我们\"}" | 欙腓 -更多 's/^x-response-id: (.*)//p' |  -d '\r'`

`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result

卷曲 -v-压缩 "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&response_id=${response_id}" -H "授权:Bearer "

You can adjust your zone async settings on zones page.
Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


DuckDuckGo Search Crawler API

Localization
kl     用于定义搜索国家和语言的国家和语言代码
卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://duckduckgo.com/?q=pizza&kl=us-en"

安全搜索

kp     从搜索结果中删除成人内容。
         可用值为
         1 - 打开安全搜索
         3 - 缓和搜索内容
         3 - 关闭安全搜索

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://duckduckgo.com/?q=pizza&kp=1"

Time range

df     Time range to search. Available values are:
         d - 过去两周
         w - 过去一个月
         m - 过去 3 个月
         w - 过去 6 个月

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://duckduckgo.com/?q=pizza&df=d"

Device and output format

lum_mobile     Define what device type to be represented in user-agent

                           Default or lum_mobile=0 will provide random desktop user-agent while lum_mobile=1 will provide random mobile user-agent

卷曲 -v --compressed --proxy zproxy.lum-superproxy.io:22225 --proxy-user lum-customer-username-zone-ZONE:PASSWORD "https://duckduckgo.com/?q=pizza&lum_mobile=1"

Asynchronous requests

Send requests without waiting for the response. Collect results via a designated endpoint or a webhook.

To initiate a request, perform:

响应标识=`卷曲 -i --静音 --压缩 "https://brightdata.com/api/serp/duckduckgo/search?customer=username&zone=ZONE" -H "内容类型:应用程序/json" -H "授权:Bearer " -d "{\"询问\":{\"q\":\"比萨饼\"},\"国家\":\"我们\"}" | 欙腓 -更多 's/^x-response-id: (.*)//p' |  -d '\r'`

`x-response-id` header will contain the id of the request so you can use it in the next request to fetch the result

卷曲 -v-压缩 "https://brightdata.com/api/serp/get_result?customer=username&zone=ZONE&response_id=${response_id}" -H "授权:Bearer "

You can adjust your zone async settings on zones page.
Optional settings:
Result lifetime (days) – number of days to keep results
Web Hook URL – address to deliver results
Web Hook Request Method – HTTP method to use to deliver response, GET or POST are optional


资源


免责声明:这部分内容主要来自商家。如果商家不希望在我的网站上显示,请 联系我们 删除您的内容。

最后更新于 2022 年 5 月 16 日

您推荐代理服务吗?

点击奖杯即可颁奖!

平均评分 5 /5.计票: 2

目前没有投票!成为第一个给本帖评分的人。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

zh_CNChinese
滚动到顶部