Skip to content

Instantly share code, notes, and snippets.

@quantumproxies
Created August 21, 2026 12:42
Show Gist options
  • Select an option

  • Save quantumproxies/322dc99fbe23274dfaa5f3849a3eb3e3 to your computer and use it in GitHub Desktop.

Select an option

Save quantumproxies/322dc99fbe23274dfaa5f3849a3eb3e3 to your computer and use it in GitHub Desktop.
Using a proxy inside n8n — where the setting actually lives, and the sticky-session trap https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/

Proxies in n8n

Where the setting lives, what breaks, and the two patterns worth copying.

Gateways and the username syntax: QuanticData proxies · guide: how to use a proxy in n8n

1. HTTP Request node

The proxy setting is not in the main tab. Open the node → OptionsAdd OptionProxy, then paste a full URL with the credentials in it:

http://USER-country-us:PASS@pr.quanticdata.io:7777

Targeting goes in the username, not in a header:

Username Effect
USER-country-us rotating US exit — a new IP per request
USER-country-de-city-berlin city-level targeting
USER-country-gb-session-{{$json.runId}}-sessTime-30 one IP for this whole run

2. The trap: rotation inside a loop

An n8n loop makes one request per item. Without a session token every item exits from a different IP — which is correct for scraping and wrong for anything stateful. If your workflow logs in, adds to a cart, or walks a paginated session, pin the session per run:

USER-country-us-session-{{ $execution.id }}-sessTime-30

$execution.id is stable for the whole run and different between runs, which is exactly the property a session token needs.

3. Cheaper alternative: skip the proxy layer

If the goal is "get me this page's content", the Web Scraping API is one HTTP Request node with no proxy configuration at all — rendering, retries and exit selection happen server-side and you are billed only for successes:

  • Method POST · URL https://api.quanticdata.io/v1/scrape
  • Header Authorization: Bearer qd_live_your_key
  • Body (JSON)
{ "url": "={{ $json.url }}", "format": "markdown", "contentMode": "article", "country": "us" }

The Markdown comes back at payload.markdown, the cost at payload.usage.cost_usd. See n8n-scrape-node.json in this gist for a node you can paste straight into a canvas.

4. Debugging

  • 407 — credentials wrong, or the plan does not cover that gateway.
  • Same IP every time — a -session- token left in the username.
  • Wrong country — the code must be ISO 3166-1 alpha-2: gb, not uk.
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://api.quanticdata.io/v1/scrape",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "Authorization", "value": "Bearer qd_live_your_key_here" },
{ "name": "Content-Type", "value": "application/json" }
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify({ url: $json.url, format: \"markdown\", contentMode: \"article\", country: \"us\" }) }}",
"options": {}
},
"name": "QuanticData scrape",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [640, 300]
}
],
"connections": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment