Create Session

Although the AutoScraper Scrping Browser service automatically creates a temporary session, we still need a persistent session. This section will guide you on how to create a persistent session.


Create Session

This endpoint helps you create browser sessions, including persistent sessions and temporary sessions.

Required parameters

  • Name
    persistent
    Type
    boolean
    Description

    Whether to persist the session. Default: false.

  • Name
    ttl
    Type
    boolean
    Description

    Session duration, in seconds

  • 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

POST
/v1/browser/session
curl -G https://api.autoscraper.pro/v1/browser/session \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "persistent": false,
    "proxy_premium": "true",
    "proxy_country": "us",
    "ttl": 180
  }'

Response

{
    "session_id": "bedf8f75-12fe-4369-a104-c9fda81b0c41",
    "proxy_country": "string",
    "ttl": 180,
    "duration": 0,
    "bytes_sent": 0,
    "bytes_received": 0,
    "websocket_url": "wss://api.autoscraper.pro/v1/browser/bedf8f75-12fe-4369-a104-c9fda81b0c41",
    "state": "pending",
    "created_at": "2025-03-22T07:28:22.813Z",
    "updated_at": "2025-03-22T07:28:22.813Z"
}

Was this page helpful?

Previous
Session List