API Endpoints
Create saved task
Create a reusable saved task using natural language instructions. This is useful for automating recurring workflows with predefined settings.
POST
/
saved_tasks
Create a saved task
curl --request POST \
--url https://browser.ai/api/v1/saved_tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "MySavedTask",
"instructions": [
{
"action": "Open amazon.com, search for AirPods Pro 2, and find the three best prices available"
}
],
"type": "natural_language",
"project": "Project_1",
"geoLocation": {
"country": "<string>",
"city": "<string>",
"zipcode": "<string>"
},
"cron_settings": ""
}
'import requests
url = "https://browser.ai/api/v1/saved_tasks"
payload = {
"name": "MySavedTask",
"instructions": [{ "action": "Open amazon.com, search for AirPods Pro 2, and find the three best prices available" }],
"type": "natural_language",
"project": "Project_1",
"geoLocation": {
"country": "<string>",
"city": "<string>",
"zipcode": "<string>"
},
"cron_settings": ""
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'MySavedTask',
instructions: [
{
action: 'Open amazon.com, search for AirPods Pro 2, and find the three best prices available'
}
],
type: 'natural_language',
project: 'Project_1',
geoLocation: {country: '<string>', city: '<string>', zipcode: '<string>'},
cron_settings: ''
})
};
fetch('https://browser.ai/api/v1/saved_tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://browser.ai/api/v1/saved_tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'MySavedTask',
'instructions' => [
[
'action' => 'Open amazon.com, search for AirPods Pro 2, and find the three best prices available'
]
],
'type' => 'natural_language',
'project' => 'Project_1',
'geoLocation' => [
'country' => '<string>',
'city' => '<string>',
'zipcode' => '<string>'
],
'cron_settings' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://browser.ai/api/v1/saved_tasks"
payload := strings.NewReader("{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://browser.ai/api/v1/saved_tasks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://browser.ai/api/v1/saved_tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"message": "Saved task created successfully"
}{
"error": "Invalid input"
}{
"error": "Unauthorized"
}{
"error": "Internal server error"
}Authorizations
Insert API token, use the format: apikey <API-TOKEN>.
Body
application/json
Name of the saved task
Example:
"MySavedTask"
List of natural language actions
Show child attributes
Show child attributes
Type of the task. Currently only natural_language is supported.
Available options:
natural_language Example:
"natural_language"
Project name or ID
Example:
"Project_1"
Show child attributes
Show child attributes
Cron expression for scheduling (leave empty for now)
Example:
""
⌘I
Create a saved task
curl --request POST \
--url https://browser.ai/api/v1/saved_tasks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "MySavedTask",
"instructions": [
{
"action": "Open amazon.com, search for AirPods Pro 2, and find the three best prices available"
}
],
"type": "natural_language",
"project": "Project_1",
"geoLocation": {
"country": "<string>",
"city": "<string>",
"zipcode": "<string>"
},
"cron_settings": ""
}
'import requests
url = "https://browser.ai/api/v1/saved_tasks"
payload = {
"name": "MySavedTask",
"instructions": [{ "action": "Open amazon.com, search for AirPods Pro 2, and find the three best prices available" }],
"type": "natural_language",
"project": "Project_1",
"geoLocation": {
"country": "<string>",
"city": "<string>",
"zipcode": "<string>"
},
"cron_settings": ""
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'MySavedTask',
instructions: [
{
action: 'Open amazon.com, search for AirPods Pro 2, and find the three best prices available'
}
],
type: 'natural_language',
project: 'Project_1',
geoLocation: {country: '<string>', city: '<string>', zipcode: '<string>'},
cron_settings: ''
})
};
fetch('https://browser.ai/api/v1/saved_tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://browser.ai/api/v1/saved_tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'MySavedTask',
'instructions' => [
[
'action' => 'Open amazon.com, search for AirPods Pro 2, and find the three best prices available'
]
],
'type' => 'natural_language',
'project' => 'Project_1',
'geoLocation' => [
'country' => '<string>',
'city' => '<string>',
'zipcode' => '<string>'
],
'cron_settings' => ''
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://browser.ai/api/v1/saved_tasks"
payload := strings.NewReader("{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://browser.ai/api/v1/saved_tasks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://browser.ai/api/v1/saved_tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"MySavedTask\",\n \"instructions\": [\n {\n \"action\": \"Open amazon.com, search for AirPods Pro 2, and find the three best prices available\"\n }\n ],\n \"type\": \"natural_language\",\n \"project\": \"Project_1\",\n \"geoLocation\": {\n \"country\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\"\n },\n \"cron_settings\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"message": "Saved task created successfully"
}{
"error": "Invalid input"
}{
"error": "Unauthorized"
}{
"error": "Internal server error"
}