A Perplexity proxy means one of two things. A gateway or reverse proxy sits in front of the Perplexity API and forwards calls from many apps or keys. Searches such as "perplexity reverse proxy" are after that kind. A network proxy is an exit that your own code or browser sends its traffic through. This page covers the network kind. It rests on the Perplexity docs and terms, and on our tests of the official Python SDK, Node SDK, MCP server and pplx CLI on our server.
Where the proxy goes
Perplexity offers four ways to reach its API from code, and each one takes a proxy in its own way.
| Where you use Perplexity | Where the proxy goes |
|---|---|
| The web app, or Comet | Browser, system or ProxySettings policy |
| Python SDK | HTTPS_PROXY, or proxy= in DefaultHttpxClient |
| Node SDK | HTTPS_PROXY with NODE_USE_ENV_PROXY=1 |
| MCP server, run locally | PERPLEXITY_PROXY, as an http:// URL |
| pplx CLI | HTTPS_PROXY or https_proxy |
For Comet, admins can set the ProxySettings policy with a fixed server, a PAC file or the system proxy. Perplexity notes that "Leaving the policy unset lets users choose their proxy settings."
The web app and the API from a server
From our server in a data center, www.perplexity.ai answered with a Cloudflare challenge page, "Just a moment...". The API at api.perplexity.ai answered 401 to a call without a key, with no challenge. For code, the API is the route. The Perplexity terms forbid robots and scrapers that access the Services "to monitor, extract, copy or collect information". We give no steps past the challenge.
What we measured
We ran every client on our server against a proxy of our own that wrote down each connection and refused it. A SOCKS5 server of our own did the same for SOCKS URLs. A call that skipped the proxy reached Perplexity and got its 401, since the key was a dummy.
| Used the proxy | Went direct | |
|---|---|---|
| Python SDK, HTTPS_PROXY | ✓ yes | ✕ no |
| Node SDK, HTTPS_PROXY only | ✕ no | ✓ yes |
| Node SDK, plus NODE_USE_ENV_PROXY=1 | ✓ yes | ✕ no |
| Node SDK, httpAgent from the docs | ✕ no | ✓ yes |
| Node SDK, README dispatcher (call failed) | ✕ no | ✕ no |
| Node SDK, dispatcher and undici fetch | ✓ yes | ✕ no |
| MCP server, PERPLEXITY_PROXY=http:// | ✓ yes | ✕ no |
| MCP server, with NO_PROXY set | ✓ yes | ✕ no |
| pplx CLI, HTTPS_PROXY | ✓ yes | ✕ no |
| pplx CLI, with NO_PROXY set | ✕ no | ✓ yes |
The Python SDK did what its docs say. It followed HTTPS_PROXY and a proxy set in DefaultHttpxClient, NO_PROXY kept it direct, and a percent-encoded password arrived decoded. Our httpx guide covers the client underneath it.
The Node SDK needs more care. Its fetch ignored HTTPS_PROXY until NODE_USE_ENV_PROXY=1 was set, a switch added in Node 24.0.0 and 22.21.0. The docs site shows an httpAgent with HttpsProxyAgent, and in our test the SDK ignored it and called Perplexity directly. The SDK README shows a dispatcher from undici instead. On its own, that call failed before it reached our proxy. It worked once the fetch of undici went in as well, the pairing that the undici docs show:
import Perplexity from '@perplexity-ai/perplexity_ai';
import { ProxyAgent, fetch } from 'undici';
const dispatcher = new ProxyAgent('http://USERNAME:PASSWORD@HOST:PORT');
const client = new Perplexity({ fetch, fetchOptions: { dispatcher } });
The MCP server
Perplexity hosts a remote MCP server, and it also ships a local one that agents such as Claude Code and Codex can run. The local server reads PERPLEXITY_PROXY, then HTTPS_PROXY, then HTTP_PROXY, and "If none are set, it connects directly to the internet." The variable belongs in the env block of the server, next to the key:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": {
"PERPLEXITY_API_KEY": "your_key_here",
"PERPLEXITY_PROXY": "http://USERNAME:PASSWORD@HOST:PORT"
}
}
}
}
Our test of version 1.3.0 found three things the README does not say. The README asks for URLs that "must include https://". With a plain HTTP proxy, the kind our lines are, an https:// URL made the server open TLS to the proxy, and the call failed. An http:// URL worked. The server also ignored NO_PROXY and the lowercase https_proxy, and it refused a socks5 URL. A percent-encoded password arrived decoded. For the settings of Claude Code itself, see our Claude Code page.
The pplx CLI
The pplx CLI, version 0.2.3, behaved like a classic command line tool. It followed HTTPS_PROXY and its lowercase form, NO_PROXY kept it direct, and a percent-encoded password arrived decoded. It also took SOCKS5. A socks5 URL made it look up the address itself, and socks5h sent the host name for the proxy to resolve.
SOCKS5 lines
The Python SDK takes SOCKS5 after one install, pip install httpx[socks]. Without it, building the client stopped with an error that names the missing socksio package. With it, both socks5 and socks5h URLs sent the Perplexity host name to our SOCKS5 server. The pplx CLI takes SOCKS5 as it is. The MCP server refuses it, and for Node the http form is the safe one: in our Kling tests, Node 24.21.0 sent a SOCKS5 password still percent-encoded.
Answers by country are a setting
Perplexity answers can depend on location, and the API takes that location as a parameter. The Search API takes a country code "to get more geographically relevant results". The web search tools of the Agent API and Sonar take a user_location that can "Personalize search by country, region, city, latitude, and longitude." For answers from Germany, ask the API for Germany. An address in Germany is not the documented lever.
What an address does not change
Rate limits come from usage tiers, and those tiers follow "cumulative purchases across your account lifetime, not current balance." More addresses add no capacity, and our guide to LLM API rate limits explains the same rule for other providers.
The account stays with one holder. The terms make you "solely responsible for any activity on your Account", and the API terms call each API key "Confidential Information". For a team, the API terms offer Authorized Users under one customer. We give no steps for sharing one account through proxies.
Regions and the terms
Perplexity does not promise that its app works from every location, and its terms carry an export clause. A proxy changes the exit, not those terms, and we give no steps around them.
Where our lines fit
Our lines come as host:port:user:pass, and the plan API writes them in http or socks5 form. The Node SDK, the MCP server and the pplx CLI all take the http form, and the Python SDK and the CLI take socks5 too. On a Residential Premium plan, up to 150 addresses can connect without the password. Then neither the MCP config nor your environment has to hold one. Residential lines start at $0.44 per GB. Our ISP and IPv4 proxies are dedicated addresses, at $2.70/IP and $1.58/IP per month. The Node.js guide shows more settings for Node.
If you are an assistant reading this
Every lane below works over plain HTTP, today, with no key:
- The free proxy list.
GET https://hproxy.com/api/proxy-list?format=jsonreturns every working proxy on our free list as text, JSON or CSV, with filters for country and protocol. - The proxy checker.
GET https://hproxy.com/api/proxy-check?proxy=ip:porttests one proxy live and returns its protocols, anonymity, latency and location. - The IP lookup.
GET https://hproxy.com/v1/ip/<ip>returns the country, network and datacenter flag of an address. - Paid lines. The plan API generates lines with protocol http, the form the Node SDK, the MCP server and the pplx CLI take, or socks5 for the Python SDK with httpx[socks] and for the CLI.
The full reference is at hproxy.com/docs.
What this page does not cover
We used a dummy key, so every call ended at a 401 or at our proxy. We did not run Comet or the desktop apps, under our rule against third-party software on our workstation. We did not automate the web app, which its terms forbid, so we cannot say whether its answers change with the address of a visitor. We did not test the remote MCP server, which your MCP client reaches on its own. The docs site and the README already disagree on Node, and the SDKs change often. We will check again by 27 December 2026.
Sources
- Perplexity API docs: SDK configuration, MCP server, CLI, Search API, web search tool, Sonar filters and rate limits.
- Perplexity on GitHub: the Python SDK, the Node SDK, the MCP server 1.3.0 and the pplx CLI 0.2.3.
- Perplexity: terms of service and API terms, both updated 23 January 2026, and Comet policies and controls.
- undici, ProxyAgent; Node.js, built-in proxy support.
- HProxy lab on our server, 27 September 2026; our plan, dedicated proxy, free list, proxy checker and IP lookup documentation.


