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.
Complete Parameter Mapping
Zyte and Scrapfly use different parameter names and API structures. This table shows exact mappings for all features.
| Zyte Parameter | Scrapfly Parameter | Notes |
|---|---|---|
url |
url |
Target URL to scrape (same) |
browserHtml: true |
render_js=true |
Enable JavaScript rendering with headless browser |
javascript: true |
render_js=true |
Alternative Zyte parameter for browser rendering |
geolocation |
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 |
Capture screenshot (or use dedicated Screenshot API) |
screenshotOptions |
screenshot_flags |
Options: load_images, dark_mode, block_banners |
actions (browser actions) |
js_scenario |
Browser automation: clicks, form fills, scrolls |
product: true |
extraction_model=product |
AI-powered product extraction |
article: true |
extraction_model=article |
AI-powered article extraction |
jobPosting: true |
extraction_model=job_posting |
AI-powered job posting extraction |
customAttributes |
extraction_prompt |
Custom LLM extraction with natural language prompt |
sessionContext |
session |
Session name for persistent cookies/state |
sessionContextParameters.actions |
session + js_scenario |
Combine session with browser actions |
| N/A (tier-based) | asp=true |
Anti-bot bypass - no tier guessing needed |
| N/A | proxy_pool=public_residential_pool |
Residential proxy pool (Scrapfly exclusive) |
| N/A | session_sticky_proxy=true |
Keep same IP within session (Scrapfly exclusive) |
| N/A | cache=true |
Response caching (Scrapfly exclusive) |
| N/A | cache_ttl |
Cache TTL in seconds (Scrapfly exclusive) |
| N/A | auto_scroll=true |
Auto-scroll for lazy loading (Scrapfly exclusive) |
| N/A | wait_for_selector |
Wait for CSS selector to appear (Scrapfly exclusive) |
| N/A | format |
Output format: markdown, clean_html, text (Scrapfly exclusive) |
| N/A | webhook_name |
Async webhook notifications (Scrapfly exclusive) |
| N/A | tags |
Custom tags for analytics (Scrapfly exclusive) |
| N/A | Proxy Saver | 50% bandwidth savings on residential proxies (Scrapfly exclusive) |
Migration Code Examples
Side-by-side code examples showing how to migrate from Zyte to Scrapfly. Select your language below.
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
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]
- Copy the prompt above
- Open Claude or ChatGPT
- Paste the prompt and replace
[PASTE YOUR CODE HERE]with your Zyte code - Review the generated Scrapfly code and test it with your free 1,000 credits
Developer Tools: Use our cURL to Python converter and selector tester to speed up development.
Scrapfly 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.
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.
Smart Caching
Cache responses to reduce costs and improve response times. Set custom TTL and clear cache on demand.
Crawler API
Automated multi-page crawling with intelligent link discovery, sitemap support, and per-URL extraction rules.
Proxy Saver
Automatically reduce bandwidth consumption by 50% on residential proxies, saving $1,500+ per million requests.
Webhooks
Async processing with delivery guarantees. Get notified when scrapes complete without polling.
Frequently Asked Questions
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?
actions parameter?Scrapfly's 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"}}
]
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 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?
- Sign up for free: Get 1,000 API credits with no credit card required
- Run parallel testing: Keep Zyte running while testing Scrapfly
- Compare results: Verify that Scrapfly returns the same data
- 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
Need help with migration? Contact our team