Scrapes a URL and returns its content. Handles proxy rotation, CAPTCHAs, and anti-bot measures automatically.
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
string | — | Required. Target URL |
render |
boolean | false | Enable JS rendering via headless browser |
countryCode |
string | — | Two-letter country code for geo-targeting |
premium |
boolean | false | Use premium residential proxies |
ultraPremium |
boolean | false | Advanced bypass mechanisms (incompatible with premium) |
deviceType |
enum | — | "mobile" or "desktop" |
outputFormat |
enum | "markdown" |
"text", "markdown", "html", "csv", or "json" |
autoparse |
boolean | false | Auto-parse JSON on supported sites; set true for csv/json output |
- Page is a JavaScript SPA (React, Vue, Angular, Next.js client-rendered)
- Initial scrape returns empty or skeleton HTML
- Content loads dynamically via API calls rendered in-browser
- Cost: Significantly more expensive than standard scrape
- Standard request returns 403/429
- Site has known anti-bot protection (Cloudflare, Akamai, PerimeterX)
- Cost: Significantly more expensive than standard; even more with render
- Premium still gets blocked
- Hardest-to-scrape sites
- Cost: Most expensive option; combining with render multiplies cost further
- Restriction: Cannot use with custom headers
- Content varies by region (pricing, availability, regulations)
- Site serves different content per locale
- Cost: More expensive than standard
- Site serves different layouts for mobile vs desktop
- Need mobile-specific content or responsive version
"markdown"(default) — best for reading content, preserves structure"text"— plain text, no formatting"html"— raw HTML when you need to parse DOM structure"csv"/"json"— use withautoparse: trueon supported sites
- Scraping a supported site (Amazon, Google, etc.) where ScraperAPI can auto-extract structured data
- Must be
truewhen usingcsvorjsonoutput format
Always start minimal and escalate only as needed:
- Call
scrapewith justurl(cheapest). - If response is empty or minimal content: add
render: true(significantly more expensive). - If the page shows a consent/interstitial:
- Retry with
deviceType: "desktop" - Then try
deviceType: "mobile"if needed
- Retry with
- If geo issues / repeated errors: retry with
countryCodematching the target market (e.g.,us,gb). - If 403/429 or blocking persists: add
premium: true(more expensive still). - If still blocked: switch to
ultraPremium: true(most expensive).- NEVER combine
premiumandultraPremium.
- NEVER combine
| Error | Likely Cause | Fix |
|---|---|---|
| Empty response | JS-rendered content | Add render: true |
| HTTP 403 | Anti-bot protection | Add premium: true or ultraPremium: true |
| HTTP 429 | Rate limiting | Add premium: true; ScraperAPI retries internally |
| Timeout | Slow target site | ScraperAPI handles retries; if persistent, site may be down |
| Partial content | Page too large (>50MB) | Scrape specific subpages instead of root |
- Scrape specific documentation pages rather than root URLs — you get focused content and save credits.
- For large sites, combine with
google_searchto find the exact page first, thenscrapeit. - The
markdownoutput format preserves headings, links, and lists — ideal for reading documentation.