Docs/Quickstart/Node
Node — Playwright
Give browser automation a stable network identity. Playwright speaks to the AixIps gateway as a standard HTTP proxy — the sticky session parameter keeps every page of a task on the same exit IP.
1Prerequisites
Node.js 18+ and an AixIps API key from the console. Snippets use the placeholder sk_test_xxx.
2Install
Install Playwright and a Chromium build.
npm install playwright
npx playwright install chromium3Configure the proxy
The session-task42 parameter pins all connections from this browser to one sticky exit for the duration of the task — essential for logins and multi-page flows. type-session tells the router to prefer stable residential exits.
import { chromium } from "playwright";
const API_KEY = "sk_test_xxx";
// Username carries your key and routing params:
// user-{key}[-country-{cc}][-session-{sid}][-type-{intent}][-tag-{agent_tag}]
const browser = await chromium.launch({
proxy: {
server: "http://gw.aixproxy.com:7777",
username: `user-${API_KEY}-country-jp-session-task42-type-session-tag-browser`,
password: "proxy",
},
});4Make your first request
Navigate to an IP echo service. The reported origin should be a Japanese residential IP.
const page = await browser.newPage();
await page.goto("https://httpbin.org/ip");
console.log(await page.textContent("body"));
// {"origin": "203.0.113.42"} <- JP exit, not your machine
await browser.close();5Verify
Reload the page a few times: with a sticky session the origin IP stays the same. Drop the session parameter and it rotates per connection. The traffic appears in the console under Usage, attributed to the browser tag.
session-p_yourPersonaId and the gateway routes to the Persona's dedicated exit.