> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nativeport.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nativeport.ai/_mcp/server.

# Zyte

Fronts the API of [Zyte](https://www.zyte.com): one endpoint that accepts a JSON body and answers with the result:

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

Only `POST` is mounted. All controls — `{url, httpResponseBody, browserHtml, screenshot, …}` — go in the JSON body, which is relayed without modification.

## Credential handling

Zyte expects HTTP **Basic** auth, with the API key serving as username and the password left empty, on the same `Authorization` header your gateway token rides in. The gateway therefore **replaces** that header with the credential it injects:

* **`Authorization` is overwritten with Zyte's secret key encoded as a Basic credential.** Your gateway token stops at the gateway and never travels upstream.
* No query-param form of the key exists on Zyte's side, so nothing gets removed from the query string.

## Example

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

Responses arrive as Zyte's JSON, untouched. Field-level request and response detail lives in [Zyte's documentation](https://docs.zyte.com/zyte-api/usage/reference.html); the gateway modifies neither.