Zyte API usage documentation

Initial setup

How would you prefer to use Zyte API?

Scrapy

Use scrapy-zyte-api (tutorial).

Python

Use python-zyte-api.

HTTP clients

POST to https://api.zyte.com/v1/extract with your Zyte API key and parameters:

curl \
    --user YOUR_ZYTE_API_KEY: \
    --header 'Content-Type: application/json' \
    --data '{"url": "https://toscrape.com", "httpResponseBody": true}' \
    --compressed \
    https://api.zyte.com/v1/extract
Proxy mode

Use https://api.zyte.com:8011 as your proxy endpoint, with your Zyte API key and proxy headers:

curl \
    --proxy api.zyte.com:8011 \
    --proxy-user YOUR_ZYTE_API_KEY: \
    --compressed \
    https://toscrape.com

Tip

Learn about the different features of the HTTP API and the proxy mode before you choose one.

Tip

Got an SSL error? Install our CA certificate.

Basic usage

What do you want to do with Zyte API?

HTTP requests

Send low-level HTTP requests, with custom method, headers and body, opt-out redirection following, device emulation, and more.

HTTP

Zyte API HTTP requests
Browser automation

Get browser-rendered HTML, take screenshots, interact with pages, capture background requests, and more.

Browser

Zyte API browser automation
Automatic extraction

Get structured data from single pages or entire websites, and enrich it with custom LLM prompts.

Extraction

Zyte API automatic extraction

Additional features

Customize your Zyte API requests further to get what you want:

Geolocation

Choose a location of origin for your request.

Geolocation
IP type

Choose the type of IP address used by your request.

IP type
Cookies

Get and set cookies to reproduce requests and maintain sessions.

Cookies
Sessions

Use the same IP address, cookie jar, network stack, etc. on multiple requests.

Sessions

Advanced topics

Proxy mode

Use Zyte API as a proxy.

Zyte API proxy mode
Rate limits

Requests-over-time and concurrency limits.

Zyte API rate limits
Optimization

Make the most out of Zyte API.

Optimizing Zyte API usage
Error handling

Error response handling.

Zyte API error handling
API reference

Complete API reference documentation.

Zyte API reference documentation
Stats API

Check your Zyte API usage details.

Zyte API stats API