Bright Data offers two methods for accessing Web Unlocker API, both delivering identical results while catering to different customer workflows:

A simple and RESTful way to interact with Bright Data’s Web Unlocker API. Direct API access abstracts proxy management and allows you to send requests via a central endpoint, ensuring ease of use and straightforward REST API integration.

Best for:

  • Centralized endpoint: Access Web Unlocker API via a single, RESTful endpoint.

  • Streamlined direct integration: Eliminating the complexity of managing proxies or routing.

  • Single API key authentication: Secure and easy to use, replacing the need for username-password management.

Sending your first request

After setting up your Web Unlocker API zone, you’ll find a working Web Unlocker API request example and your API token within your zone’s Overview tab:

The following is an example of a simple Web Unlocker API cURL request:

Direct API access - cURL

curl -H "Content-Type: application/json" -H "Authorization: Bearer [INSERT_YOUR_API_TOKEN]" -d '{"zone": "[INSERT_YOUR_WEB_UNLOCKER_ZONE_NAME]","url": "[INSERT_YOUR_TARGET_URL]", "format": "raw"}' https://api.brightdata.com/request

Request breakdown

  1. API Endpoint: https://api.brightdata.com/request

  2. Authorization Header: Authorization: Bearer [INSERT YOUR API TOKEN] - Your API token is found within your Web Unlocker API zone.

  3. Payload:

    • zone: Your specific Web Unlocker API zone name.

    • url: The target URL you wish to access via Web Unlocker API.

    • format: Defines the response format. Use raw to receive the raw response from the target site.

Generating your Bright Data API token

A Bright Data API token is your secure authentication token for accessing Web Unlocker API via Direct API access. When adding a new Web Unlocker API zone in the control panel, an API token will be generated automatically and can be found within the Overview tab of your zone.

To generate a new API key:

  • Navigate to Account settings.

  • Scroll down and click the Add Token button.

  • Follow the on-screen instructions to complete the process.

We strongly recommend to have an expiration date set on your token for increased security.
The token will be shown to you on the screen only so make sure you copy and store it in a safe location per your organization’s policies

Native proxy-based access

In order to access Web Unlocker, you will need to provide credentials which are comprised of:

  1. Your customer ID

  2. Your Web Unlocker API zone name

  3. Your Web Unlocker API password

  4. Bright Data SSL certificate

Customer ID

Customer ID can be found in the welcome email you received, or by clicking your account initial letter on the top right screen of your control panel, or by clicking here: Account settings .

Zone name and password

You zone name and password can be found in the overview tab of your unlocker zone in the control panel.

Bright Data SSL Certificate

Prevent SSL errors by setting up Bright Data SSL certificate

SSL Certificate can be found by clicking “SSL certificate” wizard on your zone’s overview top menu. See further instructions here: SSL certificate.

Alternatively, you can ignore SSL errors.

Web Unlocker API: HTTPS Proxy code examples

Once you have your credentials, use the following code to send your first request: