Zyte

The Zyte API for scraping and extraction
View as Markdown

Proxies Zyte’s API — a single endpoint that takes a JSON body and returns the result:

POST /zyte → https://api.zyte.com/v1/extract

POST only. Every control travels in the JSON body ({url, httpResponseBody, browserHtml, screenshot, …}) and is forwarded unchanged.

What the gateway injects and strips

Zyte authenticates with HTTP Basic auth — the API key as the username with an empty password — reusing the Authorization header you use for your gateway token. So the gateway overwrites it with the injected credential:

  • The Authorization header is overwritten with the secret Zyte key (as a Basic credential). Your gateway token is consumed by the gateway and never reaches Zyte.
  • Zyte has no query-param spelling of the key, so nothing is dropped from the query string.

Example

$curl -X POST "$GATEWAY/zyte" \
> -H "Authorization: Bearer $TOKEN" \
> -H "Content-Type: application/json" \
> -d '{"url": "https://example.com", "httpResponseBody": true}'

The response is Zyte’s JSON, returned unchanged. For request and response fields, follow Zyte’s documentation — the gateway does not alter them.