Cloud run anti-detect web browser
Cloud run scraping browser run on the servers of GoLogin, instead of your local machine. In what cases
To run browser in the cloud just add cloud: true
to the list of params when calling gologinApi.launch()
.
const { browser } = await gologin.launch({cloud: true});
Benefits of running scraping browser in the Cloud
- Scalability: Quickly scale up or down the number of instances running to match your scraping needs.
- Resource Efficiency: Offload the computational and network load from your local machine to cloud servers.
- Reduced Local Footprint: No need to install and maintain browser software on local machines.
- Improved Uptime: Cloud services typically offer high availability and reliability.
- Concurrency: Run multiple scraping tasks in parallel without affecting each other's performance.
- Security: Enhanced security features like sandboxing and isolated environments.
- Maintenance: Automatic updates and maintenance of the browser environment.
- Compliance: Helps in complying with scraping policies by rotating and managing identities.
- Data Storage: Integrated cloud storage options for saving scraped data.
- Performance: Leverage powerful cloud infrastructure for faster data processing and extraction.
- Integration: Seamlessly integrate with other cloud services and APIs.
- Reliability: Less risk of scraping interruptions due to local network issues.
- Cost-Effectiveness: Pay-as-you-go pricing models can be more economical than maintaining extensive local infrastructure.
Make your first run of browser in the cloud
Before you can make requests to the GoLogin API, you will need to grab your API key from your dashboard. You find it under Settings » API.
cloud
Run anti-detect browser in the cloudimport { 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);
Running code yourself
github.com
Run scrapping examplegit clone [email protected]:gologinapp/gologin.git
cd gologin
npm install
GL_API_TOKEN=[YOUR_GOLOGIN_API_TOKEN] node examples/example-cloud.js
What's next?
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the GoLogin API: