# ZenRows to Scrapfly Migration Guide

 Complete parameter mapping and code examples for migrating from ZenRows to Scrapfly. Most teams complete migration in under 2 hours with zero downtime.

 [  Start For Free - 1,000 Credits ](https://scrapfly.io/register) [  Back to ZenRows Alternative Page ](https://scrapfly.io/compare/zenrows-alternative) 

 

 

 

##  [Complete Parameter Mapping](#parameter-mapping) 

 ZenRows and Scrapfly share similar parameter names with minor differences. This table shows exact mappings for all features.

 | ZenRows Parameter | Scrapfly Parameter | Notes |
|---|---|---|
| `apikey` | [`key`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_key) | API authentication key |
| `url` | [`url`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_url) | Target URL to scrape (same) |
| `js_render` | [`render_js`](https://scrapfly.io/docs/scrape-api/javascript-rendering#api_param_render_js) | Enable JavaScript rendering (true/false) |
| `antibot` | [`asp`](https://scrapfly.io/docs/scrape-api/anti-scraping-protection) | Anti-bot bypass (Anti-Scraping Protection) |
| `premium_proxy` | [`proxy_pool`](https://scrapfly.io/docs/scrape-api/proxy#proxy-pool) | Use `public_residential_pool` for residential proxies |
| `proxy_country` | [`country`](https://scrapfly.io/docs/scrape-api/proxy#country) | 2-letter ISO country code (e.g., "us", "gb") |
| `wait` | [`rendering_wait`](https://scrapfly.io/docs/scrape-api/javascript-rendering#rendering-wait) | Wait time in milliseconds before returning response |
| `wait_for` | [`wait_for_selector`](https://scrapfly.io/docs/scrape-api/javascript-rendering#wait-for-selector) | CSS selector to wait for before rendering complete |
| `custom_headers` | [`headers`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_headers) | Custom HTTP headers (JSON format) |
| `session_id` | [`session`](https://scrapfly.io/docs/scrape-api/session) | Session name for persistent cookies/state |
| `css_extractor` | [`extraction_template`](https://scrapfly.io/docs/extraction-api/getting-started) | Use Scrapfly's Extraction API for structured data |
| `autoparse` | [`extraction_model`](https://scrapfly.io/docs/extraction-api/automatic-ai) | Auto-parse structured data. Use `product`, `article`, etc. |
| `output` | [`format`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_format) | Output format: `raw`, `markdown`, `text`, `clean_html` |
| `block_resources` | N/A (auto-optimized) | Scrapfly auto-optimizes rendering. Use `format_options` for content filtering |
| `screenshot` | [`screenshots`](https://scrapfly.io/docs/screenshot-api/getting-started) | Capture screenshots (use Screenshot API or screenshots param) |
| `device` | [`os`](https://scrapfly.io/docs/scrape-api/javascript-rendering#os) | Operating system for browser fingerprint (desktop/mobile) |
| `json_response` | [`format`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_format) | Response format: `raw`, `markdown`, `text`, `clean_html` |
| `original_status` | [`proxy_response`](https://scrapfly.io/docs/scrape-api/proxy) | Return original HTTP status code from target |
| N/A | [`cache`](https://scrapfly.io/docs/scrape-api/cache) | Enable response caching (Scrapfly exclusive) |
| N/A | [`cache_ttl`](https://scrapfly.io/docs/scrape-api/cache#cache-ttl) | Cache time-to-live in seconds (Scrapfly exclusive) |
| N/A | [`auto_scroll`](https://scrapfly.io/docs/scrape-api/javascript-rendering#auto-scroll) | Automatically scroll page to load lazy content (Scrapfly exclusive) |
| N/A | [`tags`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_tags) | Custom tags for request tracking (Scrapfly exclusive) |
| N/A | [`correlation_id`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_correlation_id) | Custom correlation ID for request tracking (Scrapfly exclusive) |
| N/A | [`webhook`](https://scrapfly.io/docs/scrape-api/webhook) | Webhook name for async notifications (Scrapfly exclusive) |

 

 

 

 

##  [Migration Code Examples](#code-examples) 

 Side-by-side code examples showing how to migrate from ZenRows to Scrapfly. Select your language below.

  [  Python ](#python-example) [  JavaScript ](#javascript-example) [  cURL ](#curl-example) 

 ###  ZenRows

 ```
from zenrows import ZenRowsClient

client = ZenRowsClient("YOUR_ZENROWS_API_KEY")

params = {
    "js_render": "true",
    "antibot": "true",
    "premium_proxy": "true",
    "proxy_country": "us",
    "wait": 5000
}

response = client.get(
    "https://example.com",
    params=params
)

print(response.text)
```

 

 

###  Scrapfly

 ```
from scrapfly import ScrapflyClient, ScrapeConfig

client = ScrapflyClient(key="YOUR_SCRAPFLY_API_KEY")

result = client.scrape(ScrapeConfig(
    url="https://example.com",
    render_js=True,
    asp=True,
    proxy_pool="public_residential_pool",
    country="us",
    rendering_wait=5000
))

print(result.content)
```

 

 

 

 

###  ZenRows

 ```
const { ZenRows } = require("zenrows");

const client = new ZenRows("YOUR_ZENROWS_API_KEY");

const url = "https://example.com";
const params = {
    js_render: "true",
    antibot: "true",
    premium_proxy: "true",
    proxy_country: "us",
    wait: 5000
};

client.get(url, params)
    .then(response => {
        console.log(response.data);
    });
```

 

 

###  Scrapfly

 ```
const { ScrapflyClient } = require('scrapfly-sdk');

const client = new ScrapflyClient({
    key: 'YOUR_SCRAPFLY_API_KEY'
});

const result = await client.scrape({
    url: 'https://example.com',
    render_js: true,
    asp: true,
    proxy_pool: 'public_residential_pool',
    country: 'us',
    rendering_wait: 5000
});

console.log(result.result.content);
```

 

 

 

 

###  ZenRows

 ```
curl "https://api.zenrows.com/v1/\
?url=https%3A%2F%2Fexample.com\
&apikey=YOUR_ZENROWS_API_KEY\
&js_render=true\
&antibot=true\
&premium_proxy=true\
&proxy_country=us\
&wait=5000"
```

 

 

###  Scrapfly

 ```
curl "https://api.scrapfly.io/scrape\
?key=YOUR_SCRAPFLY_API_KEY\
&url=https%3A%2F%2Fexample.com\
&render_js=true\
&asp=true\
&proxy_pool=public_residential_pool\
&country=us\
&rendering_wait=5000"
```

 

 

 

 

 

 

 

 

##  [🤖 AI Migration Assistant](#ai-migration) 

 Use Claude or ChatGPT to automatically convert your ZenRows code to Scrapfly. Copy this prompt and paste it along with your existing code.

####  Copy This Prompt

 ```
I'm migrating from ZenRows to Scrapfly. Here's my current code using ZenRows' API.
Please convert it to use Scrapfly's Python SDK (or JavaScript SDK if my code is in JavaScript).

Key parameter mappings:
- apikey → key
- js_render → render_js
- antibot → asp
- premium_proxy=true → proxy_pool="public_residential_pool"
- proxy_country → country (same name, different parameter)
- wait → rendering_wait
- wait_for → wait_for_selector
- custom_headers → headers
- session_id → session
- css_extractor → extraction_template (use Scrapfly Extraction API)
- autoparse → extraction_model (use "product", "article", etc.)
- output → format (values: raw, markdown, text, clean_html)
- block_resources → N/A (Scrapfly auto-optimizes)
- screenshot → screenshots
- device → os
- json_response → format (values: raw, markdown, text, clean_html)
- original_status → proxy_response

Scrapfly SDK Docs (markdown for LLM): https://scrapfly.io/docs/sdk/python?view=markdown
Scrapfly API Docs (markdown for LLM): https://scrapfly.io/docs/scrape-api/getting-started?view=markdown

My current ZenRows code:
[PASTE YOUR CODE HERE]
```

 

  **How to Use:**1. Copy the prompt above
2. Open [Claude](https://claude.ai) or [ChatGPT](https://chat.openai.com)
3. Paste the prompt and replace `[PASTE YOUR CODE HERE]` with your ZenRows code
4. Review the generated Scrapfly code and test it with your free 1,000 credits
 
 **Developer Tools:** Use our [cURL to Python converter](https://scrapfly.io/web-scraping-tools/curl-python) and [selector tester](https://scrapfly.io/web-scraping-tools/css-xpath-tester) to speed up development.

 

 

 

 

 

##  [Scrapfly Exclusive Features](#exclusive-features) 

 Features available in Scrapfly that aren't available in ZenRows.

 [####  JS Scenarios

Automate browser interactions: clicks, form fills, scrolls, and conditional logic. Execute complex workflows without writing browser automation code.

 ](https://scrapfly.io/products/web-scraping-api) [####  Extraction API

AI-powered data extraction with pre-built models for products, articles, jobs, and more. Use LLM prompts for custom extraction without CSS selectors.

 ](https://scrapfly.io/products/extraction-api) [####  Smart Caching

Cache responses to reduce costs and improve response times. Set custom TTL and clear cache on demand.

 ](https://scrapfly.io/products/web-scraping-api) [####  Crawler API

Automated multi-page crawling with intelligent link discovery, sitemap support, and per-URL extraction rules.

 ](https://scrapfly.io/products/crawler-api) [####  Auto Scroll

Automatically scroll pages to trigger lazy-loaded content. Essential for infinite scroll pages like social media feeds.

 ](https://scrapfly.io/products/web-scraping-api) [####  Webhooks

Async processing with delivery guarantees. Get notified when scrapes complete without polling.

 ](https://scrapfly.io/products/web-scraping-api) 

 

 

 

##  [Frequently Asked Questions](#faq) 

  #### How do I handle ZenRows' `premium_proxy=true`?

In Scrapfly, use `proxy_pool="public_residential_pool"` instead of a boolean flag:

 ```
# ZenRows
premium_proxy = "true"

# Scrapfly
proxy_pool = "public_residential_pool"  # For residential proxies
```

 

 

   #### What if I'm using ZenRows' CSS extractor?

Scrapfly's [Extraction API](https://scrapfly.io/docs/extraction-api/getting-started) is more powerful:

- **Template extraction:** Similar to ZenRows CSS extractor, but more flexible
- **Auto-extraction:** Automatically detect and extract common data types
- **LLM extraction:** Use natural language prompts for complex extraction
 
 

   #### Do I need to change my session management?

ZenRows uses `session_id`, Scrapfly uses `session`. The functionality is the same:

 ```
# ZenRows
session_id = "my-session"

# Scrapfly
session = "my-session"
```

 

[Learn more about sessions ](https://scrapfly.io/docs/scrape-api/session)

 

   #### How do I test my migration?

1. **Sign up for free:** Get 1,000 API credits with no credit card required
2. **Run parallel testing:** Keep ZenRows running while testing Scrapfly
3. **Compare results:** Verify that Scrapfly returns the same data
4. **Gradual migration:** Switch traffic gradually (e.g., 10% → 50% → 100%)
 
 

  

 

 

 

## Start Your Migration Today

Test Scrapfly on your targets with 1,000 free API credits. No credit card required.

- 1,000 free API credits
- Full API access
- Migration support
- Same-day response from our team
 
 [  Start For Free ](https://scrapfly.io/register) Need help with migration? [Contact our team ](mailto:support@scrapfly.io)