Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Add browser profile docs

LarsenCundricfe5e4f500366
diff --git a/docs/api-reference/create-browser-profile.mdx b/docs/api-reference/create-browser-profile.mdx
new file mode 100644
index 000000000..670cab60d
--- /dev/null
+++ b/docs/api-reference/create-browser-profile.mdx
@@ -0,0 +1,120 @@
+---
+title: "Create Browser Profile"
+api: "POST /api/v1/browser-profiles"
+description: "Create a new browser profile with custom settings for ad blocking, proxy usage, and viewport dimensions."
+---
+
+Create a new browser profile with custom settings for ad blocking, proxy usage, and viewport dimensions.
+
+<Note>
+ Pay-as-you-go users can only have one profile. Subscription users can create
+ multiple profiles.
+</Note>
+
+### Request Body
+
+<ParamField body="profile_name" type="string" required>
+ Name of the browser profile
+</ParamField>
+<ParamField body="description" type="string" default="">
+ Description of the profile
+</ParamField>
+<ParamField body="persist" type="boolean" default="true">
+ Save cookies, local storage, and session data between tasks
+</ParamField>
+<ParamField body="ad_blocker" type="boolean" default="true">
+ Block ads and popups during automated tasks
+</ParamField>
+<ParamField body="proxy" type="boolean" default="true">
+ Route traffic through mobile proxies for better stealth
+</ParamField>
+<ParamField body="proxy_country_code" type="string" default="US">
+ Country code for the proxy
+</ParamField>
+<ParamField body="browser_viewport_width" type="integer" default="1280">
+ Browser viewport width in pixels
+</ParamField>
+<ParamField body="browser_viewport_height" type="integer" default="960">
+ Browser viewport height in pixels
+</ParamField>
+
+### Response
+
+<ResponseField name="profile_id" type="string">
+ Unique identifier for the created browser profile
+</ResponseField>
+<ResponseField name="profile_name" type="string">
+ Name of the browser profile
+</ResponseField>
+<ResponseField name="description" type="string">
+ Description of the profile
+</ResponseField>
+<ResponseField name="persist" type="boolean">
+ Save cookies, local storage, and session data between tasks
+</ResponseField>
+<ResponseField name="ad_blocker" type="boolean">
+ Block ads and popups during automated tasks
+</ResponseField>
+<ResponseField name="proxy" type="boolean">
+ Route traffic through mobile proxies for better stealth
+</ResponseField>
+<ResponseField name="proxy_country_code" type="string">
+ Country code for the proxy
+</ResponseField>
+<ResponseField name="browser_viewport_width" type="integer">
+ Browser viewport width in pixels
+</ResponseField>
+<ResponseField name="browser_viewport_height" type="integer">
+ Browser viewport height in pixels
+</ResponseField>
+
+<RequestExample>
+```python python
+import requests
+
+API_KEY = 'your_api_key_here'
+BASE_URL = 'https://api.browser-use.com/api/v1'
+HEADERS = {'Authorization': f'Bearer {API_KEY}'}
+
+profile_data = {
+"profile_name": "Default Profile",
+"description": "Main automation profile",
+"persist": true,
+"ad_blocker": true,
+"proxy": true,
+"proxy_country_code": "US",
+"browser_viewport_width": 1280,
+"browser_viewport_height": 960
+}
+
+response = requests.post(f'{BASE_URL}/browser-profiles', headers=HEADERS, json=profile_data)
+profile = response.json()
+print(profile)
+
+````
+
+```bash curl
+curl --request POST \
+ --url https://api.browser-use.com/api/v1/browser-profiles \
+ --header 'Authorization: Bearer <token>' \
+ --header 'Content-Type: application/json' \
+ --data '{"profile_name": "Default Profile", "description": "Main automation profile", "persist": true, "ad_blocker": true, "proxy": true, "proxy_country_code": "US", "browser_viewport_width": 1280, "browser_viewport_height": 960}'
+````
+
+</RequestExample>
+
+<ResponseExample>
+```json 200
+{
+ "profile_id": "profile_1234567890abcdef",
+ "profile_name": "Default Profile",
+ "description": "Main automation profile",
+ "persist": true,
+ "ad_blocker": true,
+ "proxy": true,
+ "proxy_country_code": "US",
+ "browser_viewport_width": 1280,
+ "browser_viewport_height": 960
+}
+```
+</ResponseExample>
diff --git a/docs/api-reference/delete-browser-profile.mdx b/docs/api-reference/delete-browser-profile.mdx
index 230b9c53e..e1955b307 100644
--- a/docs/api-reference/delete-browser-profile.mdx
+++ b/docs/api-reference/delete-browser-profile.mdx
@@ -1,17 +1,22 @@
---
-title: "Delete Browser Profile For User"
-api: "POST /api/v1/delete-browser-profile-for-user"
-description: "Deletes the browser profile for the user"
+title: "Delete Browser Profile"
+api: "DELETE /api/v1/browser-profiles/{profile_id}"
+description: "Deletes a browser profile. This will remove the profile and all associated browser data."
---
-Deletes the browser profile for the user. This is useful when you want to start with a fresh browser state, clearing all stored cookies, sessions, and browser data.
+Deletes a browser profile. This will remove the profile and all associated browser data. This action cannot be undone!
-## Response
+### Path Parameters
-The endpoint returns an empty response body with a 200 status code on success.
+<ParamField path="profile_id" type="string" required>
+ ID of the browser profile to delete
+</ParamField>
-<RequestExample>
+### Response
+
+A successful deletion returns an empty object.
+<RequestExample>
```python python
import requests
@@ -19,46 +24,22 @@ API_KEY = 'your_api_key_here'
BASE_URL = 'https://api.browser-use.com/api/v1'
HEADERS = {'Authorization': f'Bearer {API_KEY}'}
-response = requests.post(f'{BASE_URL}/delete-browser-profile-for-user', headers=HEADERS)
-if response.status_code == 200:
- print("Browser profile deleted successfully")
-else:
- print(f"Error deleting browser profile: {response.status_code}")
-```
+profile_id = 'profile_1234567890abcdef'
+response = requests.delete(f'{BASE_URL}/browser-profiles/{profile_id}', headers=HEADERS)
+print(response.json())
+
+````
```bash curl
-curl --request POST \
- --url https://api.browser-use.com/api/v1/delete-browser-profile-for-user \
+curl --request DELETE \
+ --url https://api.browser-use.com/api/v1/browser-profiles/profile_1234567890abcdef \
--header 'Authorization: Bearer <token>'
-```
+````
</RequestExample>
<ResponseExample>
-
-```json 200
-{}
-```
-
+ ```json 200
+ {}
+ ```
</ResponseExample>
-
-## What Gets Deleted
-
-When you delete your browser profile, the following data is removed:
-
-- **Cookies**: All stored cookies from previous sessions
-- **Session data**: Login sessions and authentication tokens
-- **Browser cache**: Cached resources and files
-- **Local storage**: Any data stored in browser local storage
-- **Browser history**: Previous browsing history within the automation environment
-
-## Usage Notes
-
-- This action affects all future tasks until you save browser data again
-- Useful for testing scenarios where you need a clean browser state
-- Does not affect tasks that are currently running
-- Browser profile deletion is immediate and cannot be undone
-
-<Info>
-This is particularly useful when you need to test login flows or scenarios that require a fresh browser state without any cached data.
-</Info>
diff --git a/docs/api-reference/get-browser-profile.mdx b/docs/api-reference/get-browser-profile.mdx
new file mode 100644
index 000000000..798af507e
--- /dev/null
+++ b/docs/api-reference/get-browser-profile.mdx
@@ -0,0 +1,82 @@
+---
+title: "Get Browser Profile"
+api: "GET /api/v1/browser-profiles/{profile_id}"
+description: "Returns information about a specific browser profile and its configuration settings."
+---
+
+Returns information about a specific browser profile and its configuration settings.
+
+### Path Parameters
+
+<ParamField path="profile_id" type="string" required>
+ ID of the browser profile to retrieve
+</ParamField>
+
+### Response
+
+<ResponseField name="profile_id" type="string">
+ Unique identifier for the browser profile
+</ResponseField>
+<ResponseField name="profile_name" type="string">
+ Name of the browser profile
+</ResponseField>
+<ResponseField name="description" type="string">
+ Description of the profile
+</ResponseField>
+<ResponseField name="persist" type="boolean">
+ Save cookies, local storage, and session data between tasks
+</ResponseField>
+<ResponseField name="ad_blocker" type="boolean">
+ Block ads and popups during automated tasks
+</ResponseField>
+<ResponseField name="proxy" type="boolean">
+ Route traffic through mobile proxies for better stealth
+</ResponseField>
+<ResponseField name="proxy_country_code" type="string">
+ Country code for the proxy
+</ResponseField>
+<ResponseField name="browser_viewport_width" type="integer">
+ Browser viewport width in pixels
+</ResponseField>
+<ResponseField name="browser_viewport_height" type="integer">
+ Browser viewport height in pixels
+</ResponseField>
+
+<RequestExample>
+```python python
+import requests
+
+API_KEY = 'your_api_key_here'
+BASE_URL = 'https://api.browser-use.com/api/v1'
+HEADERS = {'Authorization': f'Bearer {API_KEY}'}
+
+profile_id = 'profile_1234567890abcdef'
+response = requests.get(f'{BASE_URL}/browser-profiles/{profile_id}', headers=HEADERS)
+profile = response.json()
+print(profile)
+
+````
+
+```bash curl
+curl --request GET \
+ --url https://api.browser-use.com/api/v1/browser-profiles/profile_1234567890abcdef \
+ --header 'Authorization: Bearer <token>'
+````
+
+</RequestExample>
+
+<ResponseExample>
+```json 200
+{
+ "profile_id": "profile_1234567890abcdef",
+ "profile_name": "Default Profile",
+ "description": "Main automation profile",
+ "persist": true,
+ "ad_blocker": true,
+ "proxy": true,
+ "proxy_country_code": "US",
+ "browser_viewport_width": 1280,
+ "browser_viewport_height": 960
+}
+```
+</ResponseExample>
diff --git a/docs/api-reference/index.mdx b/docs/api-reference/index.mdx
index e7f738270..ece0776bf 100644
--- a/docs/api-reference/index.mdx
+++ b/docs/api-reference/index.mdx
@@ -70,13 +70,28 @@ Endpoints for uploading and managing files for task execution:
- [**Upload File Presigned URL**](/api-reference/files#upload-file-presigned-url) - `POST /api/v1/uploads/presigned-url` - Get presigned URL for file upload
+### Browser Profile Management
+
+Endpoints for managing your browser profiles:
+
+- [**Create Browser Profile**](/api-reference/create-browser-profile) - `POST /api/v1/browser-profiles` - Create a new browser profile
+- [**Get Browser Profile**](/api-reference/get-browser-profile) - `GET /api/v1/browser-profiles/{profile_id}` - Get a browser profile by ID
+- [**List Browser Profiles**](/api-reference/list-browser-profiles) - `GET /api/v1/browser-profiles` - List all browser profiles
+- [**Update Browser Profile**](/api-reference/update-browser-profile) - `PUT /api/v1/browser-profiles/{profile_id}` - Update a browser profile
+- [**Delete Browser Profile**](/api-reference/delete-browser-profile) - `DELETE /api/v1/browser-profiles/{profile_id}` - Delete a browser profile
+
### User Management
-Endpoints for managing your account, browser profiles, and checking credits:
+Endpoints for managing your account and checking credits:
- [**Check Balance**](/api-reference/user#check-balance) - `GET /api/v1/balance` - Check API credit balance
- [**Verify Authentication**](/api-reference/user#verify-authentication) - `GET /api/v1/me` - Verify API key validity
- [**Delete Browser Profile**](/api-reference/user#delete-browser-profile) - `POST /api/v1/delete-browser-profile-for-user` - Delete browser profile
+
+### Health Check
+
+Endpoints to verify if our Cloud API service is operational:
+
- [**Ping**](/api-reference/user#ping) - `GET /api/v1/ping` - Health check endpoint
## Response Format
diff --git a/docs/api-reference/list-browser-profiles.mdx b/docs/api-reference/list-browser-profiles.mdx
new file mode 100644
index 000000000..dbbff2102
--- /dev/null
+++ b/docs/api-reference/list-browser-profiles.mdx
@@ -0,0 +1,113 @@
+---
+title: "List Browser Profiles"
+api: "GET /api/v1/browser-profiles"
+description: "Returns a paginated list of all browser profiles belonging to the user."
+---
+
+Returns a paginated list of all browser profiles belonging to the user, ordered by creation date. Each profile includes configuration like ad blocker settings, proxy settings, and viewport dimensions.
+
+<Note>
+ Pay-as-you-go users can only have one profile. Subscription users can create
+ multiple profiles.
+</Note>
+
+### Query Parameters
+
+<ParamField query="page" type="integer" default="1">
+ Page number (minimum: 1)
+</ParamField>
+<ParamField query="limit" type="integer" default="10">
+ Number of items per page (minimum: 1)
+</ParamField>
+
+### Response
+
+<ResponseField name="profiles" type="array">
+ List of browser profiles
+ <ResponseField name="profile_id" type="string">
+ Unique identifier for the browser profile
+ </ResponseField>
+ <ResponseField name="profile_name" type="string">
+ Name of the browser profile
+ </ResponseField>
+ <ResponseField name="description" type="string">
+ Description of the profile
+ </ResponseField>
+ <ResponseField name="persist" type="boolean">
+ Save cookies, local storage, and session data between tasks
+ </ResponseField>
+ <ResponseField name="ad_blocker" type="boolean">
+ Block ads and popups during automated tasks
+ </ResponseField>
+ <ResponseField name="proxy" type="boolean">
+ Route traffic through mobile proxies for better stealth
+ </ResponseField>
+ <ResponseField name="proxy_country_code" type="string">
+ Country code for the proxy
+ </ResponseField>
+ <ResponseField name="browser_viewport_width" type="integer">
+ Browser viewport width in pixels
+ </ResponseField>
+ <ResponseField name="browser_viewport_height" type="integer">
+ Browser viewport height in pixels
+ </ResponseField>
+</ResponseField>
+<ResponseField name="total_pages" type="integer">
+ Total number of pages
+</ResponseField>
+<ResponseField name="page" type="integer">
+ Current page number
+</ResponseField>
+<ResponseField name="limit" type="integer">
+ Number of items per page
+</ResponseField>
+<ResponseField name="total_count" type="integer">
+ Total number of browser profiles
+</ResponseField>
+
+<RequestExample>
+```python python
+import requests
+
+API_KEY = 'your_api_key_here'
+BASE_URL = 'https://api.browser-use.com/api/v1'
+HEADERS = {'Authorization': f'Bearer {API_KEY}'}
+
+params = {'page': 1, 'limit': 10}
+response = requests.get(f'{BASE_URL}/browser-profiles', headers=HEADERS, params=params)
+profiles_data = response.json()
+print(profiles_data)
+
+````
+
+```bash curl
+curl --request GET \
+ --url https://api.browser-use.com/api/v1/browser-profiles \
+ --header 'Authorization: Bearer <token>'
+````
+
+</RequestExample>
+
+<ResponseExample>
+```json 200
+{
+ "profiles": [
+ {
+ "profile_id": "profile_1234567890abcdef",
+ "profile_name": "Default Profile",
+ "description": "Main automation profile",
+ "persist": true,
+ "ad_blocker": true,
+ "proxy": true,
+ "proxy_country_code": "US",
+ "browser_viewport_width": 1280,
+ "browser_viewport_height": 960
+ }
+ ],
+ "total_pages": 1,
+ "page": 1,
+ "limit": 10,
+ "total_count": 1
+}
+```
+</ResponseExample>
diff --git a/docs/api-reference/update-browser-profile.mdx b/docs/api-reference/update-browser-profile.mdx
new file mode 100644
index 000000000..818ae8fbc
--- /dev/null
+++ b/docs/api-reference/update-browser-profile.mdx
@@ -0,0 +1,111 @@
+---
+title: "Update Browser Profile"
+api: "PUT /api/v1/browser-profiles/{profile_id}"
+description: "Update a browser profile with partial updates. Only the fields you want to change need to be included."
+---
+
+Update a browser profile with partial updates. Only the fields you want to change need to be included.
+
+### Path Parameters
+
+<ParamField path="profile_id" type="string" required>
+ ID of the browser profile to update
+</ParamField>
+
+### Request Body
+
+<ParamField body="profile_name" type="string">
+ Name of the browser profile
+</ParamField>
+<ParamField body="description" type="string">
+ Description of the profile
+</ParamField>
+<ParamField body="persist" type="boolean">
+ Save cookies, local storage, and session data between tasks
+</ParamField>
+<ParamField body="ad_blocker" type="boolean">
+ Block ads and popups during automated tasks
+</ParamField>
+<ParamField body="proxy" type="boolean">
+ Route traffic through mobile proxies for better stealth
+</ParamField>
+<ParamField body="proxy_country_code" type="string">
+ Country code for the proxy
+</ParamField>
+<ParamField body="browser_viewport_width" type="integer">
+ Browser viewport width in pixels
+</ParamField>
+<ParamField body="browser_viewport_height" type="integer">
+ Browser viewport height in pixels
+</ParamField>
+
+### Response
+
+<ResponseField name="profile_id" type="string">
+ Unique identifier for the updated browser profile
+</ResponseField>
+<ResponseField name="profile_name" type="string">
+ Name of the browser profile
+</ResponseField>
+<ResponseField name="description" type="string">
+ Description of the profile
+</ResponseField>
+<ResponseField name="persist" type="boolean">
+ Save cookies, local storage, and session data between tasks
+</ResponseField>
+<ResponseField name="ad_blocker" type="boolean">
+ Block ads and popups during automated tasks
+</ResponseField>
+<ResponseField name="proxy" type="boolean">
+ Route traffic through mobile proxies for better stealth
+</ResponseField>
+<ResponseField name="proxy_country_code" type="string">
+ Country code for the proxy
+</ResponseField>
+<ResponseField name="browser_viewport_width" type="integer">
+ Browser viewport width in pixels
+</ResponseField>
+<ResponseField name="browser_viewport_height" type="integer">
+ Browser viewport height in pixels
+</ResponseField>
+
+<RequestExample>
+```python python
+import requests
+
+API_KEY = 'your_api_key_here'
+BASE_URL = 'https://api.browser-use.com/api/v1'
+HEADERS = {'Authorization': f'Bearer {API_KEY}'}
+
+profile_id = 'profile_1234567890abcdef'
+update_data = {"ad_blocker": false}
+response = requests.put(f'{BASE_URL}/browser-profiles/{profile_id}', headers=HEADERS, json=update_data)
+print(response.json())
+
+````
+
+```bash curl
+curl --request PUT \
+ --url https://api.browser-use.com/api/v1/browser-profiles/profile_1234567890abcdef \
+ --header 'Authorization: Bearer <token>' \
+ --header 'Content-Type: application/json' \
+ --data '{"ad_blocker": false}'
+````
+
+</RequestExample>
+
+<ResponseExample>
+```json 200
+{
+ "profile_id": "profile_1234567890abcdef",
+ "profile_name": "Default Profile",
+ "description": "Main automation profile",
+ "persist": true,
+ "ad_blocker": false,
+ "proxy": true,
+ "proxy_country_code": "US",
+ "browser_viewport_width": 1280,
+ "browser_viewport_height": 960
+}
+```
+</ResponseExample>