# Residential routing (/concepts/residential-routing)

Residential routing requires a platform proxy selection and may include geographic intent with the top-level `geo_country` field. Pair it with `residential_browser` when the target also needs browser execution. `mode` selects the execution route; `proxy` selects the egress: `random` (platform proxies), `off` (direct), or `own` (only your [own nodes](/concepts/own-nodes)). Legacy `javascript`/legacy mode inputs remain accepted for compatibility, but new integrations should use explicit route modes.

```json
{
  "url": "https://example.com",
  "mode": "residential",
  "proxy": "random",
  "geo_country": "US"
}
```

Check the returned route and billing metadata when your workflow depends on geography. Residential availability, pricing, and exact geo coverage are deployment data.

## Execution mode and network class [#execution-mode-and-network-class]

`mode` selects how the target is fetched; `proxy_type` explicitly selects the proxy network class: `datacenter`, `residential`, or `premium`. These are separate controls. A browser request does not automatically opt into premium routing, and `auto` never selects premium on its own.

```json
{
  "url": "https://example.com",
  "mode": "auto",
  "proxy": "random",
  "proxy_type": "premium",
  "max_credits_per_request": 100
}
```

Premium requires a configured plan price and an available connection. An unavailable class returns `503 PROXY_CLASS_UNAVAILABLE`; premium cannot be combined with `proxy: "off"` or `proxy: "own"`. The example's 100-credit cap is an application-selected budget, not a price quote. See [Billing](/concepts/billing) for what the cap includes.