Skip to main content

crewai-alterlab

CrewAI integration for the AlterLab web scraping API.

Installation

pip install crewai-alterlab

Setup

Set your AlterLab API key:

export ALTERLAB_API_KEY="your-api-key"

Get your API key at alterlab.io/dashboard.

Scrape Tool

Scrape individual web pages with AlterLabScrapeTool:

from crewai_alterlab import AlterLabScrapeTool

tool = AlterLabScrapeTool()
result = tool.run("https://example.com")
print(result)

With a CrewAI Agent

from crewai import Agent, Task, Crew
from crewai_alterlab import AlterLabScrapeTool

researcher = Agent(
    role="Web Researcher",
    goal="Research topics by scraping web pages",
    backstory="You are an expert web researcher.",
    tools=[AlterLabScrapeTool()],
)

task = Task(
    description="Scrape https://example.com and summarise the content",
    expected_output="A summary of the page content",
    agent=researcher,
)

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

Custom Parameters

tool = AlterLabScrapeTool(
    scrape_params={
        "formats": ["markdown"],
        "mode": "js",  # JavaScript rendering
    },
)

Crawl Tool

Crawl multiple pages from a website with AlterLabCrawlTool:

from crewai_alterlab import AlterLabCrawlTool

tool = AlterLabCrawlTool()
result = tool.run(url="https://docs.example.com", max_pages=5)
print(result)

Research Agent with Both Tools

from crewai import Agent
from crewai_alterlab import AlterLabScrapeTool, AlterLabCrawlTool

researcher = Agent(
    role="Deep Researcher",
    goal="Thoroughly research topics using web data",
    backstory="You gather comprehensive information from the web.",
    tools=[AlterLabScrapeTool(), AlterLabCrawlTool()],
)

API Reference

See docs.alterlab.io for the full AlterLab API documentation.

Search Tool

Run web searches with AlterLabSearchTool (numbered title, URL and snippet):

from crewai_alterlab import AlterLabSearchTool

tool = AlterLabSearchTool(num_results=5, search_params={"engine": "google"})
print(tool.run(query="web scraping api"))

Blocked-Fetch Fallback

BlockedFetchFallbackTool runs your own fetch first and retries through AlterLab only when the result is a 403/429, a bot-protection challenge page, a CAPTCHA, or an empty JavaScript shell. Normal pages, 404s and network errors are returned or raised untouched, so credits are spent only on blocked fetches:

import requests
from crewai_alterlab import BlockedFetchFallbackTool

tool = BlockedFetchFallbackTool(fetch=lambda url: requests.get(url, timeout=20))
print(tool.run(url="https://example.com"))

Metadata

Release files for crewai-alterlab 0.1.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-alterlab 0.1.0
File Size Uploaded Provenance Actions
crewai_alterlab-0.1.0.tar.gz 7.1 kB With provenance Details for crewai_alterlab-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crewai-alterlab 0.1.0
File Interpreter ABI Platform Actions
crewai_alterlab-0.1.0-py3-none-any.whl Python 3 none any Details for crewai_alterlab-0.1.0-py3-none-any.whl

Total release size: 16.3 kB

Release files / crewai_alterlab-0.1.0.tar.gz

Download URL crewai_alterlab-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a645d3e2399f0a605e30e4a4e617abdea66349d5227e9f490d10c5f4479611a4
BLAKE2b-256 checksum
How to use checksums
cdf434379ba19679b83e7d68231394395f50e8f75fb07f1df5f9ab5a0ddb3508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / crewai_alterlab-0.1.0-py3-none-any.whl

Download URL crewai_alterlab-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da6bf37198d734cb2ec77673db076ebdf709c5d74e09681f7c30a9a33eac2923
BLAKE2b-256 checksum
How to use checksums
40ca3f8188dbb0dda91319d08c44c29a70b0373af6f9b6018df9871c3aeb9816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for crewai-alterlab 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crewai_alterlab-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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