Generate rotating user-agents and proxy IPs for scraping APIs
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes. It also calls useragentstring.com and cloudflare.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- user-agents (HTTP Request): calls useragentstring.com
- SET your proxy connection details here (Edit Fields (Set)): sets 3 fields: proxy_username, proxy_password, proxy_port
- Extract user-agent values (HTML): parses or builds HTML
- Merge: merges the data from its input branches
- Split Out: splits a list into separate items
- Check used IP/user-agent with cloudflare (HTTP Request): calls cloudflare.com (POST)
- Targeted API (HTTP Request): calls an HTTP API
- clean the return to line in user-agent (Edit Fields (Set)): sets 1 field: clean_user-agent
- IP address and user-agent used (Edit Fields (Set)): sets 2 fields: Ip_address, user-agent
- random sort (Sort): sorts the items
…plus 1 more step. See the full node list below.
HTTP calls to: useragentstring.com, cloudflare.com
Scraping pages by hand? Firecrawl is a simpler option (10% off for new users).
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Sort
n8n-nodes-base.sort - HTML
n8n-nodes-base.html - Split Out
n8n-nodes-base.splitOut - Manual Trigger
n8n-nodes-base.manualTrigger - Merge
n8n-nodes-base.merge - Limit
n8n-nodes-base.limit
From the author
✨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…