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

# Scrapfly

Proxies [Scrapfly](https://scrapfly.io)'s Web Scraping API, injecting the secret `key` query parameter:

```
GET|POST|PUT|PATCH|HEAD /scrapfly   → https://api.scrapfly.io/scrape?key=<secret>&<your query>
```

All controls travel in the **query string** — the target `url` and any Scrapfly parameter (`render_js`, `asp`, `country`, `proxy_pool`, `format`, …). Your query string is passed through byte-for-byte.

Scrapfly uses the **request method** as the method it runs against the scraped URL, so `GET`, `POST`, `PUT`, `PATCH`, and `HEAD` are all forwarded. (`OPTIONS`, a CORS preflight, is not a scrape and is not accepted.)

## What the gateway injects and strips

* **`key` is injected first**, ahead of your parameters, so a partially-encoded target URL can't swallow it.
* **A client-supplied `key` query param is dropped** (in any encoding), so the injected key can't be overridden.
* **The `Authorization` header is stripped** before forwarding — Scrapfly has no use for your gateway token.

## Examples

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

```bash
curl "$GATEWAY/scrapfly?url=https://example.com&render_js=true&asp=true&country=us" \
  -H "Authorization: Bearer $TOKEN"
```

The response is Scrapfly's, returned unchanged. For the full parameter set, see [Scrapfly's documentation](https://scrapfly.io/docs/scrape-api/getting-started).