Skip to main content
Navigate to a page and download files.
Python’s download_files does not support wait_for_completion - it returns immediately with a run_id. Poll with get_run() or use a webhook to know when the download finishes. The TypeScript SDK does support waitForCompletion on downloadFiles.
result = await client.download_files(
    navigation_goal="Download the latest monthly report PDF",
    url="https://app.example.com/reports",
)

# Poll for completion
import asyncio
while True:
    run = await client.get_run(result.run_id)
    if run.status in ("completed", "failed", "terminated", "timed_out", "canceled"):
        break
    await asyncio.sleep(5)

for f in run.downloaded_files:
    print(f.name)

Parameters

ParameterTypeRequiredDefaultDescription
navigation_goalstrYes-Natural language description of what to download.
urlstrNoNoneStarting page URL.
browser_session_idstrNoNoneRun inside an existing browser session.
browser_profile_idstrNoNoneLoad a browser profile.
proxy_locationProxyLocationNoNoneRoute through a geographic proxy.
webhook_urlstrNoNoneURL to receive a POST when the download finishes.
download_suffixstrNoNoneExpected file extension to wait for (e.g., ".pdf").
download_timeoutfloatNoNoneMax time to wait for the download in seconds.
max_steps_per_runintNoNoneCap AI steps.
extra_http_headersdict[str, str]NoNoneAdditional HTTP headers.
totp_identifierstrNoNoneIdentifier for TOTP verification.
totp_urlstrNoNoneURL to receive TOTP codes.
browser_addressstrNoNoneConnect to a browser at this CDP address.
max_screenshot_scrolling_timesintNoNoneNumber of screenshot scrolls.
waitForCompletion (TS only)booleanNofalseBlock until the download finishes.
timeout (TS only)numberNo1800Max wait time in seconds.
request_optionsRequestOptionsNoNonePer-request configuration (see below).

Returns WorkflowRunResponse

The downloaded_files field contains the list of files that were downloaded.

Request options

Override timeout, retries, or headers for this call by passing request_options (Python) or a second options argument (TypeScript).
from skyvern.client.core import RequestOptions

request_options=RequestOptions(
    timeout_in_seconds=120,
    max_retries=3,
    additional_headers={"x-custom-header": "value"},
)
Option (Python)Option (TypeScript)TypeDescription
timeout_in_secondstimeoutInSecondsint / numberHTTP timeout in seconds.
max_retriesmaxRetriesint / numberRetry count.
additional_headersheadersdict / Record<string, string>Extra headers.
additional_query_parameters-dictExtra query parameters.
additional_body_parameters-dictExtra body parameters.
-abortSignalAbortSignalSignal to cancel the request.
-apiKeystringOverride API key.