Skip to content

Skyvern: File Download Task

Skyvern tasks.downloadFiles: arguments, response, policy and SDK examples.

← Tasks operations · Get started

Operation skyvern.download_files_v1_run_tasks_download_files_post

Provider route: POST /v1/run/tasks/download_files. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/skyvern with npm, or alter-sdk-skyvern with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SkyvernIntegration } from "@alter-ai/skyvern";
async function execute(input: Parameters<SkyvernIntegration["tasks"]["downloadFiles"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SkyvernIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.tasks.downloadFiles(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_skyvern import SkyvernIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SkyvernIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.tasks.download_files(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
headersobjectOptionalAdditional keys: not allowed
headers.x-user-agentJSONOptional
headers.x-user-agent (anyOf 1)stringAlternative
headers.x-user-agent (anyOf 2)nullAlternative
bodyModelRequired within parentExpand File Download Task — request body — body

Referenced models: File Download Task — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Login Task — response body

Referenced models: Login Task — response body

3 more schemas are linked from the tables above, on the schema pages.

File Download Task — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
browser_addressJSONOptionalThe CDP address for the task.
browser_address (anyOf 1)stringAlternative
browser_address (anyOf 2)nullAlternative
browser_profile_idJSONOptionalID of a browser profile to reuse for this run
browser_profile_id (anyOf 1)stringAlternative
browser_profile_id (anyOf 2)nullAlternative
browser_session_idJSONOptionalID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
browser_session_id (anyOf 1)stringAlternative
browser_session_id (anyOf 2)nullAlternative
cdp_connect_headersJSONOptionalHTTP headers attached ONLY to the CDP WebSocket handshake when connecting to a remote browser via browser_address. Never forwarded to target websites.
cdp_connect_headers (anyOf 1)objectAlternativeAdditional keys: see wildcard field
cdp_connect_headers (anyOf 1).*stringAdditional keys
cdp_connect_headers (anyOf 2)nullAlternative
download_suffixJSONOptionalComplete filename for the downloaded file. Supports {{ original_filename }}, which keeps the name the site gave the file, so {{ original_filename }} alone preserves it and prefix_{{ original_filename }} prefixes it. The source extension is used unless the configured filename includes an extension, which overrides it. {{ original_filename }} must be a standalone interpolation without filters or other transformations.
download_suffix (anyOf 1)stringAlternative
download_suffix (anyOf 2)nullAlternative
download_timeoutJSONOptionalTimeout in seconds for the download operation
download_timeout (anyOf 1)numberAlternative
download_timeout (anyOf 2)nullAlternative
extra_http_headersJSONOptionalAdditional HTTP headers to include in requests
extra_http_headers (anyOf 1)objectAlternativeAdditional keys: see wildcard field
extra_http_headers (anyOf 1).*stringAdditional keys
extra_http_headers (anyOf 2)nullAlternative
max_screenshot_scrolling_timesJSONOptionalMaximum number of times to scroll for screenshots
max_screenshot_scrolling_times (anyOf 1)integerAlternative
max_screenshot_scrolling_times (anyOf 2)nullAlternative
max_steps_per_runJSONOptionalMaximum number of steps to execute
max_steps_per_run (anyOf 1)integerAlternative
max_steps_per_run (anyOf 2)nullAlternative
navigation_goalstringRequired within parentInstructions for navigating to and downloading the file
proxy_locationJSONOptionalProxy location to use
proxy_location (anyOf 1)stringAlternativeOne of: 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_KR, RESIDENTIAL_SA, RESIDENTIAL_ISP, NONE
proxy_location (anyOf 2)nullAlternative
start_fresh_browserbooleanOptionalWhen true, start this run from a fresh, empty browser and ignore any saved browser memory — no memory is read or written. A verified sign-in during the run still updates the credential's saved login.
Default: false
totp_identifierJSONOptionalIdentifier for TOTP (Time-based One-Time Password) if required
totp_identifier (anyOf 1)stringAlternative
totp_identifier (anyOf 2)nullAlternative
totp_urlJSONOptionalTOTP URL to fetch one-time passwords
totp_url (anyOf 1)stringAlternative
totp_url (anyOf 2)nullAlternative
urlJSONOptionalWebsite URL
url (anyOf 1)stringAlternative
url (anyOf 2)nullAlternative
webhook_urlJSONOptionalWebhook URL to send status updates
webhook_url (anyOf 1)stringAlternative
webhook_url (anyOf 2)nullAlternative
Login Task — response body — browser seed source string
FieldTypePresenceDescription and constraints
$stringRootWhich layer of the seed-precedence chain seeded a run's browser (provenance).

Resolved once at run setup, before any browser creation, for all run types (C-semantics).
- override: explicit request browser_profile_id (one-run-only pick via API)
- picked: the workflow's explicit profile pick (workflows.browser_profile_id) — "always start here"
- own_memory: the workflow's own auto-profile (no pick + persist_browser_session)
- credential: the run's selected credential's profile (rotation-aware; also the empty-own boot)
- fresh: no seed profile
- degraded_fresh: a resolved profile failed to load; ran fresh
Known values: override, picked, own_memory, credential, fresh, degraded_fresh
Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown
FieldTypePresenceDescription and constraints
$objectRoot
actual_timezone_idJSONOptionalThe timezone the browser reported when measured, or null when it could not be measured.
actual_timezone_id (anyOf 1)stringAlternative
actual_timezone_id (anyOf 2)nullAlternative
requested_timezone_idstringRequired within parentThe timezone that was requested.
sourcestringRequired within parentWhere the requested setting came from.
Known values: workflow_version, session_request, existing_session
statusstringRequired within parent`verified` when the browser reported the requested timezone or an IANA alias of it (Chromium reports `Asia/Calcutta` for `Asia/Kolkata`), `mismatch` when it reported another zone, `unapplied` when the browser already existed and was left unchanged, `unknown` when it could not be measured.
Known values: verified, mismatch, unapplied, unknown
warningJSONOptional
warning (anyOf 1)stringAlternative
warning (anyOf 2)nullAlternative
Get a session — response body — recordings array item
FieldTypePresenceDescription and constraints
$objectRootInformation about a downloaded file, including URL and checksum.
artifact_idJSONOptionalArtifact row id for refresh-on-read
artifact_id (anyOf 1)stringAlternative
artifact_id (anyOf 2)nullAlternative
checksumJSONOptionalSHA-256 checksum of the file
checksum (anyOf 1)stringAlternative
checksum (anyOf 2)nullAlternative
file_sizeJSONOptionalSize of the file in bytes
file_size (anyOf 1)JSONAlternative
file_size (anyOf 1) (anyOf 1)integerAlternative
file_size (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
file_size (anyOf 2)nullAlternative
filenameJSONOptionalOriginal filename
filename (anyOf 1)stringAlternative
filename (anyOf 2)nullAlternative
modified_atJSONOptionalModified time of the file
modified_at (anyOf 1)stringAlternativeFormat: date-time
modified_at (anyOf 2)nullAlternative
urlstringRequired within parentURL to access the file
Login Task — response body — script run ai fallback triggered, script id, script revision id
FieldTypePresenceDescription and constraints
$objectRoot
ai_fallback_triggeredbooleanOptionalDefault: false
script_idJSONOptional
script_id (anyOf 1)stringAlternative
script_id (anyOf 2)nullAlternative
script_revision_idJSONOptional
script_revision_id (anyOf 1)stringAlternative
script_revision_id (anyOf 2)nullAlternative
Update an agent — response body — proxy location city, country, is ISP, subdivision
FieldTypePresenceDescription and constraints
$objectRootGranular proxy geo-targeting request with country, optional subdivision, and optional city.
cityJSONOptionalCity name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London')
city (anyOf 1)stringAlternativeMaximum length: 100
city (anyOf 2)nullAlternative
countrystringRequired within parentISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE')
Maximum length: 2
Minimum length: 2
isISPbooleanOptionalWhether this geo target is marked as an ISP proxy location.
Default: false
subdivisionJSONOptionalISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York)
subdivision (anyOf 1)stringAlternativeMaximum length: 10
subdivision (anyOf 2)nullAlternative
Update an agent — response body — proxy location string
FieldTypePresenceDescription and constraints
$stringRootKnown values: 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_KR, RESIDENTIAL_SA, RESIDENTIAL_ISP, NONE

SDK function policy ID: skyvern.download_files_v1_run_tasks_download_files_post. Catalog operation: download_files_v1_run_tasks_download_files_post. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.