curl --request POST \
--url https://api.skyvern.com/v1/run/tasks \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Find the top 3 posts on Hacker News.",
"url": "https://www.hackernews.com",
"engine": "skyvern-2.0",
"title": "The title of my first skyvern task",
"proxy_location": "RESIDENTIAL",
"data_extraction_schema": {},
"error_code_mapping": {
"login_failed": "The login credentials are incorrect or the account is locked"
},
"max_steps": 10,
"webhook_url": "https://my-site.com/webhook",
"totp_identifier": "john.doe@example.com",
"totp_url": "https://my-totp-service.com/totp",
"browser_session_id": "pbs_123",
"model": {},
"extra_http_headers": {},
"publish_workflow": false,
"include_action_history_in_verification": false,
"max_screenshot_scrolls": 123,
"browser_address": "http://127.0.0.1:9222",
"run_with": "agent"
}
'{
"run_id": "tsk_123",
"status": "created",
"created_at": "2025-01-01T00:00:00Z",
"modified_at": "2025-01-01T00:05:00Z",
"run_type": "task_v1",
"output": {},
"downloaded_files": [
{
"url": "<string>",
"checksum": "<string>",
"filename": "<string>",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"recording_url": "<string>",
"screenshot_urls": [
"<string>"
],
"failure_reason": "<string>",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"app_url": "https://app.skyvern.com/tasks/tsk_123",
"browser_session_id": "pbs_123",
"browser_profile_id": "bp_123",
"max_screenshot_scrolls": 123,
"script_run": {
"ai_fallback_triggered": false
},
"errors": [
{}
],
"step_count": 123,
"run_request": {
"prompt": "Find the top 3 posts on Hacker News.",
"url": "https://www.hackernews.com",
"engine": "skyvern-2.0",
"title": "The title of my first skyvern task",
"proxy_location": "RESIDENTIAL",
"data_extraction_schema": {},
"error_code_mapping": {
"login_failed": "The login credentials are incorrect or the account is locked"
},
"max_steps": 10,
"webhook_url": "https://my-site.com/webhook",
"totp_identifier": "john.doe@example.com",
"totp_url": "https://my-totp-service.com/totp",
"browser_session_id": "pbs_123",
"model": {},
"extra_http_headers": {},
"publish_workflow": false,
"include_action_history_in_verification": false,
"max_screenshot_scrolls": 123,
"browser_address": "http://127.0.0.1:9222",
"run_with": "agent"
}
}Run a task
curl --request POST \
--url https://api.skyvern.com/v1/run/tasks \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Find the top 3 posts on Hacker News.",
"url": "https://www.hackernews.com",
"engine": "skyvern-2.0",
"title": "The title of my first skyvern task",
"proxy_location": "RESIDENTIAL",
"data_extraction_schema": {},
"error_code_mapping": {
"login_failed": "The login credentials are incorrect or the account is locked"
},
"max_steps": 10,
"webhook_url": "https://my-site.com/webhook",
"totp_identifier": "john.doe@example.com",
"totp_url": "https://my-totp-service.com/totp",
"browser_session_id": "pbs_123",
"model": {},
"extra_http_headers": {},
"publish_workflow": false,
"include_action_history_in_verification": false,
"max_screenshot_scrolls": 123,
"browser_address": "http://127.0.0.1:9222",
"run_with": "agent"
}
'{
"run_id": "tsk_123",
"status": "created",
"created_at": "2025-01-01T00:00:00Z",
"modified_at": "2025-01-01T00:05:00Z",
"run_type": "task_v1",
"output": {},
"downloaded_files": [
{
"url": "<string>",
"checksum": "<string>",
"filename": "<string>",
"modified_at": "2023-11-07T05:31:56Z"
}
],
"recording_url": "<string>",
"screenshot_urls": [
"<string>"
],
"failure_reason": "<string>",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"app_url": "https://app.skyvern.com/tasks/tsk_123",
"browser_session_id": "pbs_123",
"browser_profile_id": "bp_123",
"max_screenshot_scrolls": 123,
"script_run": {
"ai_fallback_triggered": false
},
"errors": [
{}
],
"step_count": 123,
"run_request": {
"prompt": "Find the top 3 posts on Hacker News.",
"url": "https://www.hackernews.com",
"engine": "skyvern-2.0",
"title": "The title of my first skyvern task",
"proxy_location": "RESIDENTIAL",
"data_extraction_schema": {},
"error_code_mapping": {
"login_failed": "The login credentials are incorrect or the account is locked"
},
"max_steps": 10,
"webhook_url": "https://my-site.com/webhook",
"totp_identifier": "john.doe@example.com",
"totp_url": "https://my-totp-service.com/totp",
"browser_session_id": "pbs_123",
"model": {},
"extra_http_headers": {},
"publish_workflow": false,
"include_action_history_in_verification": false,
"max_screenshot_scrolls": 123,
"browser_address": "http://127.0.0.1:9222",
"run_with": "agent"
}
}Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.
The goal or task description for Skyvern to accomplish
"Find the top 3 posts on Hacker News."
The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
"https://www.hackernews.com"
The engine that powers the agent task. The default value is skyvern-2.0, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. skyvern-1.0 is good for simple tasks like filling a form, or searching for information on Google. The openai-cua engine uses OpenAI's CUA model. The anthropic-cua uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.
skyvern-1.0, skyvern-2.0, openai-cua, anthropic-cua, ui-tars The title for the task
"The title of my first skyvern task"
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
Available geotargeting options:
RESIDENTIAL, US-CA, US-NY, US-TX, US-FL, US-WA, RESIDENTIAL_ES, RESIDENTIAL_IE, RESIDENTIAL_GB, RESIDENTIAL_IN, RESIDENTIAL_JP, RESIDENTIAL_FR, RESIDENTIAL_DE, RESIDENTIAL_NZ, RESIDENTIAL_ZA, RESIDENTIAL_AR, RESIDENTIAL_AU, RESIDENTIAL_BR, RESIDENTIAL_TR, RESIDENTIAL_CA, RESIDENTIAL_MX, RESIDENTIAL_IT, RESIDENTIAL_NL, RESIDENTIAL_PH, RESIDENTIAL_ISP, NONE The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/.
Custom mapping of error codes to error messages if Skyvern encounters an error.
Show child attributes
{
"login_failed": "The login credentials are incorrect or the account is locked"
}Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact sales@skyvern.com for custom pricing.
10
After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details.
"https://my-site.com/webhook"
Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.
"john.doe@example.com"
URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.
"https://my-totp-service.com/totp"
Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off.
"pbs_123"
Optional model configuration.
The extra HTTP headers for the requests in browser.
Show child attributes
Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
Whether to include action history when verifying that the task is complete
The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.
The CDP address for the task.
"http://127.0.0.1:9222"
Whether to run the task with agent or code.
"agent"
Successfully run task
Unique identifier for this run. Run ID starts with tsk_ for task runs and wr_ for workflow runs.
"tsk_123"
Current status of the run
created, queued, running, timed_out, failed, terminated, completed, canceled "created"
Timestamp when this run was created
"2025-01-01T00:00:00Z"
Timestamp when this run was last modified
"2025-01-01T00:05:00Z"
Types of a task run - task_v1, task_v2, openai_cua, anthropic_cua, ui_tars
task_v1, task_v2, openai_cua, anthropic_cua, ui_tars Output data from the run, if any. Format/schema depends on the data extracted by the run.
List of files downloaded during the run
Show child attributes
URL to the recording of the run
List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot.
Reason for failure if the run failed or terminated
Timestamp when this run was queued
Timestamp when this run started execution
Timestamp when this run finished
URL to the application UI where the run can be viewed
"https://app.skyvern.com/tasks/tsk_123"
ID of the Skyvern persistent browser session used for this run
"pbs_123"
ID of the browser profile used for this run
"bp_123"
The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot
The script run result
Show child attributes
The errors for the run
Total number of steps executed in this run
The original request parameters used to start this task run
Show child attributes