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

# Oxylabs

Fronts the realtime (synchronous) endpoint of [Oxylabs](https://oxylabs.io)' Web Scraper API — one endpoint that holds the connection open until the scrape result exists:

```
POST /oxylabs   → https://realtime.oxylabs.io/v1/queries
```

Only `POST` is mounted. All controls — `{source, url, query, parse, render, …}` — go in the JSON body, which is relayed without modification.

## Credential handling

Oxylabs expects HTTP **Basic** auth derived from the account's **username and password**, 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 Oxylabs' secret Basic credential.** Your Oxylabs username and password never appear in your requests, and your gateway token stops at the gateway rather than traveling upstream.
* No query-param form of the credential exists on Oxylabs' side, so nothing gets removed from the query string.

## Example

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

Responses arrive as Oxylabs' JSON, untouched. Field-level request and response detail lives in [Oxylabs' documentation](https://developers.oxylabs.io/products/web-scraper-api); the gateway modifies neither.