> 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.

# ZenRows

Fronts the Universal Scraper API of [ZenRows](https://www.zenrows.com); the gateway fills in the secret `apikey` parameter on the query string:

```
GET|POST /zenrows   → https://api.zenrows.com/v1/?apikey=<secret>&<your query>
```

* A `GET` fetches the target URL.
* A `POST` is passed on to the target as a POST.

Everything is driven by the **query string**: the target `url` plus any ZenRows parameter (`premium_proxy`, `js_render`, `css_extractor`, `autoparse`, …). What you put there reaches ZenRows exactly as written.

## Credential handling

* **`apikey` goes in ahead of everything you send**, so it can't be swallowed by a target URL with incomplete encoding.
* **An `apikey` supplied by the client in the query is discarded** (any encoding), so nothing can displace the injected key.
* **`Authorization` is dropped** before the request goes upstream — your gateway token is meaningless to ZenRows.

## Examples

#### Basic scrape

```bash
curl "$GATEWAY/zenrows?url=https://example.com" \
  -H "Authorization: Bearer $TOKEN"
```

#### JS render + premium proxy

```bash
curl "$GATEWAY/zenrows?url=https://example.com&js_render=true&premium_proxy=true" \
  -H "Authorization: Bearer $TOKEN"
```

ZenRows' response comes back untouched. Every supported parameter is listed in [ZenRows' documentation](https://docs.zenrows.com).