Skip to main content
In v2, all proxy and fetch behaviour is controlled through the 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

The mode parameter controls how pages are retrieved: Set stealth: true alongside any mode to enable residential proxy with anti-bot headers.

Examples

Geo-targeted content

Access content from a specific country using the country 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: true for sites with strong anti-bot protections (combine with mode: "js" for dynamic sites).
  • Add wait time for pages that load content dynamically after the initial render.
  • Use scrolls to trigger lazy-loaded content on infinite-scroll pages.
  • The country parameter doesn’t affect pricing — credits are charged the same regardless of proxy location.