Overview
This cookbook demonstrates how to:- Navigate to Apple.com’s investor relations section using Stagehand AI actions
- Automatically download PDFs when links are clicked
- Poll the Browserbase Downloads API until the file is ready
- Extract the PDF from the ZIP archive downloaded from Browserbase
- Upload the PDF to Reducto and extract structured iPhone net sales data
- Output the extracted financial data as formatted JSON
Prerequisites
Before starting, you need:- A Browserbase account with API key and project ID
- A Reducto account with API key
- A Google API key for Gemini (used by Stagehand)
- Python 3.9+