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.1

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.1
File Size Uploaded Provenance Actions
crewai_alterlab-0.1.1.tar.gz 7.1 kB With provenance Details for crewai_alterlab-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 16.3 kB

Release files / crewai_alterlab-0.1.1.tar.gz

Download URL crewai_alterlab-0.1.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5bfa7dd2de5ec629826568707396af428c00ad8ab28c4a433eff22623ca3f52f
BLAKE2b-256 checksum
How to use checksums
18952fbc4872b20b9131e0c8a3ff4c01eb296de870eb3c59095363e6fcc688d7
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.1-py3-none-any.whl

Download URL crewai_alterlab-0.1.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fadd3e74c279602b79aa1fa99c5d9112a5787dae15f070d4e8b4ee0d8e32745e
BLAKE2b-256 checksum
How to use checksums
c313ce14db8516a064fc47163b16638ad4b0e85870db7a143b11ed62353a1a49
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.1

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.1.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.1 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