[{"data":1,"prerenderedAt":408},["ShallowReactive",2],{"navigation_docs":3,"-guide":88,"-guide-surround":405},[4,48],{"title":5,"path":6,"stem":7,"children":8,"icon":47},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Scrape","\u002Fguide\u002Fscrape","1.guide\u002F02.scrape",{"title":16,"path":17,"stem":18},"Screenshots and PDFs","\u002Fguide\u002Fcaptures","1.guide\u002F03.captures",{"title":20,"path":21,"stem":22},"Links and accessibility and extract","\u002Fguide\u002Freading","1.guide\u002F04.reading",{"title":24,"path":25,"stem":26},"Crawl and search","\u002Fguide\u002Fcrawl","1.guide\u002F05.crawl",{"title":28,"path":29,"stem":30},"Sessions","\u002Fguide\u002Fsessions","1.guide\u002F06.sessions",{"title":32,"path":33,"stem":34},"CLI","\u002Fguide\u002Fcli","1.guide\u002F07.cli",{"title":36,"path":37,"stem":38},"MCP and Pi and OMP","\u002Fguide\u002Fagents","1.guide\u002F08.agents",{"title":40,"path":41,"stem":42},"Errors","\u002Fguide\u002Ferrors","1.guide\u002F09.errors",{"title":44,"path":45,"stem":46},"Custom providers","\u002Fguide\u002Fcustom","1.guide\u002F10.custom","i-lucide-book-open",{"title":49,"path":50,"stem":51,"children":52,"icon":87},"Providers","\u002Fproviders","2.providers\u002F00.index",[53,55,59,63,67,71,75,79,83],{"title":54,"path":50,"stem":51},"Every provider",{"title":56,"path":57,"stem":58},"Steel","\u002Fproviders\u002Fsteel","2.providers\u002F01.steel",{"title":60,"path":61,"stem":62},"Browserbase","\u002Fproviders\u002Fbrowserbase","2.providers\u002F02.browserbase",{"title":64,"path":65,"stem":66},"Kernel","\u002Fproviders\u002Fkernel","2.providers\u002F03.kernel",{"title":68,"path":69,"stem":70},"Browserless","\u002Fproviders\u002Fbrowserless","2.providers\u002F04.browserless",{"title":72,"path":73,"stem":74},"Hyperbrowser","\u002Fproviders\u002Fhyperbrowser","2.providers\u002F05.hyperbrowser",{"title":76,"path":77,"stem":78},"Anchor","\u002Fproviders\u002Fanchor","2.providers\u002F06.anchor",{"title":80,"path":81,"stem":82},"Cloudflare","\u002Fproviders\u002Fcloudflare","2.providers\u002F07.cloudflare",{"title":84,"path":85,"stem":86},"Playwright","\u002Fproviders\u002Fplaywright","2.providers\u002F08.playwright","i-lucide-server",{"id":89,"title":10,"body":90,"description":399,"extension":400,"links":401,"meta":402,"navigation":202,"path":6,"seo":403,"stem":7,"__hash__":404},"docs\u002F1.guide\u002F01.index.md",{"type":91,"value":92,"toc":391},"minimark",[93,98,103,107,123,127,152,155,159,170,280,286,290,293,304,308,350,363,367,387],[94,95,97],"warning",{"title":96},"Pre-1.0","The API and the tool list can still move. Pin exact versions if you build on it now.",[99,100,102],"h2",{"id":101},"why-this-exists","Why this exists",[104,105,106],"p",{},"Every browser vendor has a different idea of what \"get me this page\" means. Steel does it in one POST. Kernel wants a live browser first and then runs Playwright inside it. Browserbase fetches without a session but hands you a CDP URL for anything else. Anchor doesn't scrape at all.",[104,108,109,110,114,115,118,119,122],{},"That's fine for you, you read the docs once. A model reads them never. So ",[111,112,113],"code",{},"@agntn\u002Fbrowsers"," puts one ",[111,116,117],{},"scrape()"," over all of them, opens and closes the session when a vendor needs one, and lets every backend say what it can do through ",[111,120,121],{},"capabilities()",". Same thing in TypeScript, in the terminal and in an agent.",[99,124,126],{"id":125},"install","Install",[128,129,134],"pre",{"className":130,"code":131,"language":132,"meta":133,"style":133},"language-bash shiki shiki-themes browsers browsers browsers","pnpm add @agntn\u002Fbrowsers\n","bash","",[111,135,136],{"__ignoreMap":133},[137,138,141,145,149],"span",{"class":139,"line":140},"line",1,[137,142,144],{"class":143},"sK71F","pnpm",[137,146,148],{"class":147},"shU9J"," add",[137,150,151],{"class":147}," @agntn\u002Fbrowsers\n",[104,153,154],{},"Node.js 26 or newer.",[99,156,158],{"id":157},"first-call","First call",[104,160,161,162,165,166,169],{},"Playwright runs Chromium on your machine, so it needs no key. It takes the Chrome or Chromium already on your ",[111,163,164],{},"PATH",". Without one, ",[111,167,168],{},"npx playwright-core install chromium"," gets it.",[128,171,176],{"className":172,"code":173,"filename":174,"language":175,"meta":133,"style":133},"language-ts shiki shiki-themes browsers browsers browsers","import { create } from \"@agntn\u002Fbrowsers\";\n\nconst provider = await create(\"playwright\");\nconst page = await provider.scrape(\"https:\u002F\u002Fexample.com\");\n\npage.title; \u002F\u002F \"Example Domain\"\npage.text; \u002F\u002F \"This domain is for use in documentation examples…\"\n","first.ts","ts",[111,177,178,197,204,231,256,261,271],{"__ignoreMap":133},[137,179,180,184,188,191,194],{"class":139,"line":140},[137,181,183],{"class":182},"skH_V","import",[137,185,187],{"class":186},"s38Sx"," { create } ",[137,189,190],{"class":182},"from",[137,192,193],{"class":147}," \"@agntn\u002Fbrowsers\"",[137,195,196],{"class":186},";\n",[137,198,200],{"class":139,"line":199},2,[137,201,203],{"emptyLinePlaceholder":202},true,"\n",[137,205,207,210,213,216,219,222,225,228],{"class":139,"line":206},3,[137,208,209],{"class":182},"const",[137,211,212],{"class":186}," provider ",[137,214,215],{"class":182},"=",[137,217,218],{"class":182}," await",[137,220,221],{"class":143}," create",[137,223,224],{"class":186},"(",[137,226,227],{"class":147},"\"playwright\"",[137,229,230],{"class":186},");\n",[137,232,234,236,239,241,243,246,249,251,254],{"class":139,"line":233},4,[137,235,209],{"class":182},[137,237,238],{"class":186}," page ",[137,240,215],{"class":182},[137,242,218],{"class":182},[137,244,245],{"class":186}," provider.",[137,247,248],{"class":143},"scrape",[137,250,224],{"class":186},[137,252,253],{"class":147},"\"https:\u002F\u002Fexample.com\"",[137,255,230],{"class":186},[137,257,259],{"class":139,"line":258},5,[137,260,203],{"emptyLinePlaceholder":202},[137,262,264,267],{"class":139,"line":263},6,[137,265,266],{"class":186},"page.title; ",[137,268,270],{"class":269},"scIB-","\u002F\u002F \"Example Domain\"\n",[137,272,274,277],{"class":139,"line":273},7,[137,275,276],{"class":186},"page.text; ",[137,278,279],{"class":269},"\u002F\u002F \"This domain is for use in documentation examples…\"\n",[104,281,282,285],{},[111,283,284],{},"create()"," is async on purpose. That's the moment the provider module gets imported, so importing the package costs nothing and a bundler splits every provider into its own chunk.",[99,287,289],{"id":288},"who-scrapes-and-how","Who scrapes, and how",[291,292],"provider-roster",{},[104,294,295,296,299,300,303],{},"A cloud provider needs its key in the environment, ",[111,297,298],{},"STEEL_API_KEY"," for Steel and so on. Cloudflare wants two, a token and an account ID. ",[301,302,49],"a",{"href":50}," has the full list and a page per vendor.",[99,305,307],{"id":306},"let-it-pick","Let it pick",[128,309,311],{"className":172,"code":310,"language":175,"meta":133,"style":133},"import { create, resolveProvider } from \"@agntn\u002Fbrowsers\";\n\nconst provider = await create(resolveProvider());\n",[111,312,313,326,330],{"__ignoreMap":133},[137,314,315,317,320,322,324],{"class":139,"line":140},[137,316,183],{"class":182},[137,318,319],{"class":186}," { create, resolveProvider } ",[137,321,190],{"class":182},[137,323,193],{"class":147},[137,325,196],{"class":186},[137,327,328],{"class":139,"line":199},[137,329,203],{"emptyLinePlaceholder":202},[137,331,332,334,336,338,340,342,344,347],{"class":139,"line":206},[137,333,209],{"class":182},[137,335,212],{"class":186},[137,337,215],{"class":182},[137,339,218],{"class":182},[137,341,221],{"class":143},[137,343,224],{"class":186},[137,345,346],{"class":143},"resolveProvider",[137,348,349],{"class":186},"());\n",[104,351,352,355,356,358,359,362],{},[111,353,354],{},"resolveProvider()"," walks the registry in order and takes the first provider whose key is set. Steel if you set ",[111,357,298],{},". Playwright if you set nothing, because it's last and never needs a key. Pass a name and it checks that one instead, and throws ",[111,360,361],{},"AuthError"," when its key is missing, not something else quietly.",[99,364,366],{"id":365},"where-next","Where next",[368,369,370,376,381],"ul",{},[371,372,373,375],"li",{},[301,374,12],{"href":13}," for what comes back and why it isn't the same everywhere.",[371,377,378,380],{},[301,379,32],{"href":33}," if you live in a terminal.",[371,382,383,386],{},[301,384,385],{"href":37},"MCP, Pi and OMP"," to hand all of this to a model.",[388,389,390],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}",{"title":133,"searchDepth":199,"depth":199,"links":392},[393,394,395,396,397,398],{"id":101,"depth":199,"text":102},{"id":125,"depth":199,"text":126},{"id":157,"depth":199,"text":158},{"id":288,"depth":199,"text":289},{"id":306,"depth":199,"text":307},{"id":365,"depth":199,"text":366},"Install the package and scrape one page with Playwright. No key and no account for the first call","md",null,{"icon":47},{"title":10,"description":399},"PUpXtORcQBD16edDDYgSkaXNhoqINmLSpNgDozalATg",[401,406],{"title":12,"path":13,"stem":14,"description":407,"children":-1},"What scrape() hands back from each provider. HTML from some and markdown from others and an error from one",1790685115877]