Anchor Browser + Groq: Blazing Fast Browser Agents

Anchor Browser is the platform for AI Agentic browser automation, which solves the challenge of automating workflows for web applications that lack APIs or have limited API coverage. It simplifies the creation, deployment, and management of browser-based automations, transforming complex web interactions into simple API endpoints.

Python Quickstart (2 minutes to hello world)

Anchor Browser enables AI-powered browser automation using Groq's fast inference. This quickstart shows you how to use AI to automate web interactions like data collection.

Prerequisites

  • Python 3.8 or higher installed.

Setup

  1. Get your API keys:

  2. Install dependencies: Install the Anchor Browser Python SDK. (Typescript SDK is also available).

bash
pip install anchorbrowser pydantic

Quick Example: Extract Latest AI News

python
import os
from anchorbrowser import Anchorbrowser

# Initialize the Anchor Browser Client
client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))

# Collect the newest from AI News website
task_result = client.agent.task(
    "Extract the latest news title from this AI News website",
    task_options={
        "url": "https://www.artificialintelligence-news.com/",
        "provider": "groq",
        "model": "openai/gpt-oss-120b",
    }
)

print("Latest news title:", task_result)

Advanced Session Configuration

Create a session using advanced configuration (see Anchor API reference).

python
import os
from anchorbrowser import Anchorbrowser

# configuration example, can be ommited for default values.
session_config = {
    "session": {
        "recording": False,  # Disable session recording
        "proxy": {
            "active": True,
            "type": "anchor_residential",
            "country_code": "us"
        },
        "max_duration": 5,  # 5 minutes
        "idle_timeout": 1    # 1 minute
    }
}

client = Anchorbrowser(api_key=os.getenv("ANCHOR_API_KEY"))
configured_session = client.sessions.create(browser=session_config)

# Get the session_id to run automation workflows to the same running session.
session_id = configured_session.data.id

# Get the live view url to browse the browser in action (it's interactive!).
live_view_url = configured_session.data.live_view_url

print('session_id:', session_id, '\nlive_view_url:', live_view_url)

Next Steps

Was this page helpful?