On this page
ScrapeOps Proxy API in n8n
The Proxy API is ScrapeOps' flagship service that provides intelligent proxy aggregation for reliable web scraping. This API automatically rotates through multiple proxy providers to ensure successful requests.
For complete Proxy API documentation, see the Proxy API Aggregator docs.
Basic Configuration
Setting Up a Proxy API Request
- Add a ScrapeOps node to your workflow
- Select Proxy API as the API type
- Configure the basic parameters:
| Parameter | Required | Description |
|---|---|---|
| URL | Yes | The target URL to scrape |
| Method | Yes | HTTP method (GET or POST) |
| Return Type | No | Response format (default or JSON) |
Simple Example
Here's a basic configuration to scrape a webpage:
API Type: Proxy APIURL: https://example.comMethod: GETReturn Type: DefaultAdvanced Options
The Proxy API offers extensive customization through advanced options. All options are configured in the n8n node's Advanced Options section:
Complete Advanced Options Reference
| Option | Type | Description | Default | Example Values |
|---|---|---|---|---|
| Follow Redirects | Boolean | Follow HTTP redirects | true | true, false |
| Keep Headers | Boolean | Use your custom headers | false | true, false |
| Initial Status Code | Boolean | Return initial status code | false | true, false |
| Final Status Code | Boolean | Return final status code | false | true, false |
| Optimize Request | Boolean | Auto-optimize settings | false | true, false |
| Max Request Cost | Number | Max credits to use (with optimize) | 0 | 10, 50, 100 |
| Render JavaScript | Boolean | Enable headless browser | false | true, false |
| Wait Time | Number | Wait before capture (ms) | 0 | 3000, 5000 |
| Wait For | String | CSS selector to wait for | - | .product-title, #content |
| Scroll | Number | Scroll pixels before capture | 0 | 1000, 2000 |
| Screenshot | Boolean | Return base64 screenshot | false | true, false |
| Device Type | String | Device emulation | desktop | desktop, mobile |
| Premium Proxies | String | Premium level | level_1 | level_1, level_2 |
| Residential Proxies | Boolean | Use residential IPs | false | true, false |
| Mobile Proxies | Boolean | Use mobile IPs | false | true, false |
| Session Number | Number | Sticky session ID | 0 | 12345, 67890 |
| Country | String | Geo-targeting country | - | us, gb, de, fr, ca, au, jp, in |
| Bypass | String | Anti-bot bypass level | - | cloudflare_level_1, cloudflare_level_2, cloudflare_level_3, datadome, perimeterx, incapsula, generic_level_1 to generic_level_4 |
Common Configuration Examples
JavaScript Rendering for Dynamic Sites:
Render JavaScript: trueWait Time: 3000Wait For: .product-titleFor detailed JavaScript rendering options, see Headless Browser and Wait For docs.
Geo-Targeting:
Country: usFor detailed country codes and geo-targeting options, see Country Geo-targeting docs.
Anti-Bot Bypass:
Bypass: cloudflare_level_1For complete anti-bot bypass options, see Anti-Bot Bypass docs.
Residential Proxies:
Residential Proxies: truePremium Proxies: level_2For more proxy types and options, see Residential Proxies and Premium Proxies docs.
Custom Headers & Cookies
Configure custom headers:
{ "User-Agent": "Custom Bot 1.0", "Accept-Language": "en-US", "X-Custom-Header": "value"}Configure custom cookies:
{ "session_id": "abc123", "preferences": "dark_mode"}JavaScript Scenarios
Execute browser actions before returning response:
[ {"action": "click", "selector": ".load-more"}, {"action": "wait", "timeout": 2000}, {"action": "scroll", "pixels": 500}, {"action": "screenshot", "fullpage": true}]Working with POST Requests
For POST requests, the node uses the input data from the previous node:
- Connect a node that outputs JSON data
- Configure ScrapeOps node:
- Method: POST
- The JSON from the previous node becomes the request body
Example workflow:
[Set Node] → [ScrapeOps Node] ↓ ↓ {data} POST with {data}Response Handling
Default Response
Returns raw HTML or file content:
<html> <head>...</head> <body>...</body></html>JSON Response
When Return Type: JSON is selected:
{ "status": 200, "headers": {...}, "body": "<html>...", "url": "https://example.com", "screenshot": "base64_data" // if enabled}Error Handling
Common status codes and their meanings:
| Status | Meaning | Action |
|---|---|---|
| 200 | Success | Process response |
| 404 | Not Found | Valid response (charged) |
| 400 | Bad Request | Check parameters |
| 401 | Invalid API Key | Check credentials |
| 429 | Rate Limited | Reduce request rate |
| 500 | Proxy Error | Retry or contact support |
Best Practices
1. Start Simple
Begin with basic requests and add complexity:
1. Basic GET request2. Add JavaScript rendering if needed3. Add wait conditions4. Enable anti-bot bypass if blocked2. Optimize for Cost
- Use
optimize_request: truefor automatic optimization - Set
max_request_costto control spending - Only enable features you need
3. Handle Dynamic Content
For JavaScript-heavy sites:
Render JavaScript: trueWait Time: 3000Wait For: .main-contentScroll: 10004. Session Management
For multi-step scraping:
Session Number: 12345// Use same number across requestsIntegration Examples
E-commerce Price Monitoring
URL: https://amazon.com/dp/B08N5WRWNWRender JavaScript: trueWait For: .price-blockCountry: usReturn Type: JSONNews Article Scraping
URL: https://news-site.com/articleFollow Redirects: trueDevice Type: mobilePremium Proxies: level_2Form Submission
Method: POSTURL: https://example.com/searchCustom Headers: {"Content-Type": "application/json"}// Input data from previous nodeDebugging Tips
1. Enable Transparent Status Codes
Initial Status Code: trueFinal Status Code: true2. Test with Simple Sites First
Use http://httpbin.org for testing:
/headers- See request headers/ip- Check proxy IP/user-agent- Verify user agent
3. Check Response Headers
Look for clues in response headers:
X-Proxy-Provider- Which proxy was usedX-Request-Cost- Credits consumedX-Status-Code- Original status code
Common Issues and Solutions
Issue: JavaScript Not Loading
Solution: Increase wait time or use wait_for selector
Issue: Getting Blocked
Solution: Enable appropriate bypass level or use residential proxies
Issue: Inconsistent Data
Solution: Use session numbers for sticky sessions
Issue: High Credit Usage
Solution: Enable optimize_request and set max_request_cost
Next Steps
- Learn about the Parser API for structured data extraction
- Explore the Data API for direct data access
- See practical examples of complete workflows
Need help? Check the ScrapeOps Dashboard for detailed request logs and debugging information.