API documentation
Getting started
-
Where Can I find API integration examples using my account credentials?
Once you are logged in to your Bright Data account, Go to API and examples page.There you can find all the relevant API integrations methods, including ports, zones preferences or other common flags used by API The page contains d...
-
What is the API documentation and how should I use it?
The API documentation describes how to use Bright Data's API commands and optional flags used for automating and controlling recurrent actions executed on the account's settings, a specific zone or product, or a specific proxy. API...
-
Terms
ZONE — The zone name for which you want to get the info. view my Zones CUSTOMER — Your account id which you can get from your control panel PASSWORD — Your zone password. view my Zones COUNTRY — The country code you wish to filter...
Statistics
-
Get the bandwidth stats for a Zone
API endpoint: GET /api/zone/bw Optional parameters: from=2018-07-01T00:00:00&to=2018-07-02T00:00:00 Example response:{"ID:":{"customer_id":"CUSTOMER_ID","from":"2022-10-01T00:00:00.000Z","to":"2022-11-23T00:00:00.000Z","data":{"s...
-
Get the bandwidth stats for all your Zones
API endpoint: GET /api/customer/bw Optional parameters: from=2018-07-01T00:00:00&to=2018-07-02T00:00:00 Example response:{"ID":{"customer_id":"CUST_ID","from":"2022-10-01T00:00:00.000Z","to":"2022-11-24T00:00:00.000Z","data":{"data...
-
Get the total cost and bandwidth stats for a Zone
API endpoint: GET /api/zone/cost Optional parameters: from=2018-07-01T00:00:00&to=2018-07-02T00:00:00 Response of Bandwidth zones: Example response:{"ID":{"back_m2":{"bw":0,"cost":0},"back_m1":{"bw":36557298,"cost":0},"back_m0":{"...
Proxy IPs management
-
Get amount of available Datacenter and ISP IPs
API endpoint: GET /api/zone/count_available_ips Parameters: zone=ZONE [string] - name of the Zone plan={...} [JSON object] - abstract plan parameters pool_ip_type=static_res [string] - should search in ISP instead of DC ips_type=...
-
Get recent IPs attempting to use your Zone
API endpoint: GET /api/zone/recent_ips Parameter: zones=ZONE - To get attempting IPs to any of your zone : zones=* Sample Response: {"ZONE":["255.0.0.127","10.0.0.1"]} Shell curl "https://api.brightdata.com/zone/recent_ips?zones=...
-
Get the available Data center/ISP IPs per Zone
API endpoint: GET /api/zone/route_ips Parameter: zone=ZONE[string] [required] country=COUNTRY_CODE[string] [optional] Sample Response: 10.0.0.0/24 Shell curl "https://api.brightdata.com/zone/route_ips?zone=ZONE&country=COUNTRY"...
-
Get all available dedicated residential IPs per Zone
API endpoint: GET /api/zone/route_vips Sample Response: ["us_7922_fl_hollywood_0","ma_36903_01_tetouan_5","br_52894_mg_montesclaros_99"] Shell curl "https://api.brightdata.com/zone/route_vips?zone=ZONE" -H "Authorization: Bearer ...
Account management
-
Get total balance through API
API endpoint: GET /api/customer/balance Sample Response: {"balance":456,"pending_costs":123} balance : the amount of money in your account pending_costs : the amount of money you will be billed for, as of this moment, in the next ...
-
Get Zone info
API endpoint: GET /api/zone Sample Response: {"ips":"any","password":["PASSWORD"],"plans":[{"start":"2019-07-15T18:08:59.269Z","type":"static","ips_type":"shared","ip_alloc_preset":"shared_block","bandwidth":"payperusage"}]} Shel...
-
Add a Zone
API endpoint: POST /api/zone POST body : zone [JSON] [Required] name=NAME [string] - Zone name plan [JSON] [Required] type="static|resident|unblocker" [string] 'static' : Datacenter, ISP 'resident' : Residential, Mobile, SE...
-
Remove Zone
API endpoint: DELETE /api/zone Shell curl -X DELETE "https://api.brightdata.com/zone" -H "Content-Type: application/json" -H "Authorization: Bearer API_TOKEN" -d "{\"zone\":\"ZONE\"}" Node.js #!/usr/bin/env node require('request-...
-
Get Zone passwords
API endpoint: GET /api/zone/passwords Sample Response: {"passwords":["psw1","psw2"]} Shell curl "https://api.brightdata.com/zone/passwords?zone=ZONE" -H "Authorization: Bearer API_TOKEN" Node.js #!/usr/bin/env node require('reque...
-
Get Zone permissions
API endpoint: GET /api/zone/permissions Sample Response: {"perms":["city","google"]} Shell curl "https://api.brightdata.com/zone/permissions?zone=ZONE" -H "Authorization: Bearer API_TOKEN" Node.js #!/usr/bin/env node require('req...
Others
-
Get current service status
API endpoint: GET /api/network_status/NETWORK_TYPENETWORK_TYPE - can be one of : all - All network type res - Residential dc - Datacenter mobile - Mobile Sample Response: {"status":true} Shell curl "https://api.brightdata.co...
-
Get country cities
API endpoint: GET /api/cities Parameter: country="COUNTRY_CODE" Sample Response:[{"c_id":"US","region":"Texas","r_id":"TX","country":"United States","name":"Cherokee"}] Shell curl "https://api.brightdata.com/cities?country=US" -H...
-
Get list of available cities of static network per country
API endpoint: GET /api/zone/static/cities Parameters: country [string] (required) - Country pool_ip_type [string] - Network type, optional values : dc - Datacenter (default) static_res - ISP Sample Response: ["us-chicago",...
Proxy Manager API
-
Apply specific configuration version of Cloud Proxy Manager
This article explains on how to apply a specific configuration version of Cloud Proxy Manager with an API command. API endpoint: PUT /lpm/apply_conf/ Query parameters: lpm_token - {TOKEN|CUSTOMER_NAME}, required Body parameters: i...
-
Get Cloud Proxy Manager Configuration versions
This article explains how to get Cloud Proxy Manager Configuration versions with an API command. API endpoint: GET /lpm/conf_states Query parameters: lpm_token - {TOKEN|CUSTOMER_NAME}, required limit - number of records, 0-100 Samp...
-
Get Proxy Manager version
API endpoint: GET /api/version Sample Response: {"version":"1.280.385","argv":""} Shell curl "http://127.0.0.1:22999/api/version" Node.js #!/usr/bin/env node require('request-promise')({ url: 'http://127.0.0.1:22999/api/version'...
-
Get latest Proxy Manager versions
API endpoint: GET /api/last_version Sample Response: {"version": "1.280.385","newer": false,"versions": [{"ver": "1.280.385","type": "stable","changes": [{"type": "star","text": "Add render option for unblocker and serp zones"}]}]}...
-
Get currently running NodeJS version
API endpoint: GET /api/node_version Sample Response: {"current":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"v12.16.1\n","major":12,"minor":16,"patch":1,"prerelease":[],"build":[],"version":"12.16.1"},"...
-
Generate token for token based authentication
API endpoint: GET /api/gen_token Sample Response: {"token":"RZD9vaQQaL6En7"} Shell curl "http://127.0.0.1:22999/api/gen_token" Node.js #!/usr/bin/env node require('request-promise')({ url: 'http://127.0.0.1:22999/api/gen_token' ...
Data Collector API
-
Getting started
The Data Collector product offers a JSON API to control and inspect your data collectors programmatically. Getting started: Signup (or login) to our control panel Insert target URL (website to collect data from) or choose a ready-...
-
Trigger a collector for batch collection method
API endpoint: POST /dca/trigger?collector={ID_COLLECTOR} Parameters : collector={ID_COLLECTOR} - A unique identification of collector version=dev - (Optional) Trigger the development version of the collector name={human_name} - ...
-
Receive batch data
API endpoint: GET /dca/dataset?id={id_dataset} Parameters : id={id_dataset} – An unique identification of data set. Payload : Header: Authorization Bearer Key -H "Authorization: Bearer API_TOKEN" Sample Response : Waitin...
-
Trigger a collector for real-time collection
API endpoint: POST /dca/trigger_immediate?collector={ID_COLLECTOR} Parameters : collector={ID_COLLECTOR} - A unique identification of collector version=dev - (Optional) Trigger the development version of the collector name={human...
-
Receive data from real-time work collector
API endpoint: GET /dca/get_result?response_id={ID_RESPONSE} Parameters : response_id={ID_RESPONSE} – An unique identification of response Payload : Header: Authorization Bearer Key -H "Authorization: Bearer API_TOKEN" Sam...
-
Choose a delivery type on request level
Instead of creating duplicate collectors for each delivery type, you can choose a delivery type per job using API. Step 1. Ensure that your collector is updated to the latest version to improve success rate. Step 2. Set a del...