Python Examples

Use Case Examples

Click any card to explore the code. Each example includes ready-to-run Python scripts with detailed prompts.

View All on GitHub

Web Scraping

Extract data from any website

Use natural language to scrape websites. No CSS selectors, no XPath, no breaking when sites update. Just describe what data you want and let the AI handle the rest.

JavaScript renderingDynamic contentPagination handlingJSON output

Example Prompts

Go to Hacker News and extract the top 10 stories with title, points, and URL
Scrape GitHub trending repos with name, description, and stars
Extract all product prices from this e-commerce page
01_basic_scraping.py
Click to view code →

Price Monitoring

Track changes in real-time

Monitor websites for price changes, stock availability, or content updates. Perfect for cryptocurrency tracking, e-commerce price alerts, and competitor monitoring.

Change detectionPrice alertsScheduled checksCustom callbacks

Example Prompts

Go to CoinGecko and get the current Bitcoin price and 24h change
Check if this product is back in stock and notify me
Monitor this page for any content changes
02_website_monitor.py
Click to view code →

Automation Workflows

Multi-step web interactions

Automate complex workflows that span multiple pages. Fill forms, navigate checkout flows, perform research across sites, and handle multi-step processes.

Form fillingCheckout flowsMulti-page navigationData entry

Example Prompts

Login to saucedemo.com, add items to cart, and complete checkout
Fill out this multi-step registration form with test data
Research Python frameworks across 3 documentation sites
03_long_interactions.py
Click to view code →

QA Testing

Test websites with natural language

Write test cases in plain English. Verify login flows, form validations, navigation, and UI elements without writing complex test frameworks or selectors.

Login testingForm validationE2E flowsUI verification

Example Prompts

Test login with valid credentials and verify the dashboard loads
Submit the form with invalid email and check for error message
Verify all navigation links work correctly
07_qa_automation.py
Click to view code →

Auth & Sessions

Handle protected content

Access authenticated pages, handle login flows, manage cookies and sessions, capture screenshots, and implement robust error recovery patterns.

Login flowsScreenshot captureCookie handlingError recovery

Example Prompts

Login to the site and scrape my account dashboard
Navigate through pages and save screenshots of each step
Handle the cookie consent popup and continue
04_advanced_agents.py
Click to view code →

Lead Generation

Extract business intelligence

Build lead lists from directories, extract company information, aggregate job postings, monitor competitors, and gather market research data.

Company dataContact extractionJob aggregationMarket research

Example Prompts

Extract YC companies with name, description, and website
Get competitor pricing from their pricing page
Aggregate job postings for "AI Engineer" from multiple sites
06_real_world_use_cases.py
Click to view code →

Ready to automate?

Get your API key from browseanything.io and start building

Built with ❤️ by the Browse Anything team