Self-Hosted Hyperbrowser: For some instances of self-hosted Hyperbrowser, downloads will be available at
/tmp/<sessionId>/downloads on the host machine.How to Download Files
- Create a new Hyperbrowser session and set the
saveDownloadsparam totrue - Connect to the session using your preferred automation framework (like Puppeteer or Playwright)
- Set the download location in your code
- Download files
- Retrieve the download zip URL from Sessions API
Retrieving Downloads in Sessions
- Playwright
- Puppeteer
The downloads zip is synced in real-time to files that are downloaded during the session so you can retrieve it before the session stops as well.
By default, most PDF urls opened in the browser will open in a PDF viewer in the browser rather being downloaded. To force all PDFs to be downloaded, enable the
enableAlwaysOpenPdfExternally/enable_always_open_pdf_externally parameter when creating the session.Retrieving Downloads with API
After your session completes and files are downloaded, you can retrieve them using the Downloads API:- Get the session ID - Note the
idof the session that downloaded files - Call the API - Use the Get Session Downloads URL endpoint or SDK method
getDownloadsURL() - Poll for completion - Check the status until it’s
completed - Download the zip - Use the
downloadsUrlto download your files
Response Format
The API returns a response with the following structure:Status Values
The download zip URL is temporary and will expire according to your plan’s data retention policy. Download the file promptly after retrieval.
Using With AI Agents
Similarly as above, you can get the downloads zip of files that were downloaded during the session used by an AI Agent. We just need to create a session withsaveDownloads set to true and then pass in that session ID. Here is an example of doing it with OpenAI CUA.
Check out the Agents Docs for more information on how to use AI Agents with Hyperbrowser.
Storage and Retention
Downloaded zip files are stored securely in Hyperbrowser’s cloud infrastructure and are retained according to your plan’s data retention policy.Next Steps
Now that you’ve configured your sessions, start using them to automate tasks:Web Scraping
Extract data from websites
AI Agents
Use AI to automate browser tasks