curl --request POST \
--url https://agent.tinyfish.ai/v1/automation/run-sse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": true,
"snapshots": true,
"screenshots": true,
"recording": true,
"html": true
},
"webhook_url": "<string>",
"use_vault": true,
"use_profile": true,
"profile_id": "prof_abc123def4567890",
"credential_item_ids": [
"cred:conn-abc:Work:item-123",
"cred:conn-def:Personal:item-456"
],
"output_schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
}
}
'import requests
url = "https://agent.tinyfish.ai/v1/automation/run-sse"
payload = {
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": True,
"snapshots": True,
"screenshots": True,
"recording": True,
"html": True
},
"webhook_url": "<string>",
"use_vault": True,
"use_profile": True,
"profile_id": "prof_abc123def4567890",
"credential_item_ids": ["cred:conn-abc:Work:item-123", "cred:conn-def:Personal:item-456"],
"output_schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com',
goal: 'Find the pricing page and extract all plan details',
browser_profile: 'lite',
api_integration: 'dify',
agent_config: {
mode: 'strict',
cursor_style: 'standard',
max_steps: 50,
max_duration_seconds: 300
},
capture_config: {
elements: true,
snapshots: true,
screenshots: true,
recording: true,
html: true
},
webhook_url: '<string>',
use_vault: true,
use_profile: true,
profile_id: 'prof_abc123def4567890',
credential_item_ids: ['cred:conn-abc:Work:item-123', 'cred:conn-def:Personal:item-456'],
output_schema: {
type: 'object',
properties: {title: {type: 'string'}, price: {type: 'number'}},
required: ['title', 'price']
}
})
};
fetch('https://agent.tinyfish.ai/v1/automation/run-sse', 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://agent.tinyfish.ai/v1/automation/run-sse",
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([
'url' => 'https://example.com',
'goal' => 'Find the pricing page and extract all plan details',
'browser_profile' => 'lite',
'api_integration' => 'dify',
'agent_config' => [
'mode' => 'strict',
'cursor_style' => 'standard',
'max_steps' => 50,
'max_duration_seconds' => 300
],
'capture_config' => [
'elements' => true,
'snapshots' => true,
'screenshots' => true,
'recording' => true,
'html' => true
],
'webhook_url' => '<string>',
'use_vault' => true,
'use_profile' => true,
'profile_id' => 'prof_abc123def4567890',
'credential_item_ids' => [
'cred:conn-abc:Work:item-123',
'cred:conn-def:Personal:item-456'
],
'output_schema' => [
'type' => 'object',
'properties' => [
'title' => [
'type' => 'string'
],
'price' => [
'type' => 'number'
]
],
'required' => [
'title',
'price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/automation/run-sse"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://agent.tinyfish.ai/v1/automation/run-sse")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/automation/run-sse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body"data: {\"type\":\"STARTED\",\"run_id\":\"run_123\",\"timestamp\":\"2025-01-01T00:00:00Z\"}\n\ndata: {\"type\":\"STREAMING_URL\",\"run_id\":\"run_123\",\"streaming_url\":\"https://...\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"PROGRESS\",\"run_id\":\"run_123\",\"purpose\":\"Clicking submit button\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"COMPLETE\",\"run_id\":\"run_123\",\"status\":\"COMPLETED\",\"result\":{...},\"timestamp\":\"...\"}"{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}Run browser automation with SSE streaming
Execute a browser automation task with Server-Sent Events (SSE) streaming. Returns a real-time event stream with automation progress, browser streaming URL, and final results.
curl --request POST \
--url https://agent.tinyfish.ai/v1/automation/run-sse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": true,
"snapshots": true,
"screenshots": true,
"recording": true,
"html": true
},
"webhook_url": "<string>",
"use_vault": true,
"use_profile": true,
"profile_id": "prof_abc123def4567890",
"credential_item_ids": [
"cred:conn-abc:Work:item-123",
"cred:conn-def:Personal:item-456"
],
"output_schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
}
}
'import requests
url = "https://agent.tinyfish.ai/v1/automation/run-sse"
payload = {
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": True,
"snapshots": True,
"screenshots": True,
"recording": True,
"html": True
},
"webhook_url": "<string>",
"use_vault": True,
"use_profile": True,
"profile_id": "prof_abc123def4567890",
"credential_item_ids": ["cred:conn-abc:Work:item-123", "cred:conn-def:Personal:item-456"],
"output_schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com',
goal: 'Find the pricing page and extract all plan details',
browser_profile: 'lite',
api_integration: 'dify',
agent_config: {
mode: 'strict',
cursor_style: 'standard',
max_steps: 50,
max_duration_seconds: 300
},
capture_config: {
elements: true,
snapshots: true,
screenshots: true,
recording: true,
html: true
},
webhook_url: '<string>',
use_vault: true,
use_profile: true,
profile_id: 'prof_abc123def4567890',
credential_item_ids: ['cred:conn-abc:Work:item-123', 'cred:conn-def:Personal:item-456'],
output_schema: {
type: 'object',
properties: {title: {type: 'string'}, price: {type: 'number'}},
required: ['title', 'price']
}
})
};
fetch('https://agent.tinyfish.ai/v1/automation/run-sse', 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://agent.tinyfish.ai/v1/automation/run-sse",
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([
'url' => 'https://example.com',
'goal' => 'Find the pricing page and extract all plan details',
'browser_profile' => 'lite',
'api_integration' => 'dify',
'agent_config' => [
'mode' => 'strict',
'cursor_style' => 'standard',
'max_steps' => 50,
'max_duration_seconds' => 300
],
'capture_config' => [
'elements' => true,
'snapshots' => true,
'screenshots' => true,
'recording' => true,
'html' => true
],
'webhook_url' => '<string>',
'use_vault' => true,
'use_profile' => true,
'profile_id' => 'prof_abc123def4567890',
'credential_item_ids' => [
'cred:conn-abc:Work:item-123',
'cred:conn-def:Personal:item-456'
],
'output_schema' => [
'type' => 'object',
'properties' => [
'title' => [
'type' => 'string'
],
'price' => [
'type' => 'number'
]
],
'required' => [
'title',
'price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/automation/run-sse"
payload := strings.NewReader("{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://agent.tinyfish.ai/v1/automation/run-sse")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/automation/run-sse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"profile_id\": \"prof_abc123def4567890\",\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ],\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body"data: {\"type\":\"STARTED\",\"run_id\":\"run_123\",\"timestamp\":\"2025-01-01T00:00:00Z\"}\n\ndata: {\"type\":\"STREAMING_URL\",\"run_id\":\"run_123\",\"streaming_url\":\"https://...\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"PROGRESS\",\"run_id\":\"run_123\",\"purpose\":\"Clicking submit button\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"COMPLETE\",\"run_id\":\"run_123\",\"status\":\"COMPLETED\",\"result\":{...},\"timestamp\":\"...\"}"{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}Authorizations
API key for authentication. Get your key from the API Keys page.
Body
Automation task parameters
Target website URL to automate
"https://example.com"
Natural language description of what to accomplish on the website
1"Find the pricing page and extract all plan details"
Browser profile for execution. LITE uses standard browser, STEALTH uses anti-detection browser.
lite, stealth "lite"
Name of the integration making this API call (e.g., "dify", "zapier", "n8n"). Used for analytics.
"dify"
Agent behavior configuration
Show child attributes
Show child attributes
Configure which data to capture during the run.
Show child attributes
Show child attributes
HTTPS URL to receive webhook notifications for run lifecycle events. Must use HTTPS.
Opt-in to vault credentials for this run. When true, enabled vault items are included. Defaults to false.
true
Opt-in to the default Browser Context Profile if Browser Context Profiles are enabled; legacy callers are silently ignored when the profiles feature is disabled. Returns 400 when enabled but no default profile is set.
true
Browser Context Profile ID to use when use_profile is true.
1"prof_abc123def4567890"
Scope vault credentials to specific credential URIs. Requires use_vault to be true. If omitted with use_vault: true, all enabled items are used.
11[
"cred:conn-abc:Work:item-123",
"cred:conn-def:Personal:item-456"
]
Proxy configuration
Show child attributes
Show child attributes
Optional provider-supported structured-output schema subset for the run result. Unsupported fields are rejected before the request is accepted.
Show child attributes
Show child attributes
{
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
Response
Server-Sent Events stream. Stream sends STARTED, STREAMING_URL (optional), PROGRESS (intermediate events with purpose), COMPLETE events, plus periodic HEARTBEAT messages.
Was this page helpful?