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. Claude Code users can also install the AlterLab Agent Skills (scrape, search, crawl, extract, monitor) from the plugin marketplace; the skills index is published at /.well-known/agent-skills/index.json.
No key yet? Agents can call POST /api/v1/agent/signup (or the MCP tool alterlab_create_account) with the human's email. The human approves by email, then the agent receives a scoped, spend-capped API key. Agents can also start with a free trial key or pay per request with x402; the agent onboarding guide compares the three paths.
MCP Server
Connect by URL — Claude, Cursor, Windsurf
Add one URL to any MCP-compatible AI host and approve access in the browser. Claude, Cursor, GitHub Copilot, and Windsurf call AlterLab tools natively — no extra code, no glue layer. Prefer local? Run the npm package with npx.
- alterlab_scrape(url, formats) — one page as markdown, JSON or text
- alterlab_batch_scrape(urls) — 2-20 URLs, synchronous
- alterlab_batch(urls) — up to 100 URLs, asynchronous
- 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
Connect by URL and the AlterLab MCP Server gives your AI host 73 native tools (25 in the local npm package). The three most commonly used are: alterlab_scrape, alterlab_batch_scrape, and alterlab_extract. Claude, Cursor, GitHub Copilot, and Windsurf call them natively — no glue code, no wrappers.
Add the URL
https://mcp.alterlab.io/mcpApprove access in the browser
Claude Desktop, Claude Code, Cursor, or Windsurf opens an AlterLab sign-in window. Approve, and the tools are ready. Running locally instead? Use the npx 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.
// Recommended: connect by URL — ~/.cursor/mcp.json
{
"mcpServers": {
"alterlab": {
"url": "https://mcp.alterlab.io/mcp"
}
}
}
// Claude Code
claude mcp add --transport http alterlab https://mcp.alterlab.io/mcp
// Local / self-hosted alternative (npx)
{
"mcpServers": {
"alterlab": {
"command": "npx",
"args": ["-y", "alterlab-mcp-server"],
"env": {
"ALTERLAB_API_KEY": "sk_live_your_key"
}
}
}
}All 73 hosted tools
alterlab_scrapeGet one web page as clean, LLM-ready markdown (or text, HTML, JSON) in a single call; rendering and tier escalation are handled for you.alterlab_extractTurn content you already hold (HTML, text or markdown) into structured JSON fields such as prices, product info, contact details or custom fields, without fetching anything.alterlab_screenshotGet a full-page PNG image of one URL, rendered in a real headless browser, when you need to see the page rather than read its text.alterlab_crawlGet the content of every page on a site in one job, for RAG, indexing or site-wide export.alterlab_searchSearch the web and read the top results in one call: a vendor-neutral list of URLs, titles and snippets, with each result page as concise markdown.alterlab_researchGet a cited report or structured JSON for a hard question: a budgeted research job plans searches, reads many sources, follows leads and attaches a citation to every claim.alterlab_mapList every URL on a site via sitemap parsing and link extraction, without fetching page content, so you can scope work before reading anything.alterlab_batch_scrapeScrape 2-20 URLs in parallel and get every result back in one synchronous call, with no polling.alterlab_batchQueue up to 100 URLs as one asynchronous job and collect the results later by batch_id, so a large list never blocks your run.alterlab_estimate_costPredict the credit cost of scraping a URL before you run it, for free.alterlab_approvalCheck the status of a spend approval raised when a batch or crawl is estimated above the key's approval_above_usd threshold.alterlab_batch_resumeResume a batch whose remaining items were paused with status paused_low_success because one domain or detector class kept failing (the machine-readable paused_reason says which).alterlab_pricingGet AlterLab's machine-readable price list: per-tier cost, bring-your-own-proxy discount, cache-hit discount, add-ons, search and SERP prices, and the free allowance.alterlab_newsSearch aggregated news headlines from curated public sources: headline, URL, source, published time, author, image, short snippet and category.alterlab_site_profileLook up what AlterLab has measured about a domain; a layer or field with too few samples is omitted, never estimated.alterlab_keyword_ideasFan out a seed keyword across autocomplete (seed + a-z + who/what/how/why/best/vs), People Also Ask and related searches, and get deduplicated ideas, each with source, question flag, intent (question, commercial, navigational, informational) and a 0-1 relevance score.alterlab_geocodeResolve an informal address, place name or landmark description (including distance hints like 'a school 67 m away, a university 272 m away') to coordinate candidates.alterlab_ai_visibilityRun prompts against AI answer engines through their public, logged-out interfaces and get, per engine and run, the answer text, whether the brand is mentioned and its position, competitors mentioned, cited URLs and domains and a sentiment label, plus per-prompt mention rate, share of voice and citation share with the sample size.alterlab_feedbackTell AlterLab when something is hard, or what would make it better.alterlab_support_ticketOpen a support ticket in your user's AlterLab account when they need a human (billing, account or data problem), then follow up on it.alterlab_create_accountCreate an AlterLab account and API key for your user.alterlab_create_api_keyCreate one scoped, spend-capped API key (ALTERLAB_API_KEY) for the SDK and REST API on this machine.search_alterlabUse this to look up how to do something with AlterLab (API parameters, SDKs, MCP setup, pricing, error codes, migration from Firecrawl/ScrapingBee/Apify) or to find a guide for scraping a specific site.read_alterlab_pageUse this after search_alterlab to read the full text of one AlterLab page as markdown, so you can follow the documented steps instead of guessing.alterlab_serpGet structured search-engine results (organic listings, ads and related data) from Google, Bing or DuckDuckGo, as the engine ranks them.alterlab_jobLook up a job by id.alterlab_balanceRead account credit data.alterlab_monitorManage change monitors.alterlab_scheduleManage recurring scrape schedules.alterlab_workflow_runStart an execution of a workflow you saved in the AlterLab dashboard.alterlab_store_searchSearch the catalog of ready-made data products (site scrapers, pipelines, use-case APIs) that run on AlterLab's engine and bill per valid result.alterlab_store_getGet one listing: manifest with input and output schema, price per result, and live reliability.alterlab_store_quoteQuote a listing run: price per valid result, markup, and the maximum cost for max_results.alterlab_store_runRun a listing with input that matches its input_schema.alterlab_listing_draft_createValidate a listing manifest and save it as a draft you own.alterlab_listing_draft_testRuns each test_inputs entry of the draft on live fetches and scores it.alterlab_listing_publishPublishes the draft as a new immutable version in pending_review.alterlab_run_createSubmit a plan of scrape and search steps (beta feature) with a required max_credits budget.alterlab_run_approveApprove a run that is awaiting approval (beta feature).alterlab_run_streamRead a run's progress events in order (beta feature).alterlab_run_resultGet the current state of a run (beta feature): status, estimate, credits spent and a summary of each step.alterlab_run_cancelStop the pending steps of a run (beta feature) and refund the unused part of the reserved budget.alterlab_hands_pendingList the questions, write-action approvals and re-connect requests that your browser tasks are waiting on.alterlab_hands_answerAnswer a pending request of a browser task.alterlab_connectStart or poll a connect request so you can act on a site as the user without ever seeing their cookies or password.alterlab_sessionsList the site sessions the user has connected, with each one's health, domains and scopes, or revoke one so it can no longer be used.alterlab_task_startOpen a browser task that keeps one page and login across calls, then drive it with alterlab_task_act and alterlab_task_observe.alterlab_task_actRun a batch of actions (navigate, click, type, extract, upload, assert, fill_secret, fill_totp, wait_message, account_create, read_document, fill_document, render_document) in an open task.alterlab_task_observeSee what the task's page shows now: its URL and a redacted snapshot.alterlab_task_schemaLearn what the task's current page asks of you before acting: form fields (label, kind, required, options, limits, selector candidates, wizard step), submit/next/back actions, login and challenge state, embedded hosts, and calendar slots, option and price tables, cart lines and buttons.alterlab_task_vision_captureVision fallback, last resort: use only when alterlab_task_schema lists an opaque_region or a selector action cannot target a control.alterlab_task_vision_actVision fallback: click the point (x, y in CSS pixels from the viewport origin) you picked from alterlab_task_vision_capture, then verify the result.alterlab_task_answerReply to a request a task is waiting on, using the user's own words.alterlab_task_statusCheck an open or finished task: its status, failure reason, pages and actions used, expiry and any pending question or approval.alterlab_request_credentialRequest a login, one-time code seed or other credential for a task without ever seeing it.alterlab_task_controlIntervene in a running task on the user's behalf: pause, resume, stop, or steer with a plain-text instruction the next step must honour (for example 'skip site 3').alterlab_factsEvidence-backed fact store for the signed-in user (and organisation).alterlab_hands_triggersTriggers start a delegated Hands run when a source fires: a monitor change, a schedule, an inbound message, a webhook, a fact change or a user command.alterlab_hands_conversationsA conversation has a counterparty, a channel (email, web_chat, ticket_thread or form_reply), a goal, limits (max price, deadline, items not to concede), a persona (always the user, disclosed as acting on their behalf) and a message budget.alterlab_requirementsTurn a goal (and optionally the page's schema from alterlab_task_schema) into the facts the task needs.alterlab_policy_evaluateShow what the signed-in user's approval policy would decide for a planned batch of actions: auto (runs without asking), ask (needs the user's approval) or deny (refused), with the rule ids and reasons.alterlab_content_checkBefore writing a message, email, post or free-text form answer for the user, submit it as content with a claim binding for each amount, number, date, identifier, commitment or relationship statement.alterlab_hands_runHands supplies structure, verification and execution; your own model supplies drafts and decisions, and no platform model is called.alterlab_hands_shareOffer to share a completed run.alterlab_routesBefore acting on a goal with a company or person, compare the ways to do it.alterlab_hands_accessHands access is gated by measured capacity.alterlab_feed_createRun a listing on a cron and get one signed webhook per run with only the new, changed (field-level previous/current plus provenance) and removed entities.alterlab_feed_listList your listing feeds for one listing with status, spend against the cap and next run.alterlab_feed_updateUpdate a feed's input, cron, timezone, webhook, delivery mode, cap or status (active or paused).alterlab_feed_deleteStop a feed and remove it.alterlab_feed_deltasRead the feed's runs newest first, each with its new, changed and removed entities and the dataset version.alterlab_alert_ruleManage alert rules that notify you by email, webhook or Slack when your account crosses a threshold (credit balance, domain or product failure rate, response-time spike, failed schedules, stuck runs).alterlab_webhookManage account webhooks: HTTPS endpoints that receive signed events such as job.completed, batch.completed, monitor.changed, credits.low and run.* events.
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, and 71 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.
Browser Actions API
Click, fill, scroll and capture screenshots on the rendered page before extraction.
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.
Up to 5,000 free requests — about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests. No credit card.
Just a POST request.
No credit card required · Up to 5,000 free requests (about 5,000 direct fetch, 500 managed sessions or 250 full browser rendering requests) · Balance never expires