Skip to main content

crewai-alterlab

PyPI downloads license source

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"))

Same pattern as a standalone package

unblock-fetch is the same fallback as a drop-in requests.get with no CrewAI dependency; the result's .via is direct or alterlab:

from unblock_fetch import get

print(get("https://example.com", timeout=20).text)

Metadata

Release files for crewai-alterlab 0.1.3

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.3
File Size Uploaded Provenance Actions
crewai_alterlab-0.1.3.tar.gz 7.8 kB With provenance Details for crewai_alterlab-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 17.8 kB

Release files / crewai_alterlab-0.1.3.tar.gz

Download URL crewai_alterlab-0.1.3.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
047edee08fb36791fb1db4f28e28c61d476f40ee9a6d84a18b6f0d891e6f478a
BLAKE2b-256 checksum
How to use checksums
5083b007563bc59b3cb1bf0f2093d94e19301241a820fc15ec29bf3ec045e2df
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 10, 2026.

Transparency log

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

Download URL crewai_alterlab-0.1.3-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9de31c7da85eb8595d876171f06a8dc4af513e7421ee9e2f11d20a4076995ab1
BLAKE2b-256 checksum
How to use checksums
204725cb76f4f415e010ce591feb0524889f6ed9ed0c9821e20ef30f5309aec9
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 10, 2026.

Transparency log

Security for crewai-alterlab 0.1.3

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for crewai_alterlab-0.1.3.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 10, 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.

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