[{"data":1,"prerenderedAt":86},["ShallowReactive",2],{"content-\u002Fbuild-with-code\u002Fapi\u002Fchrome":3,"content-doc-\u002Fbuild-with-code\u002Fapi\u002Fchrome-inline":3},{"id":4,"title":5,"body":6,"date":77,"description":78,"extension":79,"meta":80,"navigation":81,"order":77,"path":82,"seo":83,"stem":84,"__hash__":85},"content\u002Fbuild-with-code\u002Fapi\u002Fchrome.md","Cloud Browser API, Run Puppeteer & Playwright Without the Maintenance | axiom.ai",{"type":7,"value":8,"toc":74},"minimark",[9,16,23,30,42,48,56,67],[10,11],"left-hero",{"description":12,"primaryText":13,"primaryTo":14,"title":15},"The Chrome API gives you cloud browsers that connect to your existing Puppeteer, Playwright, or CDP code. One long-lived WebSocket per session. No Chromium to install. No servers to manage.","Get API key","https:\u002F\u002Fcode.axiom.ai","Chrome API: Change one line and your script runs on our Chrome.",[17,18],"api-code-example",{"caption":19,"example":20,"link-text":21,"to":22},"Take a screenshot.","chrome","Read the Chrome API docs","\u002Fdocs\u002Fdeveloper-hub\u002Fapi\u002Fcdp",[24,25],"feature-list",{":items":26,"description":27,"eyebrow":28,"title":29},"[{\"title\":\"One line connects\",\"description\":\"Swap launch() for connect() pointed at our WebSocket. Nothing else changes.\",\"code\":\"const browser = await chromium.connectOverCDP(\\n  `wss:\u002F\u002Fcdp-lb.axiom.ai\u002F?token=${process.env.AXIOM_API_KEY}`\\n);\\n\"},{\"title\":\"Any CDP client\",\"description\":\"Puppeteer, Playwright's connectOverCDP, Python, Go, or raw WebSocket frames.\"},{\"title\":\"Full protocol access\",\"description\":\"Raw CDP, not a wrapper SDK. Every click, wait, and selector stays yours.\"},{\"title\":\"No lock-in\",\"description\":\"Point your script back at launch() and it runs locally again.\"}]","Instead of launching Chrome locally, your script connects to one of ours over a WebSocket. The rest of the script stays the same.","Connect","Your scripts, our browsers.",[31,32],"feature-grid-staggered",{":flat":33,":items":34,"description":35,"eyebrow":36,"title":37,"variant":38,":equal-height":39,":reverse-stagger":39,"cols":40,"section-id":41},"false","[{\"eyebrow\":\"Playwright over CDP\",\"title\":\"Playwright, unchanged\",\"description\":\"connectOverCDP takes the same endpoint, and locators, tracing, and assertions all keep working.\",\"to\":\"\u002Fbuild-with-code\u002Fplaywright\",\"linkText\":\"Explore Playwright\",\"code\":\"const browser = await chromium.connectOverCDP(\\n  `wss:\u002F\u002Fcdp-lb.axiom.ai\u002F?token=${KEY}`\\n);\\n\\nconst ctx = browser.contexts()[0];\\nconst page = ctx.pages()[0] ?? await ctx.newPage();\\n\\nawait page.goto(\\\"https:\u002F\u002Fexample.com\\\");\\nawait page.getByRole(\\\"button\\\",\\n  { name: \\\"Accept\\\" }).click();\\n\"},{\"eyebrow\":\"Puppeteer over CDP\",\"title\":\"Puppeteer, connected\",\"description\":\"puppeteer.connect points at the same WebSocket, so your selectors, waits, and evaluate calls keep working.\",\"to\":\"\u002Fbuild-with-code\u002Fpuppeteer\",\"linkText\":\"Explore Puppeteer\",\"code\":\"const browser = await puppeteer.connect({\\n  browserWSEndpoint:\\n    `wss:\u002F\u002Fcdp-lb.axiom.ai\u002F?token=${KEY}`\\n});\\n\\nconst [page] = await browser.pages();\\nawait page.goto(\\\"https:\u002F\u002Fexample.com\\\");\\nawait page.click(\\\"button.accept\\\");\\n\"},{\"eyebrow\":\"CDP plus a step\",\"title\":\"One call instead of a dozen lines\",\"description\":\"Step API functions run on the browser you connected to. scrape takes the selector for the data, the next-page button, and how many rows you want, then does the waiting and paging itself. Twenty of them cover the jobs you would otherwise write out, captchas and date pickers included.\",\"to\":\"\u002Fbuild-with-code\u002Fapi\u002Fstep\",\"linkText\":\"Explore the Step API\",\"code\":\"\u002F\u002F your own interception, on your terms\\nawait page.setRequestInterception(true);\\npage.on(\\\"request\\\", r =>\\n  r.url().endsWith(\\\".png\\\") ? r.abort() : r.continue());\\n\\nawait page.goto(\\\"https:\u002F\u002Fexample.com\u002Flist\\\");\\n\\n\u002F\u002F one call instead of a paging loop\\nconst rows = await axiom.scrape(\\n  null, \\\".row\\\", \\\".next\\\", 500, {});\\n\"}]","The endpoint is the same in all three. Point Playwright at it with connectOverCDP, point Puppeteer at it with connect, or call a Step API function on the browser you connected to and delete the loop you were about to write.","In practice","Three things worth trying.","solid","true",3,"in-practice",[24,43],{":items":44,"description":45,"eyebrow":46,"title":47},"[{\"title\":\"Always fresh Chrome\",\"description\":\"Every session gets clean, current cloud Chrome. No installs, no version drift between environments.\"},{\"title\":\"Scale by connecting\",\"description\":\"More parallel work means more connections. We handle concurrency and queueing [on our infrastructure](\u002Finfrastructure).\"},{\"title\":\"Pay for runtime\",\"description\":\"Runtime only [meters](\u002Fpricing) while a session is open. No idle servers.\"},{\"title\":\"Runtime on tap\",\"description\":\"Query your allowance, minutes used, and minutes remaining [over the API](\u002Fbuild-with-code\u002Fapi\u002Forchestrate).\"}]","We run the browsers, keep them patched, and queue the work. You open a connection when you need one and pay for the minutes it stays open.","Run","Fresh browsers, zero upkeep.",[31,49],{":flat":39,":items":50,"description":51,"eyebrow":52,"title":53,"variant":38,"link":54,"linkText":55},"[{\"shape\":\"cube\",\"title\":\"Chrome API docs\",\"link\":\"\u002Fdocs\u002Fdeveloper-hub\u002Fapi\u002Fcdp\",\"linkText\":\"Read the Chrome API docs\"},{\"shape\":\"staircase\",\"title\":\"Step API docs\",\"link\":\"\u002Fdocs\u002Fdeveloper-hub\u002Fapi\u002Fstep-functions\",\"linkText\":\"Read the Step API docs\"},{\"shape\":\"integration\",\"title\":\"Orchestrate API docs\",\"link\":\"\u002Fdocs\u002Fdeveloper-hub\u002Fapi\u002Frun-automations\",\"linkText\":\"Read the Orchestrate API docs\"}]","Quickstarts, worked examples, and full endpoint references for each layer. Start with the quickstart, generate a key, and build from there.","Docs","Every layer, documented.","\u002Fdocs\u002Fdeveloper-hub\u002Fapi\u002Fquickstart","Start with the quickstart",[57,58,61],"grid-fade-wrap",{"bg":59,"color":60},"gray-to-white","default",[62,63],"call-to-action",{":shapes":64,"headline":65,"linkText":13,"linkTo":14,"text":66},"[\"cube\"]","Get an API key and try the Chrome API for free.\n","2 free hours of runtime. No card required.",[68,69],"cross-links",{":links":70,"className":71},"[{\"eyebrow\":\"Go deeper\",\"title\":\"Step API\",\"to\":\"\u002Fbuild-with-code\u002Fapi\u002Fstep\"},{\"eyebrow\":\"Go deeper\",\"title\":\"Orchestrate API\",\"to\":\"\u002Fbuild-with-code\u002Fapi\u002Forchestrate\"}]",[72,73],"gray","iso-grid-gray-100",{"title":75,"searchDepth":40,"depth":40,"links":76},"",[],null,"A cloud browser API over CDP. Change one line and your Puppeteer or Playwright scripts run on fresh cloud Chrome, with no Chromium to maintain and no 2am restarts.","md",{},true,"\u002Fbuild-with-code\u002Fapi\u002Fchrome",{"title":5,"description":78},"build-with-code\u002Fapi\u002Fchrome","zrCEQve8hnbx1Hd-syRjba8v2FC1HrKfQ3zalSl0044",1785947370370]