In v2, all proxy and fetch behaviour is controlled through theDocumentation Index
Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt
Use this file to discover all available pages before exploring further.
FetchConfig object. You can set the proxy strategy (mode), country-based geotargeting (country), wait times, scrolling, custom headers, cookies, and more.
FetchConfig is accepted by sgai.extract(), sgai.scrape(), sgai.search(), and sgai.crawl.start().
Choosing a fetch mode
Themode parameter controls how pages are retrieved:
| Mode | Description |
|---|---|
auto | Automatically selects the best strategy (default) |
fast | Direct HTTP fetch, no JS rendering — fastest option |
js | Headless browser for JavaScript-heavy pages |
stealth: true alongside any mode to enable residential proxy with anti-bot headers.
Examples
Geo-targeted content
Access content from a specific country using thecountry parameter:
Stealth mode for protected sites
Use stealth mode to bypass anti-bot protections:Custom headers and cookies
Pass custom HTTP headers or cookies with your requests:Tips
- Start with
mode: "auto"and only switch to a specific mode if you need to. - Set
stealth: truefor sites with strong anti-bot protections (combine withmode: "js"for dynamic sites). - Add
waittime for pages that load content dynamically after the initial render. - Use
scrollsto trigger lazy-loaded content on infinite-scroll pages. - The
countryparameter doesn’t affect pricing — credits are charged the same regardless of proxy location.