Skip to main content

Generate rotating user-agents and proxy IPs for scraping APIs

Workflow preview

Workflow preview
100%
Generate rotating user-agents and proxy IPs for scraping APIs preview
Open on n8n.io

1. Workflow Overview

What it does Useful for scraping only/API data. This workflow will give you the ability to bypass the IP address limitation control of some publicly available APIs by using a different couple of "...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.sort, n8n-nodes-base.html, n8n-nodes-base.splitout, n8n-nodes-base.manualtrigger, n8n-nodes-base.merge, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Adam ABDELMOUMNI.

Original n8n.io source

1.1 Workflow description

Title
Generate rotating user-agents and proxy IPs for scraping APIs
Workflow name
Generate rotating user-agents and proxy IPs for scraping APIs

✨What it does

Useful for scraping only/API data.

This workflow will give you the ability to bypass the IP address limitation control of some publicly available APIs by using a different couple of "user-agent" and "IP address" for each call to the targeted API.

You can therefore place this workflow before any HTTP request node.

1) Generate over 9000 different user-agents that can be used randomly (or not) into each one of you API call.

Example of user-agents it can provide with for Chrome web browser :

"Mozilla/5.0 (Windows NT 11.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.6998.166 Safari/537.36"

"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0"

"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"

It will simply send an HTTP GET request to https://www.useragentstring.com/pages/Browserlist/ and get all user-agent values available from over 100 web browsers (Chrome, Edge,Safari,Firefox etc).

2) Generate a dynamic IP address to be used as proxy to be used for each API call.

It uses decodo "residential" "rotating session" type : a different residential IP address is used for each API call.

After running the workflow you'll find different IP address/user-agent used in node IP address and user-agent used:

🛠️How to set it up ?

If you're using Decodo proxy server (or any other proxy service provider) you can use the Residential proxy with "session type" as "rotating" is your want to have one IP address per API call

1) The proxy connection details

Credentials usually work like this in any proxy service provider :

http://username:[email protected]:PORT

You just need to configure these credentials in your node SET your proxy connection details in the node SET your proxy connection details here`:

  • proxy_username
  • proxy_password
  • proxy_port

2) Number of user-agents needed

You can configure the number of different user-agents you want to use in the node Take X random user-agents

3) Call your targeted API

You just configure your HTTP node for the targeted API you want to call with these additional details in the node Targeted API :

  • add header name user-agent with value {{ $json["clean_user-agent"] }}
  • add option "proxy" with value http://{{ $json.proxy_username }}:{{ $json.proxy_password }}@gate.decodo.com:{{ $json.proxy_port }}

⚠️ Please note that some APIs may reject connections from a proxy server

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - user-agents

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 2 - clean the return to line in user-agent

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - random sort

Type / Role
n8n-nodes-base.sort - sort
Config choices
Version 1

Block 4 - Extract user-agent values

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 5 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - Check used IP/user-agent with cloudflare

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 7 - Manual trigger

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 8 - SET your proxy connection details here

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Take X random user-agents

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 15 - Targeted API

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 16 - IP address and user-agent used

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate rotating user-agents and proxy IPs for scraping APIs
Complexity advanced
Nodes 17
Categories Document Extraction
Author Adam ABDELMOUMNI
Published 23 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13637/13637.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate rotating user-agents and proxy IPs for scraping APIs do?

What it does Useful for scraping only/API data. This workflow will give you the ability to bypass the IP address limitation control of some publicly available APIs by using a different couple of "...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.