Weather Proxy Demo

Demonstrate geolocation proxies by extracting weather data for multiple cities

Demo preview
TypeScript
Source code
npx create-browser-app --template proxies-weather
uvx create-browser-app --template proxies-weather

Get started with geolocation proxies

This template demonstrates Browserbase geolocation proxies by routing traffic through specific cities (New York, London, Tokyo, São Paulo) and extracting location-specific weather data from the same website. It configures a Browserbase-managed proxy per run, navigates to a weather service, and uses Stagehand + Zod to extract structured temperature data. Running locations sequentially makes it easy to see how proxy location impacts content.

Steps

  1. Configure a Browserbase session with a geolocation proxy (city/country/state)
  2. Navigate to a weather site through that proxy
  3. Extract the current temperature and unit with Stagehand + Zod schema validation
  4. Repeat for multiple locations to compare results across geographies
  5. Print a formatted summary of weather results for all locations