An active CleanProxies plan
Static ISP proxies for fixed US IPs, or rotating residential / mobile proxies for pools. The $4.99 trial works too.
Add a proxy object to the request or instance config: { protocol: "http", host: "HOST", port: PORT, auth: { username: "USERNAME", password: "PASSWORD" } }. From axios 1.16.1, https:// URLs go through a CONNECT tunnel automatically; for SOCKS5, set proxy: false and pass a socks-proxy-agent as httpAgent and httpsAgent.
Axios powers a lot of Node.js scrapers, API integrations and backend jobs. Its proxy option only works in Node.js (browsers ignore it), it also reads http_proxy and https_proxy from the environment, and its handling of https:// targets changed in 1.16.1, so the version you run decides which setup is right.
Static ISP proxies for fixed US IPs, or rotating residential / mobile proxies for pools. The $4.99 trial works too.
From the dashboard's proxy manager: host (or IP), port, username and password. Convert lists with the proxy list formatter.
npm install axios (1.16.1 or later for the built-in HTTPS tunnel; run npm ls axios to check).npm install socks-proxy-agent.Both products use the same setup in Axios. What changes is how long an IP stays with you.
An ISP line is one dedicated US IP that stays yours all month, so an axios instance bound to one line always calls from the same address. Keep one instance per account or API key, and use the interceptor only for bulk work where any of your IPs will do.
Dedicated static IPs registered to US and Canadian ISPs. The address stays the same for as long as you hold it, with unlimited bandwidth and HTTP(S) or SOCKS5 access.
A rotating line gives each new connection a fresh residential IP from the 50M+ pool, so consecutive calls usually leave from different addresses. Use a sticky line (5 to 60 minutes or 24 hours) for logins and multi-step flows that must keep one IP.
Residential IPs in 190+ countries with country, state and city targeting. Rotate on every request or hold a sticky session for up to 90 minutes; GB never expire.
Every product connects over HTTP(S); static ISP and ISP subnet proxies also run SOCKS5 and IP whitelisting. This is what the dashboard gives you to paste into Axios.
IP:PORT:USER:PASSOne line per dedicated IP. With IP whitelisting on, the line is just IP:PORT and no password is sent.
HOST:PORT:USER:PASSGenerated in the proxy manager. The username carries the location and session you pick, so generate a new list to change them.
http://USERNAME:PASSWORD@HOST:PORTsocks5://USERNAME:PASSWORD@HOST:PORTUse http:// even for HTTPS websites; the TLS session still runs end to end. The socks5:// form is for static ISP and ISP subnet proxies.
Four steps, then check the exit IP with the free proxy checker.
Run npm ls axios. On anything older than 1.16.1, run npm install axios@latest before you send HTTPS traffic through a proxy.
Split your dashboard line into host, port, and auth.username / auth.password. Keep protocol: "http".
Pass it to axios.create({ proxy }) so every request from that instance uses the same proxy.
Request https://api.ipify.org?format=json and log data.ip.
Replace the highlighted placeholders with the values from your dashboard. Pick an example to see its code.
import axios from "axios";
const client = axios.create({
proxy: {
protocol: "http",
host: "HOST",
port: PORT,
auth: { username: "USERNAME", password: "PASSWORD" },
},
timeout: 30_000,
});
const { data } = await client.get("https://api.ipify.org?format=json");
console.log("Exit IP:", data.ip);export http_proxy="http://USERNAME:PASSWORD@HOST:PORT"
export https_proxy="http://USERNAME:PASSWORD@HOST:PORT"
export no_proxy="localhost,127.0.0.1"
# axios uses these when a request has no proxy option
node axios-proxy.mjsproxy: false turns proxying off for a request or instance, environment variables included. Keep protocol: "http": https there means TLS to the proxy itself, not to the website. The proxy option belongs to the Node.js http adapter, so it's ignored if you switch to adapter: "fetch".Export your ISP list as IP:PORT:USERNAME:PASSWORD lines into proxies.txt. The interceptor sets a different config.proxy on each request; the object form needs no URL-encoding, so passwords with @ or : work as they are.
import axios from "axios";
import { readFileSync } from "node:fs";
const proxies = readFileSync("proxies.txt", "utf8").split("\n").filter(Boolean).map((line) => {
const [host, port, username, ...rest] = line.trim().split(":");
return { protocol: "http", host, port: Number(port), auth: { username, password: rest.join(":") } };
});
let next = 0;
const client = axios.create({ timeout: 30_000 });
client.interceptors.request.use((config) => {
config.proxy = proxies[next++ % proxies.length];
return config;
});
for (let i = 0; i < 5; i++) {
const { data } = await client.get("https://api.ipify.org");
console.log(data);
}Axios has no SOCKS client of its own. Hand it an agent and set proxy: false so the proxy option and the environment variables don't take over. SOCKS5 is available on static ISP and ISP subnet proxies: switch it on for the proxy list in your dashboard and keep the same username and password.
import axios from "axios";
import { SocksProxyAgent } from "socks-proxy-agent";
const agent = new SocksProxyAgent("socks5h://USERNAME:PASSWORD@HOST:PORT");
const client = axios.create({ httpAgent: agent, httpsAgent: agent, proxy: false });
const { data } = await client.get("https://api.ipify.org");
console.log(data);HttpsProxyAgent from https-proxy-agent and an http://USERNAME:PASSWORD@HOST:PORT URL; axios leaves tunnelling to an agent you supply.The first example logs the exit IP: it should match your ISP line, or be a residential IP in the location you generated. Request https://httpbin.org/headers through the same instance to see the headers the website receives.
Open What is my IP? through the proxy to see the address and headers a website receives, or paste up to ten lines into the free proxy checker to test connectivity, latency and exit IP.
Still stuck? Our 24/7 support team answers fast: contact us with the error and the line you used (leave the password out).
auth, or a password with special characters inside a proxy URL in an environment variable.Copy the line again and use the auth object; in URLs, percent-encode @ as %40 and : as %3A.protocol: "https" pointed at an HTTP proxy port.Set protocol: "http". The website connection is still TLS end to end inside the tunnel.proxy option only exists in Node.js; browsers use the system or extension proxy.Run the request from Node.js (or your backend), or set the proxy in the browser itself.proxy: false is missing, so an https_proxy variable or the proxy option is used instead of the agent.Pass proxy: false together with httpAgent and httpsAgent.https-proxy-agent with proxy: false.Setup guides and best practices from the CleanProxies blog.
Setup guides for tools people run next to Axios.
undici ProxyAgent for fetch, NODE_USE_ENV_PROXY, axios proxy config and SOCKS5 agents.
Setup guideProxyConfiguration, one proxy per session, sticky residential lists and tiered ISP-to-residential fallback.
Setup guide--proxy-server with page.authenticate, per-context proxies, SOCKS5 limits and leak fixes.
Setup guideThe -x flag, separate credentials, socks5h for remote DNS, env vars and a loop to test a whole list.
Setup guideStraight answers about running CleanProxies in Axios.
Yes, in Node.js. Set the proxy option with protocol, host, port and auth, or export http_proxy and https_proxy. In the browser, axios can't choose a proxy; the browser's own settings apply.