Skip to main content
POST
/
v1
/
run
/
tasks
/
download_files
File Download Task
curl --request POST \
  --url https://api.skyvern.com/v1/run/tasks/download_files \
  --header 'Content-Type: application/json' \
  --data '
{
  "navigation_goal": "<string>",
  "url": "<string>",
  "webhook_url": "<string>",
  "proxy_location": "RESIDENTIAL",
  "totp_identifier": "<string>",
  "totp_url": "<string>",
  "browser_session_id": "pbs_123456",
  "browser_profile_id": "<string>",
  "browser_address": "http://127.0.0.1:9222",
  "extra_http_headers": {},
  "max_screenshot_scrolling_times": 123,
  "download_suffix": "<string>",
  "download_timeout": 123,
  "max_steps_per_run": 123
}
'
{
  "run_id": "tsk_123",
  "status": "created",
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:05:00Z",
  "run_type": "workflow_run",
  "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_with": "agent",
  "ai_fallback": true,
  "run_request": {
    "workflow_id": "wpid_123",
    "parameters": {},
    "title": "<string>",
    "proxy_location": "RESIDENTIAL",
    "webhook_url": "<string>",
    "totp_url": "https://my-totp-service.com/totp",
    "totp_identifier": "john.doe@example.com",
    "browser_session_id": "<string>",
    "browser_profile_id": "<string>",
    "max_screenshot_scrolls": 123,
    "extra_http_headers": {},
    "browser_address": "http://127.0.0.1:9222",
    "ai_fallback": true,
    "run_with": "<string>"
  }
}

Headers

x-api-key
string | null

Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

Body

application/json
navigation_goal
string
required

Instructions for navigating to and downloading the file

url
string | null

Website URL

webhook_url
string | null

Webhook URL to send status updates

proxy_location
enum<string> | null

Proxy location to use

Available 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
totp_identifier
string | null

Identifier for TOTP (Time-based One-Time Password) if required

totp_url
string | null

TOTP URL to fetch one-time passwords

browser_session_id
string | null

ID of the browser session to use, which is prefixed by pbs_ e.g. pbs_123456

Example:

"pbs_123456"

browser_profile_id
string | null

ID of a browser profile to reuse for this run

browser_address
string | null

The CDP address for the task.

Example:

"http://127.0.0.1:9222"

extra_http_headers
Extra Http Headers · object

Additional HTTP headers to include in requests

max_screenshot_scrolling_times
integer | null

Maximum number of times to scroll for screenshots

download_suffix
string | null

Suffix or complete filename for the downloaded file

download_timeout
number | null

Timeout in seconds for the download operation

max_steps_per_run
integer | null

Maximum number of steps to execute

Response

Successful Response

run_id
string
required

Unique identifier for this run. Run ID starts with tsk_ for task runs and wr_ for workflow runs.

Example:

"tsk_123"

status
enum<string>
required

Current status of the run

Available options:
created,
queued,
running,
timed_out,
failed,
terminated,
completed,
canceled
Example:

"created"

created_at
string<date-time>
required

Timestamp when this run was created

Example:

"2025-01-01T00:00:00Z"

modified_at
string<date-time>
required

Timestamp when this run was last modified

Example:

"2025-01-01T00:05:00Z"

run_type
enum<string>
required

Type of run - always workflow_run for workflow runs

Available options:
workflow_run
output

Output data from the run, if any. Format/schema depends on the data extracted by the run.

downloaded_files
FileInfo · object[] | null

List of files downloaded during the run

recording_url
string | null

URL to the recording of the run

screenshot_urls
string[] | null

List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot.

failure_reason
string | null

Reason for failure if the run failed or terminated

queued_at
string<date-time> | null

Timestamp when this run was queued

started_at
string<date-time> | null

Timestamp when this run started execution

finished_at
string<date-time> | null

Timestamp when this run finished

app_url
string | null

URL to the application UI where the run can be viewed

Example:

"https://app.skyvern.com/tasks/tsk_123"

browser_session_id
string | null

ID of the Skyvern persistent browser session used for this run

Example:

"pbs_123"

browser_profile_id
string | null

ID of the browser profile used for this run

Example:

"bp_123"

max_screenshot_scrolls
integer | null

The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot

script_run
ScriptRunResponse · object

The script run result

errors
Errors · object[] | null

The errors for the run

step_count
integer | null

Total number of steps executed in this run

run_with
string | null

Whether the workflow run was executed with agent or code

Example:

"agent"

ai_fallback
boolean | null

Whether to fallback to AI if code run fails.

run_request
WorkflowRunRequest · object

The original request parameters used to start this workflow run