Skip to main content
You need a BrowserBunny account, an API key, and an available test target. Manage your keys in the dashboard.

Connect to the API

Keep your API key in an environment variable. Send it in the Authorization header with the Bearer prefix.
Retrieve the device catalog:
Choose a device from the response whose enabled value is true and whose locked value is false. Use its id in your run request.

Submit a test

Replace DEVICE_ID with your chosen device ID and set start_url to a site you are authorized to test. Describe the task in test_task.
A new run returns HTTP 202. Save the id from the response to retrieve its progress. Creating a run starts test execution and can consume account usage.
Keep the same idempotency key and request body when retrying an uncertain submission. Use a new key for a new test. Reusing a key with a changed request returns HTTP 409.

Follow the run

Replace RUN_ID with the returned run ID:
The run’s status describes execution progress; outcome describes its result. A finished run has status: "complete". Open the returned run_url while signed in to the owning account to review the run in your dashboard. Retrieve a page of logs:
If the response includes next_cursor, pass that value unchanged as the cursor query parameter to retrieve the next page.