MCP ServerFirecrawl CompatibleAI Agent SDK

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.

Documentation
No credit card
Simple Pricing
Up to 5,000 free requests
Pay as you go
No subscriptions
Never expires

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.

Most Popular

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.

https://mcp.alterlab.io/mcp
  • 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
Setup guide
Works with LangChain, CrewAI, AutoGen

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.

pip install alterlab
  • client.scrape(url) — sync and async
  • client.batch(urls) — parallel batch mode
  • Pydantic models for type-safe results
  • Automatic retry on transient errors
PyPI package
Works with Vercel AI SDK, Mastra

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.

npm install alterlab
  • client.scrape(url, { formats }) — typed response
  • client.batch(urls) — Promise.all under the hood
  • Edge runtime compatible
  • Full TypeScript types included
npm package
Zero migration cost

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.

# Change base URL to https://api.alterlab.io
  • Same /v1/scrape request shape
  • Same markdown + JSON response format
  • Swap API key, keep everything else
  • Automatic website compatibility included at same price tier
Full comparison
No-code friendly

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.

npm install n8n-nodes-alterlab
  • Scrape and Batch Scrape operations
  • Visual credential management
  • Works with all AI nodes in n8n
  • Webhook-ready for async batch results
npm package
Chrome + Firefox

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.

# Install from Chrome Web Store or Firefox Add-ons
  • 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
BYOS guide
MCP Server Setup

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.

1

Add the URL

https://mcp.alterlab.io/mcp
2

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

3

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.

JSON config
// 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_scrape Get 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_extract Turn 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_screenshot Get 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_crawl Get the content of every page on a site in one job, for RAG, indexing or site-wide export.
  • alterlab_search Search 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_research Get 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_map List 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_scrape Scrape 2-20 URLs in parallel and get every result back in one synchronous call, with no polling.
  • alterlab_batch Queue 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_cost Predict the credit cost of scraping a URL before you run it, for free.
  • alterlab_approval Check the status of a spend approval raised when a batch or crawl is estimated above the key's approval_above_usd threshold.
  • alterlab_batch_resume Resume 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_pricing Get 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_news Search aggregated news headlines from curated public sources: headline, URL, source, published time, author, image, short snippet and category.
  • alterlab_site_profile Look up what AlterLab has measured about a domain; a layer or field with too few samples is omitted, never estimated.
  • alterlab_keyword_ideas Fan 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_geocode Resolve 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_visibility Run 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_feedback Tell AlterLab when something is hard, or what would make it better.
  • alterlab_support_ticket Open 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_account Create an AlterLab account and API key for your user.
  • alterlab_create_api_key Create one scoped, spend-capped API key (ALTERLAB_API_KEY) for the SDK and REST API on this machine.
  • search_alterlab Use 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_page Use 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_serp Get structured search-engine results (organic listings, ads and related data) from Google, Bing or DuckDuckGo, as the engine ranks them.
  • alterlab_job Look up a job by id.
  • alterlab_balance Read account credit data.
  • alterlab_monitor Manage change monitors.
  • alterlab_schedule Manage recurring scrape schedules.
  • alterlab_workflow_run Start an execution of a workflow you saved in the AlterLab dashboard.
  • alterlab_store_search Search 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_get Get one listing: manifest with input and output schema, price per result, and live reliability.
  • alterlab_store_quote Quote a listing run: price per valid result, markup, and the maximum cost for max_results.
  • alterlab_store_run Run a listing with input that matches its input_schema.
  • alterlab_listing_draft_create Validate a listing manifest and save it as a draft you own.
  • alterlab_listing_draft_test Runs each test_inputs entry of the draft on live fetches and scores it.
  • alterlab_listing_publish Publishes the draft as a new immutable version in pending_review.
  • alterlab_run_create Submit a plan of scrape and search steps (beta feature) with a required max_credits budget.
  • alterlab_run_approve Approve a run that is awaiting approval (beta feature).
  • alterlab_run_stream Read a run's progress events in order (beta feature).
  • alterlab_run_result Get the current state of a run (beta feature): status, estimate, credits spent and a summary of each step.
  • alterlab_run_cancel Stop the pending steps of a run (beta feature) and refund the unused part of the reserved budget.
  • alterlab_hands_pending List the questions, write-action approvals and re-connect requests that your browser tasks are waiting on.
  • alterlab_hands_answer Answer a pending request of a browser task.
  • alterlab_connect Start or poll a connect request so you can act on a site as the user without ever seeing their cookies or password.
  • alterlab_sessions List 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_start Open a browser task that keeps one page and login across calls, then drive it with alterlab_task_act and alterlab_task_observe.
  • alterlab_task_act Run 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_observe See what the task's page shows now: its URL and a redacted snapshot.
  • alterlab_task_schema Learn 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_capture Vision fallback, last resort: use only when alterlab_task_schema lists an opaque_region or a selector action cannot target a control.
  • alterlab_task_vision_act Vision 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_answer Reply to a request a task is waiting on, using the user's own words.
  • alterlab_task_status Check an open or finished task: its status, failure reason, pages and actions used, expiry and any pending question or approval.
  • alterlab_request_credential Request a login, one-time code seed or other credential for a task without ever seeing it.
  • alterlab_task_control Intervene 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_facts Evidence-backed fact store for the signed-in user (and organisation).
  • alterlab_hands_triggers Triggers 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_conversations A 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_requirements Turn a goal (and optionally the page's schema from alterlab_task_schema) into the facts the task needs.
  • alterlab_policy_evaluate Show 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_check Before 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_run Hands supplies structure, verification and execution; your own model supplies drafts and decisions, and no platform model is called.
  • alterlab_hands_share Offer to share a completed run.
  • alterlab_routes Before acting on a goal with a company or person, compare the ways to do it.
  • alterlab_hands_access Hands access is gated by measured capacity.
  • alterlab_feed_create Run 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_list List your listing feeds for one listing with status, spend against the cap and next run.
  • alterlab_feed_update Update a feed's input, cron, timezone, webhook, delivery mode, cap or status (active or paused).
  • alterlab_feed_delete Stop a feed and remove it.
  • alterlab_feed_deltas Read the feed's runs newest first, each with its new, changed and removed entities and the dataset version.
  • alterlab_alert_rule Manage 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_webhook Manage 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 alterlab
Python
from 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 alterlab
TypeScript
import { 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
Python — migration example
# 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.

FactorAlterLab API / MCPDIY Browser AutomationRaw HTTP Requests
Setup time2 lines of codeHours — install Playwright/Puppeteer, configure headless browserMinutes — 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 hoursNear-zero, but <30% success rate on protected sites
Output format for LLMs✓ Clean markdown, JSON, plain textRaw HTML — requires post-processingRaw HTML — requires post-processing
MCP tool calling✓ Native — no wrapper codeRequires custom MCP server wrapperRequires custom MCP server wrapper
Maintenance burden✓ Zero — AlterLab handles updatesHigh — site changes break scrapers regularlyMedium — update headers/fingerprints manually
Batch / parallel requests✓ Up to 100 URLs per call, async resultsManual concurrency management requiredManual 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&apos;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

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.

terminal
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'

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