# Migrating from Bright Data Web Unlocker to Zyte API

Learn how to migrate from [Bright Data Web Unlocker](https://brightdata.com/products/web-unlocker) to [Zyte API](../../get-started.md#zyte-api).

## Feature comparison

The following table summarizes the feature differences between both products:

| Feature         | Zyte API                                                                                         | Web Unlocker   |
|-----------------|--------------------------------------------------------------------------------------------------|----------------|
| API             | [HTTP](../../usage/reference.md#zapi-reference) or [proxy](../../usage/proxy-mode.md#zapi-proxy) | Proxy          |
| Browser HTML    | [Yes](../../usage/browser.md#zapi-browser)                                                       | No             |
| Screenshots     | [Yes](../../usage/browser.md#zapi-screenshot)                                                    | No             |
| Browser actions | [Yes](../../usage/browser.md#zapi-actions)                                                       | No             |
| Network capture | [Yes](../../usage/browser.md#zapi-network-capture)                                               | No             |

## Proxy mode

Zyte API offers a [proxy mode](../../usage/proxy-mode.md#zapi-proxy), which makes it easier to
migrate from Bright Data Web Unlocker.

> [!NOTE]
> Before you decide whether to use the proxy mode or the [HTTP API](#unlocker-http), [learn their differences](../../usage/proxy-mode.md#zapi-proxy-diff).

To migrate, update your [proxy endpoint and authentication](../../usage/proxy-mode.md#zapi-proxy-endpoint), and [migrate your request parameters](#unlocker-params).

## HTTP API

When migrating from Bright Data Web Unlocker to the [HTTP API](../../usage/reference.md#zapi-reference) of Zyte API, the main challenge is switching from a proxy API
to an HTTP API. To read its rich output data, you need JSON parsing and
sometimes base64-decoding.

For example, to get the same output as the following Web Unlocker request:

```bash
curl \
    --proxy zproxy.lum-superproxy.io:22225 \
    --proxy-user lum-customer-YOUR_USER-zone-YOUR_ZONE:YOUR_PASSWORD \
    https://toscrape.com/
```

Use Zyte API as follows:

```bash
curl \
    --user YOUR_ZYTE_API_KEY: \
    --header 'Content-Type: application/json' \
    --compressed \
    --data '{"url": "https://toscrape.com", "httpResponseBody": true}' \
    https://api.zyte.com/v1/extract \
| jq --raw-output .httpResponseBody \
| base64 --decode
```

See [Zyte API usage documentation](../../usage/index.md#zapi-usage) for richer Zyte API examples, covering more scenarios
and features. See also [Parameter mapping](#unlocker-params) to migrate your request
parameters.

## Parameter mapping

If your Web Unlocker requests set the `country` parameter, migrate them as
follows:

### Proxy mode

Use the [Zyte-Geolocation](../../usage/proxy-mode.md#zyte-geolocation) request header.

For example, replace:

```bash
curl … --proxy-user lum-customer-YOUR_USER-zone-YOUR_ZONE-country-us:YOUR_PASSWORD …
```

With:

```bash
curl … -H Zyte-Geolocation:US …
```

### HTTP API

Use the [geolocation](https://docs.zyte.com/zyte-api/usage/reference.html#operation/extract/request/geolocation) request field.

For example, replace:

```bash
curl … --proxy-user lum-customer-YOUR_USER-zone-YOUR_ZONE-country-us:YOUR_PASSWORD …
```

With:

```bash
curl … --data '{…, "geolocation": "US", …}' …
```
