Browser Use enables AI models to autonomously browse the web and extract information through natural language instructions. Combined with Groq's fast inference speeds, you can build research agents that deliver comprehensive insights in seconds.
Key Features:
pip install openai python-dotenvexport GROQ_API_KEY="your-groq-api-key"
export BROWSER_USE_API_KEY="your-browser-use-api-key"import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/api/openai/v1",
api_key=os.getenv("GROQ_API_KEY"),
timeout=300
)
tools = [{
"type": "mcp",
"server_url": "https://api.browser-use.com/mcp/",
"server_label": "browseruse",
"require_approval": "never",
"headers": {"X-Browser-Use-API-Key": os.getenv("BROWSER_USE_API_KEY")}
}]
response = client.responses.create(
model="openai/gpt-oss-120b",
input="What's the current price of Google stock?",
instructions="Use browseruse tools to find accurate, up-to-date information. Keep tasks focused and fast.",
tools=tools,
temperature=0.3,
top_p=0.8,
timeout=300
)
print(response.output_text)Compare products across multiple retailers:
response = client.responses.create(
model="openai/gpt-oss-120b",
input="""Compare iPhone 16 Pro across:
- Apple.com
- Amazon.com
- Best Buy
For each: price, availability, promotions, shipping""",
tools=tools,
temperature=0.3
)
print(response.output_text)Monitor competitors:
companies = ["OpenAI", "Anthropic", "Mistral AI"]
for company in companies:
response = client.responses.create(
model="openai/gpt-oss-120b",
input=f"""Research {company}:
- Latest product announcements
- Pricing information
- Recent news
- Key differentiators""",
tools=tools,
temperature=0.3
)
print(f"\n{company}:\n{response.output_text}")Get current financial information:
stocks = ["GOOGL", "MSFT", "NVDA"]
for ticker in stocks:
response = client.responses.create(
model="openai/gpt-oss-120b",
input=f"Get current stock price, daily change, and 52-week high/low for {ticker}",
tools=tools,
temperature=0.3
)
print(f"{ticker}: {response.output_text}")| Tool | Description |
|---|---|
browser_task | Execute complex browsing tasks with natural language |
get_browser_task_status | Check status of running browser tasks |
create_session | Start new browser session with persistent state |
navigate_to_url | Direct navigation to specific URLs |
extract_data | Extract specific data from web pages |
interact_with_page | Click, type, and interact with page elements |
Challenge: Build an automated deal finder that monitors shopping sites, compares prices, tracks changes, and alerts you when the best deals appear!