Skip to main content
POST
/
v1
/
batch-sessions
curl --request POST \
  --url https://api.anchorbrowser.io/v1/batch-sessions \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '
{
  "count": 10,
  "configuration": {
    "browser": {
      "headless": {
        "active": true
      },
      "viewport": {
        "width": 1440,
        "height": 900
      }
    },
    "session": {
      "timeout": {
        "idle_timeout": 10,
        "max_duration": 300
      }
    }
  },
  "metadata": {
    "project": "web-scraping",
    "environment": "production"
  }
}
'
{
"data": {
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"total_requests": 123,
"created_at": "2023-11-07T05:31:56Z"
}
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Body

application/json
count
integer
required

Number of sessions to create in the batch (1-1000)

Required range: 1 <= x <= 1000
configuration
object

Configuration that applies to all sessions in the batch

metadata
object

Optional batch-level metadata for identification and organization

Response

Batch created successfully

data
object