Using Singapore mobile proxies with Playwright in 2026
Using Singapore mobile proxies with Playwright in 2026
Run Playwright against Southeast Asian platforms at any real volume and you will hit the wall fast. Grab, Shopee, Lazada, and their payment and KYC vendors have all tightened bot detection over the past two years, and a lot of that tightening is IP-layer: they check whether the address resolving your request looks like it belongs to a consumer in the region, not a rack in Frankfurt or Virginia. The same goes for ad verification, app store rank tracking, and any SG government or banking portal that does geo-based access control. Adding a mobile proxy from a real Singapore carrier is not a workaround. It is the correct solution, because it makes your traffic look like what it actually is: a browser request coming from a phone in Singapore.
why Playwright hits walls without residential mobile IPs
The first problem is fingerprint mismatch. Playwright launches a real Chromium or Firefox instance, so the TLS handshake, the JS navigator properties, and the HTTP header order are all consistent with a real browser. Where things fall apart is at the network layer. Datacenter IPs sit in well-known ASN ranges that fraud and bot-detection services catalog continuously. Even rotating across a /24 of datacenter addresses does nothing, because the ASN lookup still comes back as a cloud provider. Any site using a commercial bot-management layer (Akamai Bot Manager, Cloudflare, DataDome, and others) will soft-block or fingerprint-escalate you within a handful of requests.
VPNs and shared residential pools from US or EU providers create a different class of problem for SEA-targeted work. The IP geolocation resolves to the wrong country, so geo-fenced content either fails to load or loads the wrong variant. Price localization, currency display, product availability, and regional promotional banners all key off IP geolocation. If you are scraping Shopee SG pricing or auditing a Grab ad campaign’s Singapore landing page, you need an IP that resolves to Singapore on every major geolocation database, not just one of them.
The third problem is carrier-class trust scoring. Platforms that serve mobile-first markets increasingly weight the ASN and carrier type of incoming requests. A Singtel or StarHub mobile IP carries a baseline trust score that no residential-pool VPN can replicate, because those IPs are assigned to real postpaid SIM cards. When Playwright is the automation layer and you are hitting platforms that do carrier lookups as part of their risk scoring, what is a mobile proxy matters more than most engineers expect when they first start this work.
setting up SMP credentials in Playwright
Singapore Mobile Proxy provides HTTP and SOCKS5 endpoints. The credential format is host:port:username:password. For Playwright, you pass the proxy configuration at the browser context level, not at the browser launch level, which gives you the flexibility to use different proxies across contexts in the same process.
Here is a complete working example using Playwright with Node.js and a SOCKS5 SMP endpoint:
import { chromium } from 'playwright';
const SMP_HOST = '103.x.x.x'; // your assigned SMP IP
const SMP_PORT = 10000; // your assigned port
const SMP_USER = 'your_username';
const SMP_PASS = 'your_password';
(async () => {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
proxy: {
server: `socks5://${SMP_HOST}:${SMP_PORT}`,
username: SMP_USER,
password: SMP_PASS,
},
// match the user-agent to a real Android Chrome on a SG carrier device
userAgent:
'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 ' +
'(KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36',
locale: 'en-SG',
timezoneId: 'Asia/Singapore',
geolocation: { longitude: 103.8198, latitude: 1.3521 },
permissions: ['geolocation'],
});
const page = await context.newPage();
await page.goto('https://ipinfo.io/json');
const body = await page.textContent('body');
console.log(body); // should show a SG mobile ASN
await browser.close();
})();
A few things to flag here. The server field takes a URI-style string, so prefix with socks5:// for SOCKS5 or http:// for HTTP. Playwright does not support passing auth inline in the URI for proxies (unlike curl), so always use the separate username and password fields. If you prefer HTTP over SOCKS5, see HTTP vs SOCKS5 mobile proxies for a rundown of when each protocol is the right choice. For most Playwright use cases, SOCKS5 is preferable because it proxies at the TCP layer and handles WebSocket connections cleanly, which matters when the page you are scraping uses real-time data feeds.
Set locale, timezoneId, and geolocation to Singapore values. This is not optional. If your IP geolocation resolves to Singapore but your browser reports Asia/Kolkata as its timezone, that combination is a strong signal to detection systems. Consistency across all the observable signals is the point.
rotating IPs per request or per session
The decision between rotating and sticky sessions is not about preference. It is about what the target workflow requires.
Sticky sessions maintain the same IP for the duration of a session window (typically 10 to 30 minutes depending on your SMP plan). Use sticky sessions when your workflow involves login, cart state, multi-step checkout flows, or any sequence where the platform tracks a session via IP plus cookie. If the IP changes mid-session, the platform may invalidate the session token, force re-authentication, or flag the account for suspicious activity.
Rotating endpoints assign a new IP on each new TCP connection or on a configurable interval. Use rotating endpoints for stateless scraping: price checks, SERP snapshots, public product catalog scrapes, and ad verification passes where each page load is independent.
SMP exposes separate hostnames or ports for rotating versus sticky modes. Do not treat them as interchangeable in your connection string. Here is a pattern for managing both modes in the same Playwright test suite:
type ProxyMode = 'rotating' | 'sticky';
function getSMPProxy(mode: ProxyMode) {
const base = {
username: process.env.SMP_USER!,
password: process.env.SMP_PASS!,
};
if (mode === 'sticky') {
return {
...base,
server: `socks5://${process.env.SMP_STICKY_HOST}:${process.env.SMP_STICKY_PORT}`,
};
}
return {
...base,
server: `socks5://${process.env.SMP_ROTATE_HOST}:${process.env.SMP_ROTATE_PORT}`,
};
}
// for a stateless price scrape
const rotatingContext = await browser.newContext({
proxy: getSMPProxy('rotating'),
});
// for a logged-in session test
const stickyContext = await browser.newContext({
proxy: getSMPProxy('sticky'),
});
Keep the credentials in environment variables. Committing them to source control is the most common mistake in teams that move fast. A .env file loaded via dotenv at startup is the minimum viable approach; a secrets manager is better for production deployments.
three real workflows where this combo wins
verifying Singapore ad campaigns end-to-end
Paid media buyers and ad ops teams use Playwright to automate ad verification: confirming that a campaign creative renders correctly for the target audience, that click-through destinations work, and that landing page variants are actually serving the right copy to Singapore users. This workflow fails entirely without a Singapore mobile IP. Google, Meta, and most DSPs use IP geolocation to determine which creative variant to serve. Auditing from a US datacenter IP means you see the US-market variant (if you see anything at all). A real SingTel or StarHub IP gets your Playwright session routed into the SG traffic bucket, and you see exactly what a Singapore mobile user sees. This is also why mobile proxies for SEO research relies on the same infrastructure: localized SERPs are gated by IP, not by language headers alone.
regression testing SG-only app features
Mobile app backends increasingly serve different feature sets by carrier and region. A SG fintech app might enable PayNow deep links only for users on local carriers. A super-app might gate a feature behind a carrier billing integration that only activates for Singtel subscribers. If your QA automation runs from a CI runner in AWS ap-southeast-1, your test traffic arrives with an AWS ASN, and the feature flag logic never triggers the SG-carrier-gated code path. Playwright plus a real SMP endpoint lets your CI suite exercise these paths against staging or production as a genuine SG mobile user would, catching regressions before they hit real users.
competitive price intelligence on SEA marketplaces
Shopee and Lazada both serve dynamic pricing that varies by user segment, device type, and IP geolocation. Price intelligence teams that scrape these platforms from generic residential pools get inconsistent results because the IP geolocation resolves inconsistently or triggers a different price bucket. SMP addresses on SingTel, StarHub, M1, or Vivifi resolve cleanly to Singapore mobile ASNs on every major IP database. Combined with Playwright’s ability to render full JavaScript and handle lazy-loaded price elements, you get a consistent data collection pipeline that accurately reflects the prices a Singapore mobile shopper actually sees. The session management also matters here: sticky sessions let you simulate a returning user, which can reveal loyalty pricing or repeat-visit discounts that are invisible to first-visit scrapes.
common pitfalls
user-agent and IP type mismatch. If your proxy resolves as a SG mobile carrier IP but your Playwright user-agent string is a desktop Chrome on Windows, that combination is unusual and detectable. Always pair a mobile user-agent with a mobile IP. The userAgent field in newContext is where you set this.
forgetting to set timezone and locale. A Singapore IP with a Europe/London timezone is a fingerprinting signal. Set timezoneId: 'Asia/Singapore' and locale: 'en-SG' on every context that uses an SMP proxy.
using rotating endpoints for stateful flows. If you log into an account and then the next page load gets a different IP, expect session invalidation or a security challenge. Map your workflow type to the right SMP endpoint mode before writing any scraping logic.
not handling proxy authentication errors gracefully. Playwright surfaces proxy auth failures as navigation errors, not as HTTP 407 responses you can inspect cleanly. Wrap your page.goto() calls in try/catch and check for net::ERR_TUNNEL_CONNECTION_FAILED or similar errors, which usually indicate a credential or connectivity problem with the proxy, not the target site.
ignoring bandwidth consumption on mobile proxies. Mobile proxy bandwidth costs more than datacenter bandwidth. Playwright by default loads all page resources including images, fonts, and third-party scripts. Use page.route() to intercept and abort requests for resource types you do not need, especially if you are doing price scraping where you only need the DOM, not the images.
running too many parallel contexts on one proxy endpoint. A single modem-backed IP supports a limited concurrency. Exceeding it degrades performance and can cause the modem to cycle. Check your SMP plan’s concurrency limits and design your Playwright worker pool accordingly.
when Singapore IPs specifically matter
The SEA market has enough distinct platforms with enough IP-based access control that “any residential IP” is not a substitute for a Singapore IP. SingPass, the Singapore government’s identity platform, gates access by IP origin. Banking apps from DBS, OCBC, and UOB enforce geo-restrictions at the network layer. Grab’s merchant and driver tools behave differently depending on whether you are connecting from inside Singapore. If your Playwright workflow touches any of these services, a US or EU residential IP is not merely less effective. It will be actively rejected or silently served a degraded version of the page.
Beyond hard geo-fencing, there is a softer but equally important reason: carrier trust scoring varies by region. A SingTel IP is a known, high-trust carrier for Singapore platforms. Its ASN is not associated with proxy abuse the way US residential pools sometimes are after years of high-volume commercial proxy traffic. Starting with a clean SG carrier ASN means your Playwright sessions begin with a neutral trust baseline rather than fighting against a reputation penalty that accumulated from other customers using the same pool. For teams doing long-running competitive intelligence or QA automation, that baseline trust difference compounds into meaningfully better success rates over time.
getting started
If you are ready to wire SMP into your Playwright setup, the Singapore Mobile Proxy plans page has current pricing for HTTP and SOCKS5 endpoints with both rotating and sticky session options. For teams new to the proxy layer in browser automation, the ethical mobile proxy use guide covers the compliance and terms-of-service considerations worth reading before you scale up. The integration itself is a one-file change to your existing Playwright context setup, and most teams have something running against real SG carrier IPs within an afternoon.