Integration

Use Shifter with Postman

Postman has first-class proxy support — set Shifter once at the global level and every collection runs through residential IPs. Or scope it per-environment for production / staging separation.

Quick Start

Install

// Postman desktop > Settings > Proxy. No install required.

Basic Usage

// Postman desktop > Settings > Proxy:
//
//   ☑ Use custom proxy configuration
//   Proxy Type:           HTTP and HTTPS
//   Proxy Server:         p.shifter.io
//   Proxy Port:           443
//   ☑ This proxy requires authentication
//   Proxy Auth Username:  customer-USERNAME-country-us-sid-123ABC
//   Proxy Auth Password:  PASSWORD
//
// Every request you send (and every collection run) now routes
// through Shifter's residential pool.

Features

Native proxy support in Postman desktop — Settings > Proxy, no extensions needed
Newman CLI honors HTTP_PROXY / HTTPS_PROXY env vars for headless CI runs
Pre-request scripts can mint sticky sessions per run, parameterize country, and stamp headers per request
Geo-targeting in 195+ countries via per-environment country variables
Compatible with Postman Cloud Agent via the Web Scraping API + sendRequest pattern
Supports HTTP, HTTPS, and SOCKS5 protocols on the same Shifter gateway

Examples

Pre-Request Script — Dynamic Sticky Session per Run

Generate a fresh sid at the start of every collection run and inject it into the proxy username. Each run gets a clean residential IP; requests within a run share that IP.

// Collection-level Pre-request Script
//
// Runs once at the start of each collection / Newman run.

const sid = pm.variables.replaceIn("{{$randomAlphaNumeric}}").repeat(2).slice(0, 8);

pm.environment.set("shifter_sid", sid);

// Construct the Shifter username with country + sid + ttl
const country = pm.environment.get("country") || "us";
const user    = pm.environment.get("shifter_user");
const pass    = pm.environment.get("shifter_pass");

const proxyUser = `${user}-country-${country}-sid-${sid}-ttl-300`;
pm.environment.set("proxy_auth_basic",
  "Basic " + Buffer.from(`${proxyUser}:${pass}`).toString("base64"));

console.log("Shifter session:", sid, "country:", country);

// Every request in this run can now reference {{proxy_auth_basic}}
// in its Proxy-Authorization header (when using Postman's "Send via
// proxy" override on individual requests).

Newman CLI — Scripted Collection Runs

Newman is Postman's CLI. Inject Shifter as an environment variable so CI / cron-driven test runs use residential IPs without changing the collection.

# Set Shifter as the system proxy for the Newman process
# (Newman picks up HTTP_PROXY / HTTPS_PROXY env vars automatically)

export HTTP_PROXY="customer-USERNAME-country-us-sid-ci-123ABC:PASSWORD@p.shifter.io:443"
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY="localhost,127.0.0.1"

newman run my-collection.postman_collection.json \
  --environment production.postman_environment.json \
  --reporters cli,json \
  --reporter-json-export results.json

# Or scope per-run with a one-liner:
HTTP_PROXY="http://USER:PASS@p.shifter.io:443" \
HTTPS_PROXY="http://USER:PASS@p.shifter.io:443" \
  newman run my-collection.postman_collection.json

# In a GitHub Actions step:
- name: Run Postman tests via Shifter
  env:
    HTTP_PROXY:  http://${{ secrets.SHIFTER_USER }}:${{ secrets.SHIFTER_PASS }}@p.shifter.io:443
    HTTPS_PROXY: http://${{ secrets.SHIFTER_USER }}:${{ secrets.SHIFTER_PASS }}@p.shifter.io:443
  run: newman run collection.json --environment env.json

Per-Environment Proxy (Prod / Staging)

Different countries per environment, all in one collection. Switch environments and Postman uses the matching Shifter residential pool — no other config changes.

// Environment: "Production-US"
{
  "values": [
    { "key": "shifter_user", "value": "customer-USERNAME", "type": "secret" },
    { "key": "shifter_pass", "value": "PASSWORD",          "type": "secret" },
    { "key": "country",      "value": "us" },
    { "key": "base_url",     "value": "https://example.com" }
  ]
}

// Environment: "Production-UK"
{
  "values": [
    { "key": "shifter_user", "value": "customer-USERNAME", "type": "secret" },
    { "key": "shifter_pass", "value": "PASSWORD",          "type": "secret" },
    { "key": "country",      "value": "uk" },
    { "key": "base_url",     "value": "https://example.co.uk" }
  ]
}

// Collection-level Pre-request Script (same script in both environments):
const proxy = {
  host:     "p.shifter.io",
  port:     443,
  username: `${pm.environment.get("shifter_user")}-country-${pm.environment.get("country")}-sid-${pm.collectionVariables.get("run_id")}`,
  password: pm.environment.get("shifter_pass"),
};

pm.environment.set("proxy_url", `http://${proxy.username}:${proxy.password}@${proxy.host}:${proxy.port}`);

console.log(`Routing through Shifter ${pm.environment.get("country")}`);

Postman Cloud Agent (no local install)

Postman Cloud Agent runs collections from Postman's infrastructure — it doesn't honor desktop proxy settings. Workaround: route every outbound request through the Shifter Web Scraping API using a Pre-request Script + pm.sendRequest.

// Cloud Agent doesn't apply your desktop proxy settings,
// so wrap every outbound request in a call to the Shifter
// Web Scraping API from a Pre-request Script.

const targetUrl = pm.request.url.toString();
const country   = pm.environment.get("country") || "us";
const apiKey    = pm.environment.get("shifter_api_key");

const params = new URLSearchParams({
  api_key: apiKey,
  url:     targetUrl,
  country: country,
  render_js: "1",            // headless browser rendering
});

pm.sendRequest({
  url:    `https://scrape.shifter.io/v1?${params.toString()}`,
  method: "GET",
}, function (err, res) {
  if (err) { console.error(err); return; }
  pm.environment.set("forwarded_body",   res.text());
  pm.environment.set("forwarded_status", res.code);
});

// Tests assert against {{forwarded_body}} instead of the raw
// response — same shape as a real proxy hop, served from
// Shifter's residential pool.
FAQ

Frequently asked FAQ questions

Common questions about using Shifter with Postman.

Settings > Proxy > 'Use custom proxy configuration'. Enter `p.shifter.io` as host, `443` as port, tick 'requires authentication', and provide your Shifter username (with country / sid selectors) and password. Every request you send routes through Shifter from that moment on.

Get started

Start Using Shifter with Postman

Test, scrape, and monitor APIs through Shifter's 205M+ residential and ISP proxies. Native proxy support in Postman desktop, Newman CI integration, and per-environment country switching.

Try Shifter for FreeSet up in minutes. Cancel anytime.