GET
/
api
/
v1
/
task
/
{task_id}
/
output-file
/
{file_name}
import requests

API_KEY = 'your_api_key_here'
BASE_URL = 'https://api.browser-use.com/api/v1'
HEADERS = {'Authorization': f'Bearer {API_KEY}'}

task_id = 'task_1234567890abcdef'
file_name = 'results.csv'

response = requests.get(f'{BASE_URL}/task/{task_id}/output-file/{file_name}', headers=HEADERS)
download_url = response.json()['download_url']

# Download the file
file_response = requests.get(download_url)
with open('downloaded_results.csv', 'wb') as file:
    file.write(file_response.content)

print("File downloaded successfully")
{
  "download_url": "https://storage.browser-use.com/output-files/task_1234567890abcdef/results.csv?signature=..."
}

Returns a presigned URL for downloading a file from the task output files. This endpoint is useful for retrieving files that were generated or modified during task execution.

Path Parameters

task_id
string
required

ID of the task

file_name
string
required

Name of the output file

Response

download_url
string

A presigned URL for downloading the file.

import requests

API_KEY = 'your_api_key_here'
BASE_URL = 'https://api.browser-use.com/api/v1'
HEADERS = {'Authorization': f'Bearer {API_KEY}'}

task_id = 'task_1234567890abcdef'
file_name = 'results.csv'

response = requests.get(f'{BASE_URL}/task/{task_id}/output-file/{file_name}', headers=HEADERS)
download_url = response.json()['download_url']

# Download the file
file_response = requests.get(download_url)
with open('downloaded_results.csv', 'wb') as file:
    file.write(file_response.content)

print("File downloaded successfully")
{
  "download_url": "https://storage.browser-use.com/output-files/task_1234567890abcdef/results.csv?signature=..."
}