Vibium is an AI-powered browser automation framework for Python that uses Large Language Models (LLMs) to understand and interact with web pages using natural language commands.
Connect it to Scrapfly Cloud Browser for intelligent, scalable automation with built-in proxies and fingerprinting.
Beta Feature: Cloud Browser is currently in beta.
Installation
Install Vibium via pip:
pip install vibium
Vibium uses AI/LLMs to interpret natural language instructions and execute browser actions automatically.
Quick Start with AI Actions
Connect Vibium to Cloud Browser and use natural language to interact with web pages:
from vibium import Browser
API_KEY = ''
BROWSER_WS = f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&proxy_pool=datacenter&os=linux'
# Connect to Cloud Browser
browser = Browser(
cdp_url=BROWSER_WS,
llm_provider='openai', # or 'anthropic', 'google', etc.
llm_model='gpt-4o'
)
# Use natural language to interact with the page
browser.go('https://web-scraping.dev/products')
# AI-powered actions with natural language
products = browser.extract(
"Get all product names and prices from the page"
)
print(products)
browser.close()
Web Interactions with Natural Language
Vibium can understand complex instructions and execute multi-step workflows:
from vibium import Browser
API_KEY = ''
BROWSER_WS = f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&proxy_pool=datacenter'
browser = Browser(cdp_url=BROWSER_WS, llm_provider='openai')
# Navigate to a search engine
browser.go('https://www.google.com')
# Use natural language to perform actions
browser.act("Search for 'web scraping best practices'")
browser.act("Click on the first result")
# Extract information with natural language
content = browser.extract(
"Get the main heading and first 3 paragraphs"
)
print(content)
browser.close()
Form Interaction & Login
Vibium can handle login flows and form submissions using AI understanding:
from vibium import Browser
API_KEY = ''
BROWSER_WS = f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&proxy_pool=residential'
browser = Browser(cdp_url=BROWSER_WS, llm_provider='anthropic', llm_model='claude-3-5-sonnet')
# Navigate to login page
browser.go('https://web-scraping.dev/login')
# AI understands the form structure and fills it
browser.act("Enter 'myuser' in the username field")
browser.act("Enter 'mypassword' in the password field")
browser.act("Click the submit button")
# Wait for login to complete
browser.wait(3)
# Verify login success
is_logged_in = browser.extract(
"Check if there is a logout button or user profile visible"
)
print(f"Login successful: {is_logged_in}")
browser.close()
Session Persistence
Maintain browser state across connections using the session parameter:
from vibium import Browser
API_KEY = ''
SESSION_ID = 'my-ai-session'
# First connection: Login with AI
def first_connection():
browser = Browser(
cdp_url=f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&session={SESSION_ID}',
llm_provider='openai'
)
browser.go('https://web-scraping.dev/login')
browser.act("Fill in the login form and submit")
browser.close() # Session is preserved
# Second connection: Reuse the logged-in session
def second_connection():
browser = Browser(
cdp_url=f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&session={SESSION_ID}',
llm_provider='openai'
)
browser.go('https://web-scraping.dev/dashboard')
# Already logged in from previous session!
data = browser.extract("Get all dashboard metrics")
print(data)
browser.close()
Intelligent Data Extraction
Use Vibium's AI-powered extraction to get structured data without writing selectors:
from vibium import Browser
API_KEY = ''
BROWSER_WS = f'wss://' ~ public_cloud_browser_endpoint ~ '?api_key={API_KEY}&proxy_pool=datacenter'
browser = Browser(cdp_url=BROWSER_WS, llm_provider='openai', llm_model='gpt-4o')
browser.go('https://web-scraping.dev/products')
# Extract structured data with natural language
products = browser.extract(
"""
Extract all products with:
- Product name
- Price
- Rating (if available)
- Return as a list of dictionaries
"""
)
print(products)
# AI can understand complex extraction requirements
summary = browser.extract(
"Calculate the average price of all products on this page"
)
print(f"Average price: {summary}")
browser.close()
Proxy Options
Proxy Pool
Use Case
Cost
datacenter
General scraping, high speed, lower cost
1 credits/30s + 2 credits/MB
residential
Protected sites, geo-targeting, anti-bot bypass
1 credits/30s + 10 credits/MB
Best Practices
Choose the right LLM - GPT-4o or Claude Sonnet 3.5 provide best results for complex tasks
Be specific with instructions - Detailed natural language prompts yield better results
Close browsers - Always call browser.close() to stop billing
Use sessions wisely - Reuse sessions for multi-step flows to maintain state
Handle AI errors gracefully - Wrap operations in try/except for robustness
Start with datacenter proxies - Only use residential when needed for anti-bot bypass