Skip to main content
Bright Data Scraper Studio runs every scraper on one of two worker types: Browser worker (a real headless browser) or Code worker (raw HTTP requests). Pick the one that matches the minimum level of interaction your target site needs, Code worker is faster and cheaper, so start there and switch only if Code worker cannot reach the data.

Browser worker vs Code worker

Browser workerCode worker
Execution modelHeadless browser sessionDirect HTTP requests (like curl or requests.get)
Runs JavaScriptYesNo
Clicks, scrolls, form inputYesNo
Best forDynamic pages, SPAs, login flows, infinite scroll, GraphQL captureStatic HTML, sitemap crawls, public JSON APIs
SpeedSlower (browser startup, full page load)Faster (single HTTP round trip)
Cost per page loadHigherLower

When should I use Browser worker?

Use Browser worker when any of the following is true:
  • The target data is rendered client-side by JavaScript and is not present in the raw HTML response
  • You need to click, scroll, hover, or type to reach or reveal the data
  • You need to solve a cookie banner or dismiss a popup before the content renders
  • You need to capture network traffic with tag_response, tag_script, or capture_graphql
  • You need to log in, hold a session, or interact with a form

When should I use Code worker?

Use Code worker when all of the following are true:
  • The full target data is present in the raw HTML response or in a public JSON endpoint
  • No JavaScript execution is required to render the data
  • No click, scroll, or type interaction is required
  • You are crawling sitemaps, RSS feeds, or API endpoints
Start with Code worker. If the data you need is not in the raw response, switch to Browser worker. You can change worker type on the same scraper at any time.

Which functions are Browser worker only?

Bright Data Scraper Studio functions that depend on a live browser session throw an error when called from a Code worker. Choose Browser worker if your scraper needs any of these:
CategoryFunctions
Waiting on the DOMwait, wait_any, wait_for_text, wait_hidden, wait_visible, wait_network_idle, wait_page_idle
Scrollingscroll_to, scroll_to_all, load_more
Traffic taggingtag_response, tag_all_responses, tag_script, tag_image, tag_video, tag_screenshot, tag_download, tag_window_field, tag_serp, capture_graphql
Keyboard and mouse inputclick, right_click, hover, mouse_to, press_key, type
Browser configurationbrowser_size, emulate_device, freeze_page
Anti-botsolve_captcha, close_popup

Frequently asked questions

Yes. Open the scraper in the Bright Data Scraper Studio IDE and change the worker type in the Settings panel. If you switch from Browser worker to Code worker, remove any calls to the browser-only functions listed above or the scraper will throw an error on the next run.
Yes. Code worker issues a single HTTP request with no browser boot and no page render, so the round trip completes in a fraction of the time a browser-worker run takes. The exact speedup depends on the target site, but Code worker jobs typically finish in seconds.
Yes. Use tag_response or tag_all_responses to capture any XHR or fetch the page makes, and capture_graphql to capture and replay GraphQL queries. See Scraper Studio functions for the full reference.

Scraper Studio functions

Full reference for interaction and parser commands

Best practices

Recommended patterns for writing efficient scrapers