Browser WebSocket API

Depending on your needs, you can always connect to the AutoScrpaer Scraping Browser's temporary session service via WebSocket (Puppeteer/Playwright). If you need to create a persistent session, you need to create it through the Session Create interface.


Connection

This endpoint allows you to release created browser sessions, both persistent and temporary.

Required parameters

  • Name
    session_id
    Type
    string
    Description

    The session id. If this parameter is missing, a temporary session will be automatically created.

  • Name
    proxy_premium
    Type
    boolean
    Description

    Use premium proxies to make the request harder to detect

  • Name
    proxy_country
    Type
    string
    Description

    Geolocation of the IP used to make the request. Only for Premium Proxies, ISO 3166 country codes.

Request

WSS
/browser
import puppeteer from 'puppeteer-core';

(async () => {
const connectionURL = 'wss://api.autoscraper.pro/browser?apiKey=YOUR_API_KEY&proxy_country=us';
const browser = await puppeteer.connect({ browserWSEndpoint: connectionURL });
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await browser.close();
})();

Response

//

Was this page helpful?

Previous
Release Session