Skip to main content
Version: v2

/metrics API

info

Currently, Browserless V2 is available in production via two domains: production-sfo.browserless.io and production-lon.browserless.io

The metrics API allows you to retrieve an array of session statistics. The data returned will have a maximum date of 1 week.

You can check the full Open API schema here.

Gathering metrics from your workers

To see statistics regarding your workers, simply issue a GET request to /metrics:

curl -X GET \
https://production-sfo.browserless.io/metrics?token=MY_API_TOKEN
warning

Remember that running this in the browser will expose your API key!

Running this cURL request will result in an output like:

[
{
"error": 3,
"maxConcurrent": 4,
"queued": 0,
"rejected": 0,
"running": 3,
"sessionTimes": [992, 1041, 802],
"successful": 0,
"timedout": 0,
"unauthorized": 0,
"unhealthy": 0,
"maxTime": 1041,
"meanTime": 945,
"minTime": 802,
"totalTime": 2835,
"units": 3,
"date": 1709134233732,
"cpu": 0.024877870173220466,
"memory": 0.7784158564199399
},
// ...
]

/metrics/total

This route will output a similar payload, but with the total stats of all sessions.