AlterLab for AI Agents
Give your AI agent the ability to read any webpage. MCP Server for Claude and Cursor, Python and Node SDKs, n8n node, Firecrawl-compatible API. Clean markdown and JSON output designed for LLM consumption.
Which integrations work with AlterLab for AI agents?
AlterLab supports six integration paths — MCP Server for Claude and Cursor, Python SDK, Node.js SDK, Firecrawl-compatible API, n8n node, and a browser extension for session-based access. All six use the same API key and the same balance.
MCP Server
For Claude, Cursor, Copilot, Windsurf
Drop AlterLab directly into any MCP-compatible AI host. Claude, Cursor, GitHub Copilot, and Windsurf can call alterlab_scrape, alterlab_batch_scrape, and alterlab_batch_status as native tools — no extra code, no glue layer.
- alterlab_scrape(url, formats) — returns markdown, JSON, text
- alterlab_batch_scrape(urls) — parallel, up to 100 URLs
- alterlab_batch_status(batch_id) — async job status
- Automatic website compatibility & challenge resolution included
Python SDK
For Python AI agent frameworks
pip install alterlab gives you a fully typed async Python client. Works with LangChain, CrewAI, AutoGen, and any other Python AI framework. Built-in retry, timeout handling, and batch support.
- client.scrape(url) — sync and async
- client.batch(urls) — parallel batch mode
- Pydantic models for type-safe results
- Automatic retry on transient errors
Node.js SDK
For JavaScript/TypeScript AI agents
npm install alterlab gives you a fully typed TypeScript client that works in Node.js, Bun, and edge runtimes. Integrates cleanly with the Vercel AI SDK, Mastra, and LangGraph.js.
- client.scrape(url, { formats }) — typed response
- client.batch(urls) — Promise.all under the hood
- Edge runtime compatible
- Full TypeScript types included
Firecrawl Compatible
Drop-in replacement
Already using Firecrawl? Switch to AlterLab by changing one line — the base URL. Same request shape, same response format, same markdown output. No SDK changes, no prompt engineering changes.
- Same /v1/scrape request shape
- Same markdown + JSON response format
- Swap API key, keep everything else
- Automatic website compatibility included at same price tier
n8n Node
For no-code AI automation
Install n8n-nodes-alterlab in your n8n instance and connect web scraping to any AI automation. Pairs with OpenAI, Anthropic, Ollama, and Pinecone nodes to build RAG pipelines and agent workflows without writing code.
- Scrape and Batch Scrape operations
- Visual credential management
- Works with all AI nodes in n8n
- Webhook-ready for async batch results
Browser Extension
BYOS — Bring Your Own Session
Export session cookies from sites you're already logged into with one click, then pass them to the API via the cookies parameter. Your AI agent can access your accounts and automate the tasks you already do manually in your browser.
- One-click cookie export from active tab
- Encrypted export to JSON format
- Pass via cookies param in any SDK or REST
- Works with any site you're already logged into
Claude reads the web in 2 minutes
The AlterLab MCP Server exposes 25 tools to your AI host. The three most commonly used are: alterlab_scrape, alterlab_batch_scrape, and alterlab_batch_status. Claude, Cursor, GitHub Copilot, and Windsurf call them natively — no glue code, no wrappers.
Install the server
npm install -g alterlab-mcp-serverAdd to your MCP host config
Claude Desktop, Cursor, Copilot, or Windsurf — each has a config file that lists MCP servers. Paste the snippet on the right.
Ask your AI to fetch
Say "scrape https://example.com and summarize it" — your AI calls AlterLab, gets markdown back, and reasons over it directly.
// .cursor/mcp.json (or Claude Desktop config)
{
"mcpServers": {
"alterlab": {
"command": "alterlab-mcp",
"env": {
"ALTERLAB_API_KEY": "sk_live_your_key"
}
}
}
}How do I call AlterLab from Python or JavaScript?
AlterLab returns clean markdown and structured JSON from any URL — ready to feed directly into LLM context, a vector store, or a RAG pipeline without extra parsing.
Python SDK
pip install alterlabfrom alterlab import AlterLab
client = AlterLab(api_key="sk_live_your_key")
# Fetch any URL as clean markdown for your LLM prompt
result = client.scrape(
"https://example.com",
formats=["markdown", "json"],
)
# result.markdown — clean text for LLM context
# result.json — structured metadata + links
print(result.markdown)Node.js SDK
npm install alterlabimport { AlterLab } from "alterlab";
const client = new AlterLab({ apiKey: "sk_live_your_key" });
// Batch scrape — runs in parallel
const results = await client.batch([
"https://example.com/page-1",
"https://example.com/page-2",
], { formats: ["markdown"] });
for (const result of results) {
console.log(result.markdown); // feed to your LLM
}Firecrawl Compatible
change one line# Before (Firecrawl)
import requests
response = requests.post(
"https://api.firecrawl.dev/v1/scrape",
headers={"Authorization": "Bearer fc-..."},
json={"url": "https://example.com", "formats": ["markdown"]},
)
# After (AlterLab — change one line)
response = requests.post(
"https://api.alterlab.io/v1/scrape", # ← only change
headers={"X-API-Key": "sk_live_..."}, # ← swap key
json={"url": "https://example.com", "formats": ["markdown"]},
)Approach Comparison
Three ways to give AI agents access to web data — compared on setup, cost, and capability.
| Factor | AlterLab API / MCP | DIY Browser Automation | Raw HTTP Requests |
|---|---|---|---|
| Setup time | 2 lines of code | Hours — install Playwright/Puppeteer, configure headless browser | Minutes — but fails on JS-heavy sites |
| Anti-bot handling | ✓ Automatic — 5-tier escalation | ✗ Manual — blocked by most modern sites | ✗ Fails immediately on protected sites |
| Cost per 1,000 requests | $0.20 – $20 depending on tier | $5–$50 server cost + engineering hours | Near-zero, but <30% success rate on protected sites |
| Output format for LLMs | ✓ Clean markdown, JSON, plain text | Raw HTML — requires post-processing | Raw HTML — requires post-processing |
| MCP tool calling | ✓ Native — no wrapper code | Requires custom MCP server wrapper | Requires custom MCP server wrapper |
| Maintenance burden | ✓ Zero — AlterLab handles updates | High — site changes break scrapers regularly | Medium — update headers/fingerprints manually |
| Batch / parallel requests | ✓ Up to 100 URLs per call, async results | Manual concurrency management required | Manual concurrency management required |
Why is AlterLab designed for AI agent workloads?
AlterLab is built around the data consumption patterns that AI agents require — structured output, parallel batch processing, session-based access, and pay-per-success billing — not adapted from a traditional scraping tool.
Structured Output First
Every AlterLab response includes clean markdown, plain text, and JSON metadata simultaneously. No HTML parsing is required in the agent code — the result can be fed directly into an LLM prompt, a vector store, or a RAG pipeline. The markdown output strips navigation, ads, and boilerplate from the source page.
Automatic Website Compatibility Included
AI agents frequently need data from protected or JavaScript-rendered sites. AlterLab auto-escalates through TLS fingerprinting, full headless browser rendering, and challenge resolution based on what each URL requires. The agent submits a URL and receives content — the tier selection and anti-bot handling happen transparently without any extra parameters.
Batch Mode for RAG Pipelines
AlterLab accepts up to 100 URLs per batch API call and processes them in parallel. Results arrive via polling or webhook callback. The batch endpoint is designed for the high-volume, async workload pattern that RAG document indexing requires — submit a document list, receive structured content for each URL as jobs complete.
Authenticated Access via BYOS
AlterLab's browser extension exports session cookies from any site with one click. Those cookies are passed to the API via the cookies parameter, giving the agent access to content behind logins — dashboards, paywalled articles, member pricing — without manual copy-paste. This pattern is called Bring Your Own Session (BYOS).
Pay Only for Success
AlterLab charges only for requests that successfully return content. If a target URL is unreachable, returns a non-200 status, or times out, the request is not billed. This makes cost predictable at scale for AI agent workloads that include a percentage of failed or redirected URLs — no budget waste on empty responses.
MCP-Native Tool Calling
The AlterLab MCP Server exposes alterlab_scrape, alterlab_batch_scrape, alterlab_batch_status, and 22 other tools as native tools to Claude Desktop, Cursor, GitHub Copilot, and Windsurf. The AI calls AlterLab the same way it calls a calculator or filesystem tool — no prompt engineering, no custom function wrappers, no glue code. Install the server with one npm command.
Common questions about AlterLab for AI agents
AI Agent Resources
Web Scraping Pipelines for AI Agents
Optimize web data pipelines to reduce token waste and cost in LLM workflows.
Build an n8n Scraping Pipeline
Connect web scraping to AI automation nodes in n8n without code.
Authenticated Scraping — BYOS Guide
Capture session cookies and scrape behind logins in AI agent workflows.
REST API Docs
Full API reference — scrape, batch, async jobs, formats, and webhooks.
More Web Scraping API Resources
Part of the Web Scraping API Documentation cluster
Complete API reference with 5-tier auto-escalation — Curl to challenge resolution.
Pillar pageSide-by-side comparison with ScraperAPI, Firecrawl, Bright Data, and Apify.
Real success rates, response times, and cost data across all 5 tiers.
Handles bot-protected websites, JavaScript challenges, and complex protections automatically.
Full browser rendering for SPAs, React, and dynamic content.
Chain Search → Crawl → Map operations in a single API workflow.
From $0.0002/request. Balance never expires — no monthly subscription.
Your first scrape.
Sixty seconds.
$1 free credit — up to 5,000 scrapes. No credit card.
Just a POST request.
No credit card required · $1 free credit, up to 5,000 scrapes · Balance never expires