# Zyte to Scrapfly Migration Guide

 Complete parameter mapping and code examples for migrating from Zyte (Zyte API / former Scrapinghub) 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 Zyte Alternative Page ](https://scrapfly.io/compare/zyte-alternative) 

 

 

 

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

 Zyte and Scrapfly use different parameter names and API structures. This table shows exact mappings for all features.

  **Note:** Zyte uses JSON POST requests, while Scrapfly supports both JSON POST and URL parameters. Parameters link to detailed documentation. 

 | Zyte Parameter | Scrapfly Parameter | Notes |
|---|---|---|
| `url` | [`url`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_url) | Target URL to scrape (same) |
| `browserHtml: true` | [`render_js=true`](https://scrapfly.io/docs/scrape-api/javascript-rendering) | Enable JavaScript rendering with headless browser |
| `javascript: true` | [`render_js=true`](https://scrapfly.io/docs/scrape-api/javascript-rendering) | Alternative Zyte parameter for browser rendering |
| `geolocation` | [`country`](https://scrapfly.io/docs/scrape-api/proxy#country) | 2-letter ISO country code (e.g., "US" to "us", "GB" to "gb") |
| `httpResponseBody: true` | (default behavior) | HTML content is returned by default in Scrapfly |
| `httpResponseHeaders: true` | (default behavior) | Response headers always included in Scrapfly |
| `screenshot: true` | [`screenshots[name]=fullpage`](https://scrapfly.io/docs/screenshot-api/getting-started) | Capture screenshot (or use dedicated Screenshot API) |
| `screenshotOptions` | [`screenshot_flags`](https://scrapfly.io/docs/screenshot-api/getting-started#options) | Options: `load_images`, `dark_mode`, `block_banners` |
| `actions` (browser actions) | [`js_scenario`](https://scrapfly.io/docs/scrape-api/javascript-rendering#js_scenario) | Browser automation: clicks, form fills, scrolls |
| `product: true` | [`extraction_model=product`](https://scrapfly.io/docs/extraction-api/getting-started) | AI-powered product extraction |
| `article: true` | [`extraction_model=article`](https://scrapfly.io/docs/extraction-api/getting-started) | AI-powered article extraction |
| `jobPosting: true` | [`extraction_model=job_posting`](https://scrapfly.io/docs/extraction-api/getting-started) | AI-powered job posting extraction |
| `customAttributes` | [`extraction_prompt`](https://scrapfly.io/docs/extraction-api/getting-started#extraction_prompt) | Custom LLM extraction with natural language prompt |
| `sessionContext` | [`session`](https://scrapfly.io/docs/scrape-api/session) | Session name for persistent cookies/state |
| `sessionContextParameters.actions` | `session` + `js_scenario` | Combine session with browser actions |
| N/A (tier-based) | [`asp=true`](https://scrapfly.io/docs/scrape-api/anti-scraping-protection) | Anti-bot bypass - no tier guessing needed |
| N/A | [`proxy_pool=public_residential_pool`](https://scrapfly.io/docs/scrape-api/proxy#proxy_pool) | Residential proxy pool (Scrapfly exclusive) |
| N/A | [`session_sticky_proxy=true`](https://scrapfly.io/docs/scrape-api/proxy#session_sticky_proxy) | Keep same IP within session (Scrapfly exclusive) |
| N/A | [`cache=true`](https://scrapfly.io/docs/scrape-api/cache) | Response caching (Scrapfly exclusive) |
| N/A | [`cache_ttl`](https://scrapfly.io/docs/scrape-api/cache#cache_ttl) | Cache TTL in seconds (Scrapfly exclusive) |
| N/A | [`auto_scroll=true`](https://scrapfly.io/docs/scrape-api/javascript-rendering#auto_scroll) | Auto-scroll for lazy loading (Scrapfly exclusive) |
| N/A | [`wait_for_selector`](https://scrapfly.io/docs/scrape-api/javascript-rendering#wait_for_selector) | Wait for CSS selector to appear (Scrapfly exclusive) |
| N/A | [`format`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_format) | Output format: `markdown`, `clean_html`, `text` (Scrapfly exclusive) |
| N/A | [`webhook_name`](https://scrapfly.io/docs/scrape-api/webhook) | Async webhook notifications (Scrapfly exclusive) |
| N/A | [`tags`](https://scrapfly.io/docs/scrape-api/getting-started#api_param_tags) | Custom tags for analytics (Scrapfly exclusive) |
| N/A | [Proxy Saver](https://scrapfly.io/docs/proxy-saver/getting-started) | 50% bandwidth savings on residential proxies (Scrapfly exclusive) |

 

 

 

 

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

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

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

 ###  Zyte

 ```
import requests

API_KEY = 'YOUR_ZYTE_API_KEY'

response = requests.post(
    "https://api.zyte.com/v1/extract",
    auth=(API_KEY, ""),
    json={
        "url": "https://example.com",
        "browserHtml": True,
        "geolocation": "US",
        "screenshot": True,
        "product": True
    }
)

data = response.json()
print(data["browserHtml"])
```

 

 

###  Scrapfly

 ```
from scrapfly import ScrapflyClient, ScrapeConfig

client = ScrapflyClient(key="YOUR_SCRAPFLY_API_KEY")

result = client.scrape(ScrapeConfig(
    url="https://example.com",
    render_js=True,
    country="us",
    asp=True,
    screenshots={"main": "fullpage"},
    extraction_model="product"
))

print(result.content)
```

 

 

 

 

###  Zyte

 ```
const axios = require('axios');

const API_KEY = 'YOUR_ZYTE_API_KEY';

const response = await axios.post(
    'https://api.zyte.com/v1/extract',
    {
        url: 'https://example.com',
        browserHtml: true,
        geolocation: 'US',
        screenshot: true,
        product: true
    },
    {
        auth: {
            username: API_KEY,
            password: ''
        }
    }
);

console.log(response.data.browserHtml);
```

 

 

###  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,
    country: 'us',
    asp: true,
    screenshots: {"main": "fullpage"},
    extraction_model: 'product'
});

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

 

 

 

 

###  Zyte

 ```
curl https://api.zyte.com/v1/extract \
  -u YOUR_ZYTE_API_KEY: \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "browserHtml": true,
    "geolocation": "US",
    "screenshot": true,
    "product": true
  }'
```

 

 

###  Scrapfly

 ```
curl "https://api.scrapfly.io/scrape\
?key=YOUR_SCRAPFLY_API_KEY\
&url=https%3A%2F%2Fexample.com\
&render_js=true\
&country=us\
&asp=true\
&screenshots%5Bmain%5D=fullpage\
&extraction_model=product"
```

 

 

 

 

 

 

 

 

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

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

####  Copy This Prompt

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

Key parameter mappings:
- "browserHtml": true to render_js=True
- "javascript": true to render_js=True
- "geolocation": "US" to country="us" (lowercase)
- "screenshot": true to screenshots={"main": "fullpage"}
- "product": true to extraction_model="product"
- "article": true to extraction_model="article"
- "jobPosting": true to extraction_model="job_posting"
- "customAttributes" to extraction_prompt="..." (natural language)
- "actions" to js_scenario=[...] (browser automation)
- "sessionContext" to session="session_name"

Scrapfly exclusive features to consider adding:
- asp=True for anti-bot bypass (no tier guessing needed)
- proxy_pool="public_residential_pool" for residential proxies
- cache=True, cache_ttl=3600 for response caching
- auto_scroll=True for lazy-loaded content
- format="markdown" or "clean_html" for clean output
- Proxy Saver automatically reduces bandwidth costs by 50%

Scrapfly SDK docs: https://scrapfly.io/docs/sdk/python
API docs: https://scrapfly.io/docs/scrape-api

My current Zyte 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 Zyte 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 Zyte or require separate products.

 [####  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) [####  Proxy Saver

Automatically reduce bandwidth consumption by 50% on residential proxies, saving $1,500+ per million requests.

 ](https://scrapfly.io/products/proxy-saver) [####  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 Zyte's tier-based pricing in Scrapfly?

Scrapfly doesn't use website difficulty tiers. Instead, use `asp=true` for anti-bot bypass on any site:

 ```
# Zyte: guess which tier (1-5) your target falls into
# Scrapfly: just enable ASP
result = client.scrape(ScrapeConfig(
    url="https://protected-site.com",
    asp=True  # Works for all sites, no tier guessing
))
```

 

 

   #### How do I replace Zyte's `actions` parameter?

Scrapfly's [js\_scenario](https://scrapfly.io/docs/scrape-api/javascript-rendering#js_scenario) provides similar functionality:

 ```
# Zyte actions
"actions": [{"action": "click", "selector": ".button"}]

# Scrapfly js_scenario
js_scenario=[
    {"click": {"selector": ".button"}},
    {"wait": 1000},
    {"scroll": {"selector": "bottom"}}
]
```

 

[Learn more about JS Scenarios ](https://scrapfly.io/docs/scrape-api/javascript-rendering#js_scenario)

 

   #### Can I replace Scrapy Cloud with Scrapfly?

Yes! Keep your spiders on your infrastructure and use Scrapfly as a downloader middleware:

- Use the [Python SDK](https://scrapfly.io/docs/sdk/python) in your existing Scrapy projects
- No need to deploy spiders to a cloud platform
- Maintain full control over your scraping infrastructure
 
 

   #### 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 Zyte running while testing Scrapfly
3. **Compare results:** Verify that Scrapfly returns the same data
4. **Gradual migration:** Switch traffic gradually (e.g., 10% to 50% to 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)