2:I[5294,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],"Code"]
3:I[5294,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],"Pre"]
4:I[2734,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],"Heading"]
5:I[231,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],""]
6:I[5294,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],"CodeGroup"]
9:I[2403,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","235","static/chunks/235-5238db898b5afbf7.js","883","static/chunks/app/cloud/page-63956cf4c2fb1d50.js"],"Feedback"]
a:I[9275,[],""]
b:I[1343,[],""]
7:T1c06,import { GologinApi } from 'gologin';
const token = process.env.GL_API_TOKEN;
const gologin = GologinApi({ token });
async function main() {
const { browser } = await gologin.launch({cloud: true});
const page = await browser.newPage();
await page.goto('https://iphey.com/', { waitUntil: 'networkidle2' });
const status = await page.$eval('.trustworthy-status:not(.hide)',
(elt) => elt?.innerText?.trim()
);
return status; // Expecting 'Trustworthy'
}
main().catch(console.error).
then(console.info).finally(gologin.exit);
8:T4a2,git clone git@github.com:gologinapp/gologin.git
cd gologin
npm install
GL_API_TOKEN=[YOUR_GOLOGIN_API_TOKEN] node examples/example-cloud.js
0:["6ZCz-VlG0khrc3itF4UQu",[[["",{"children":["cloud",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["cloud",{"children":["__PAGE__",{},[["$L1",["$","article",null,{"className":"flex h-full flex-col pb-10 pt-16","children":[["$","div",null,{"className":"flex-auto prose dark:prose-invert [html_:where(&>*)]:mx-auto [html_:where(&>*)]:max-w-2xl [html_:where(&>*)]:lg:mx-[calc(50%-min(50%,theme(maxWidth.lg)))] [html_:where(&>*)]:lg:max-w-3xl","children":[["$","h1",null,{"children":"Cloud run anti-detect web browser"}],"\n",["$","p",null,{"children":"Cloud run scraping browser run on the servers of GoLogin, instead of your local machine. In what cases"}],"\n",["$","p",null,{"children":["To run browser in the cloud just add ",["$","$L2",null,{"children":"cloud: true"}]," to the list of params when calling ",["$","$L2",null,{"children":"gologinApi.launch()"}],"."]}],"\n",["$","$L3",null,{"code":" const { browser } = await gologin.launch({cloud: true});\n","children":["$","$L2",null,{"children":" const { browser } = await gologin.launch({cloud: true});\n"}]}],"\n",["$","h1",null,{"children":"Benefits of running scraping browser in the Cloud"}],"\n",["$","ol",null,{"children":["\n",["$","li",null,{"children":[["$","strong",null,{"children":"Scalability"}],": Quickly scale up or down the number of instances running to match your scraping needs."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Resource Efficiency"}],": Offload the computational and network load from your local machine to cloud servers."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Reduced Local Footprint"}],": No need to install and maintain browser software on local machines."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Improved Uptime"}],": Cloud services typically offer high availability and reliability."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Concurrency"}],": Run multiple scraping tasks in parallel without affecting each other's performance."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Security"}],": Enhanced security features like sandboxing and isolated environments."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Maintenance"}],": Automatic updates and maintenance of the browser environment."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Compliance"}],": Helps in complying with scraping policies by rotating and managing identities."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Data Storage"}],": Integrated cloud storage options for saving scraped data."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Performance"}],": Leverage powerful cloud infrastructure for faster data processing and extraction."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Integration"}],": Seamlessly integrate with other cloud services and APIs."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Reliability"}],": Less risk of scraping interruptions due to local network issues."]}],"\n",["$","li",null,{"children":[["$","strong",null,{"children":"Cost-Effectiveness"}],": Pay-as-you-go pricing models can be more economical than maintaining extensive local infrastructure."]}],"\n"]}],"\n",["$","$L4",null,{"level":2,"id":"make-your-first-run-of-browser-in-the-cloud","children":"Make your first run of browser in the cloud"}],"\n",["$","div",null,{"className":"my-6 flex gap-2.5 rounded-2xl border border-emerald-500/20 bg-emerald-50/50 p-4 leading-6 text-emerald-900 dark:border-emerald-500/30 dark:bg-emerald-500/5 dark:text-emerald-200 dark:[--tw-prose-links-hover:theme(colors.emerald.300)] dark:[--tw-prose-links:theme(colors.white)]","children":[["$","svg",null,{"viewBox":"0 0 16 16","aria-hidden":"true","className":"mt-1 h-4 w-4 flex-none fill-emerald-500 stroke-white dark:fill-emerald-200/20 dark:stroke-emerald-200","children":[["$","circle",null,{"cx":"8","cy":"8","r":"8","strokeWidth":"0"}],["$","path",null,{"fill":"none","strokeLinecap":"round","strokeLinejoin":"round","strokeWidth":"1.5","d":"M6.75 7.75h1.5v3.5"}],["$","circle",null,{"cx":"8","cy":"4","r":".5","fill":"none"}]]}],["$","div",null,{"className":"[&>:first-child]:mt-0 [&>:last-child]:mb-0","children":["$","p",null,{"children":["Before you can make requests to the GoLogin API, you will need to grab your\nAPI key from your dashboard. You find it under ",["$","$L5",null,{"href":"https://app.gologin.com/personalArea/TokenApi","children":"Settings » API"}],"."]}]}]]}],"\n",["$","$L6",null,{"tag":"cloud","label":"Run anti-detect browser in the cloud","children":[["$","$L3",null,{"language":"js","code":"import { GologinApi } from 'gologin';\n\nconst token = process.env.GL_API_TOKEN;\nconst gologin = GologinApi({ token });\n\nasync function main() {\n const { browser } = await gologin.launch({cloud: true});\n const page = await browser.newPage();\n await page.goto('https://iphey.com/', { waitUntil: 'networkidle2' });\n const status = await page.$eval('.trustworthy-status:not(.hide)', \n (elt) => elt?.innerText?.trim()\n );\n\n return status; // Expecting 'Trustworthy'\n}\n\nmain().catch(console.error).\n then(console.info).finally(gologin.exit);\n","children":["$","$L2",null,{"className":"language-js","children":"$7"}]}],["$","$L3",null,{"language":"python","code":"PYTHON\n\n","children":["$","$L2",null,{"className":"language-python","children":"PYTHON\n\n"}]}]]}],"\n",["$","$L4",null,{"level":2,"id":"running-code-yourself","children":"Running code yourself"}],"\n",["$","$L6",null,{"tag":"github.com","label":"Run scrapping example","children":["$","$L3",null,{"language":"bash","code":"git clone git@github.com:gologinapp/gologin.git\ncd gologin\nnpm install\n\nGL_API_TOKEN=[YOUR_GOLOGIN_API_TOKEN] node examples/example-cloud.js\n","children":["$","$L2",null,{"className":"language-bash","children":"$8"}]}]}],"\n",["$","$L4",null,{"level":2,"id":"whats-next","children":"What's next?"}],"\n",["$","p",null,{"children":"Great, you're now set up with an API client and have made your first request to the API.\nHere are a few links that might be handy as you venture further into the GoLogin API:"}],"\n",["$","ul",null,{"children":["\n",["$","li",null,{"children":["$","$L5",null,{"href":"https://app.gologin.com/personalArea/TokenApi","children":"Grab your API key from the Settings > API"}]}],"\n",["$","li",null,{"children":["$","$L5",null,{"href":"/https://gologin.com/scraping-browser-api/","children":"GoLogin Scraping Browser"}]}],"\n"]}]]}],["$","footer",null,{"className":"mx-auto mt-16 w-full max-w-2xl lg:max-w-5xl","children":["$","$L9",null,{}]}]]}]],null],null]},["$","$La",null,{"parallelRouterKey":"children","segmentPath":["children","cloud","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lb",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$Lc",null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/027cc402be06af88.css","precedence":"next","crossOrigin":"$undefined"}]],"$Ld"]]]]
d:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Cloud run scraping browser - GoLogin API Reference"}],["$","meta","3",{"name":"description","content":"This guide will get you all set up and ready to use the GoLogin API. We’ll cover how to get started an API client and how to make your first API request."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]]
1:null
e:I[2650,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","533","static/chunks/533-463131cc62f06a62.js","173","static/chunks/173-fc203c72e72da31b.js","192","static/chunks/192-bdca0343973e6cb5.js","235","static/chunks/235-5238db898b5afbf7.js","185","static/chunks/app/layout-1476186cd824e018.js"],"Providers"]
f:I[7010,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","533","static/chunks/533-463131cc62f06a62.js","173","static/chunks/173-fc203c72e72da31b.js","192","static/chunks/192-bdca0343973e6cb5.js","235","static/chunks/235-5238db898b5afbf7.js","185","static/chunks/app/layout-1476186cd824e018.js"],"Layout"]
10:I[4080,["231","static/chunks/231-987d5c3e911703df.js","458","static/chunks/458-4089d99a84ebbe2b.js","533","static/chunks/533-463131cc62f06a62.js","173","static/chunks/173-fc203c72e72da31b.js","192","static/chunks/192-bdca0343973e6cb5.js","235","static/chunks/235-5238db898b5afbf7.js","185","static/chunks/app/layout-1476186cd824e018.js"],""]
11:T47c,
const APP_ID = 'izr1nygf';
const user = {
// user_id: 1,
// email: 'dima.kaigorod@gmail.com',
// name: ''
};
window.intercomSettings = {
api_base: "https://api-iam.intercom.io",
app_id: APP_ID,
user_id: user.user_id, // IMPORTANT: Replace "user.id" with the variable you use to capture the user's ID
name: user.name, // IMPORTANT: Replace "user.name" with the variable you use to capture the user's name
email: user.email, // IMPORTANT: Replace "user.email" with the variable you use to capture the user's email address
};
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/' + APP_ID;var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
c:["$","html",null,{"lang":"en","className":"h-full","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex min-h-full bg-white antialiased dark:bg-zinc-900","children":[["$","$Le",null,{"children":["$","div",null,{"className":"w-full","children":["$","$Lf",null,{"allSections":{"/":[{"title":"Guides","id":"guides"},{"title":"Resources","id":"resources"}],"/cloud":[{"title":"Make your first run of browser in the cloud","id":"make-your-first-run-of-browser-in-the-cloud"},{"title":"Running code yourself","id":"running-code-yourself"},{"title":"What's next?","id":"whats-next"}],"/authentication":[{"title":"OAuth2 with bearer token","id":"o-auth2-with-bearer-token"},{"title":"Using an GologinApi instance","id":"using-an-gologin-api-instance"},{"title":"Using an SDK","id":"using-an-sdk"}],"/conversations":[{"title":"The conversation model","id":"the-conversation-model"},{"title":"List all conversations","id":"list-all-conversations","tag":"GET","label":"/v1/conversations"},{"title":"Create a conversation","id":"create-a-conversation","tag":"POST","label":"/v1/conversations"},{"title":"Retrieve a conversation","id":"retrieve-a-conversation","tag":"GET","label":"/v1/conversations/:id"},{"title":"Update a conversation","id":"update-a-conversation","tag":"PUT","label":"/v1/conversations/:id"},{"title":"Delete a conversation","id":"delete-a-conversation","tag":"DELETE","label":"/v1/conversations/:id"}],"/contacts":[{"title":"The contact model","id":"the-contact-model"},{"title":"List all contacts","id":"list-all-contacts","tag":"GET","label":"/v1/contacts"},{"title":"Create a contact","id":"create-a-contact","tag":"POST","label":"/v1/contacts"},{"title":"Retrieve a contact","id":"retrieve-a-contact","tag":"GET","label":"/v1/contacts/:id"},{"title":"Update a contact","id":"update-a-contact","tag":"PUT","label":"/v1/contacts/:id"},{"title":"Delete a contact","id":"delete-a-contact","tag":"DELETE","label":"/v1/contacts/:id"}],"/attachments":[{"title":"The attachment model","id":"the-attachment-model"},{"title":"List all attachments","id":"list-all-attachments","tag":"GET","label":"/v1/attachments"},{"title":"Create an attachment","id":"create-an-attachment","tag":"POST","label":"/v1/attachments"},{"title":"Retrieve an attachment","id":"retrieve-an-attachment","tag":"GET","label":"/v1/attachments/:id"},{"title":"Update an attachment","id":"update-an-attachment","tag":"PUT","label":"/v1/attachments/:id"},{"title":"Delete an attachment","id":"delete-an-attachment","tag":"DELETE","label":"/v1/attachments/:id"}],"/headless":[{"title":"Clone and run headless scraping browser code sample","id":"clone-and-run-headless-scraping-browser-code-sample"},{"title":"What's next?","id":"whats-next"}],"/errors":[{"title":"Status codes","id":"status-codes"},{"title":"Error types","id":"error-types"}],"/profiles":[{"title":"List all groups","id":"list-all-groups","tag":"GET","label":"/v1/groups"},{"title":"Create a group","id":"create-a-group","tag":"POST","label":"/v1/groups"},{"title":"Retrieve a group","id":"retrieve-a-group","tag":"GET","label":"/v1/groups/:id"},{"title":"Update a group","id":"update-a-group","tag":"PUT","label":"/v1/groups/:id"},{"title":"Delete a group","id":"delete-a-group","tag":"DELETE","label":"/v1/groups/:id"}],"/custom-proxies":[{"title":"Clone and run headless scraping browser code sample","id":"clone-and-run-headless-scraping-browser-code-sample"},{"title":"What's next?","id":"whats-next"}],"/quickstart":[{"title":"Making your first anonymous scrapping request","id":"making-your-first-anonymous-scrapping-request"},{"title":"What this script does, step by step","id":"what-this-script-does-step-by-step"},{"title":"Running code yourself","id":"running-code-yourself"},{"title":"What's next?","id":"whats-next"}],"/provided-proxies":[{"title":"Clone and run headless scraping browser code sample","id":"clone-and-run-headless-scraping-browser-code-sample"},{"title":"What's next?","id":"whats-next"}],"/recaptcha":[{"title":"Making your first anonymous scrapping request","id":"making-your-first-anonymous-scrapping-request"},{"title":"What this script does, step by step","id":"what-this-script-does-step-by-step"},{"title":"Running code yourself","id":"running-code-yourself"},{"title":"What's next?","id":"whats-next"}],"/sdks":[{"title":"Official libraries","id":"official-libraries"}]},"children":["$","$La",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lb",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"className":"absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden","children":["$","div",null,{"className":"absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]","children":[["$","div",null,{"className":"absolute inset-0 bg-gradient-to-r from-[#36b49f] to-[#DBFF75] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#36b49f]/30 dark:to-[#DBFF75]/30 dark:opacity-100","children":["$","svg",null,{"aria-hidden":"true","className":"absolute inset-x-0 inset-y-[-50%] h-[200%] w-full skew-y-[-18deg] fill-black/40 stroke-black/50 mix-blend-overlay dark:fill-white/2.5 dark:stroke-white/5","children":[["$","defs",null,{"children":["$","pattern",null,{"id":":S1:","width":72,"height":56,"patternUnits":"userSpaceOnUse","x":-12,"y":4,"children":["$","path",null,{"d":"M.5 56V.5H72","fill":"none"}]}]}],["$","rect",null,{"width":"100%","height":"100%","strokeWidth":0,"fill":"url(#:S1:)"}],["$","svg",null,{"x":-12,"y":4,"className":"overflow-visible","children":[["$","rect","4-3",{"strokeWidth":"0","width":73,"height":57,"x":288,"y":168}],["$","rect","2-1",{"strokeWidth":"0","width":73,"height":57,"x":144,"y":56}],["$","rect","7-3",{"strokeWidth":"0","width":73,"height":57,"x":504,"y":168}],["$","rect","10-6",{"strokeWidth":"0","width":73,"height":57,"x":720,"y":336}]]}]]}]}],["$","svg",null,{"viewBox":"0 0 1113 440","aria-hidden":"true","className":"absolute left-1/2 top-0 ml-[-19rem] w-[69.5625rem] fill-white blur-[26px] dark:hidden","children":["$","path",null,{"d":"M.016 439.5s-9.5-300 434-300S882.516 20 882.516 20V0h230.004v439.5H.016Z"}]}]]}]}],["$","div",null,{"className":"mx-auto flex h-full max-w-xl flex-col items-center justify-center py-16 text-center","children":[["$","p",null,{"className":"text-sm font-semibold text-zinc-900 dark:text-white","children":"404"}],["$","h1",null,{"className":"mt-2 text-2xl font-bold text-zinc-900 dark:text-white","children":"Page not found"}],["$","p",null,{"className":"mt-2 text-base text-zinc-600 dark:text-zinc-400","children":"Sorry, we couldn’t find the page you’re looking for."}],["$","$L5",null,{"className":"inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-emerald-400/10 dark:text-emerald-400 dark:ring-1 dark:ring-inset dark:ring-emerald-400/20 dark:hover:bg-emerald-400/10 dark:hover:text-emerald-300 dark:hover:ring-emerald-300 mt-8","href":"/","children":[false,"Back to docs",["$","svg",null,{"viewBox":"0 0 20 20","fill":"none","aria-hidden":"true","className":"mt-0.5 h-5 w-5 -mr-1","children":["$","path",null,{"stroke":"currentColor","strokeLinecap":"round","strokeLinejoin":"round","d":"m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9"}]}]]}]]}]],"notFoundStyles":[],"styles":null}]}]}]}],["$","$L10",null,{"id":"intercom","dangerouslySetInnerHTML":{"__html":"$11"}}]]}]}]