Skip to main content

crewai-browserless

A CrewAI tool for scraping web pages using the Browserless /smart-scrape API. Handles anti-bot detection, captchas, and proxying automatically.

Installation

pip install crewai-browserless

Or with uv:

uv add crewai-browserless

Setup

Get a Browserless API Token at https://www.browserless.io/, then set the BROWSERLESS_API_TOKEN:

export BROWSERLESS_API_TOKEN="your-token"

# for private deplyments:
# export BROWSERLESS_API_URL="https://your-browserless-instance.com"

Usage

With a CrewAI agent

from crewai import Agent, Crew, Task
from crewai_browserless import BrowserlessSmartScrapeTool

agent = Agent(
    role="Web Researcher",
    goal="Scrape web pages and summarize their content.",
    backstory="An expert at extracting useful information from websites.",
    tools=[BrowserlessSmartScrapeTool()],
)

task = Task(
    description="Scrape https://www.browserless.io/blog/java-memory-leak and summarize what the page is about.",
    expected_output="A short summary of the page content.",
    agent=agent,
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()

print(result)

Standalone

from crewai_browserless import BrowserlessSmartScrapeTool

tool = BrowserlessSmartScrapeTool()

# Call the tool directly
result = tool.run(url="https://en.wikipedia.org/wiki/Headless_browser", formats=["markdown"])

print(result)

Parameters

Parameter Type Default Description
url str required The URL to scrape (http/https only)
formats list[str] ["markdown"] Output formats: markdown, html, screenshot, pdf, links
timeout int | None None Timeout in milliseconds (uses server default if not set)

Environment Variables

Variable Required Description
BROWSERLESS_API_URL Yes Base URL of your Browserless instance
BROWSERLESS_API_TOKEN No API token for authentication

How It Works

The tool sends a POST request to the Browserless /smart-scrape endpoint, which uses a cascading strategy pipeline:

  1. HTTP fetch — fast, direct request
  2. HTTP fetch with proxy — retries through a residential proxy
  3. Browser rendering — headless browser for JavaScript-heavy pages
  4. Browser with captcha solving — handles captcha challenges automatically

The first strategy that succeeds returns the result. If screenshot or pdf formats are requested, browser strategies are used automatically.

License

SSPL-1.0

Metadata

Release files for crewai-browserless 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewai-browserless 1.0.0
File Size Uploaded
crewai_browserless-1.0.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewai-browserless 1.0.0
File Interpreter ABI Platform
crewai_browserless-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / crewai_browserless-1.0.0.tar.gz

Download URL crewai_browserless-1.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c4aa825c76f7b37a9a12deab4bd03f62344b3de2fe752ac0037372a56c03f380
BLAKE2b-256 checksum
How to use checksums
83b6ccdd2d09f5849680d85e5df07acdfb0fc24acaabba69f41186d867dd54c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / crewai_browserless-1.0.0-py3-none-any.whl

Download URL crewai_browserless-1.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12dec62193595ba1f6a99fd07195e6894c75fdc309b384a44756002971e69db5
BLAKE2b-256 checksum
How to use checksums
30809d2c383a1257c34b26ea3ec3a8ff9075e995c67715079248435823bea04c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page