Apex Flow Web Scraper
Build with clean web data.
A straightforward HTTP API for public pages, documents and AI-ready Markdown.
Get a free API key → OpenAPI specification
For a single project, the $5 pass includes 35,000 credits for 30 days. See pricing.
Connect your AI agent
Connect a remote MCP client to https://webscraper.apexflowlabs.com/v1/mcp using Streamable HTTP. Set the Authorization header to Bearer YOUR_API_KEY in client settings. Clients must support a custom bearer header. HTTP clients can import the OpenAPI 3.1 specification. See the official MCP Registry record.
Start a free trial to get a key. Set APEX_SCRAPER_API_KEY in the environment that runs your client. Keep the value out of prompts and project files.
Codex CLI
Register the server and start a new Codex session.
codex mcp add apex-scraper --url https://webscraper.apexflowlabs.com/v1/mcp --bearer-token-env-var APEX_SCRAPER_API_KEY
Claude Code
Merge this server entry into your project's .mcp.json. Approve the server when Claude Code opens the project.
{
"mcpServers": {
"apex-scraper": {
"type": "http",
"url": "https://webscraper.apexflowlabs.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${APEX_SCRAPER_API_KEY}"
}
}
}
}VS Code with GitHub Copilot
Merge the entry below into the servers section of your user MCP configuration. Launch the client with the key available in its environment. See the VS Code configuration reference for editor and Copilot harness settings.
{
"servers": {
"apex-scraper": {
"type": "http",
"url": "https://webscraper.apexflowlabs.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${APEX_SCRAPER_API_KEY}"
}
}
}
}Exact setup for 24 assistants, frameworks and tools, each checked against its own documentation: see all integrations.
Other MCP clients
For a client with local MCP server support, install the adapter in a Python 3.11+ environment:
python -m pip install "git+https://github.com/Apexflowlabsllc/apex-flow-web-scraper.git"
Set APEX_SCRAPER_API_KEY in your client’s secret environment. Configure a stdio server with the command apex-scraper-mcp from that environment. The hosted service runs the browser. The hosted server and the adapter expose eight tools:
scrape_pagereturns Markdown, source receipts, optional CSS fields and RAG chunks.scrape_batchreads up to ten URLs in parallel and reports which succeeded.check_changesre-reads up to ten URLs and returns only what changed since your last read.map_sitediscovers public sitemap URLs.crawl_sitestarts a background crawl of one site andcrawl_statusreads its pages.search_savedfinds text in the pages you have already scraped: the latest 100 on a trial, 1,000 on paid plans.credit_balancereturns credits, plan limits, renewal date and recent usage.
Start by asking the agent to check its credit balance, then scrape one public page. Standard API credits and limits apply.
1. Authenticate
Send your key in the Authorization: Bearer YOUR_API_KEY header. Keep it on your server. Do not embed it in a public website or mobile app.
2. Scrape a page
curl https://webscraper.apexflowlabs.com/v1/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","render":"never"}'The response contains result.markdown, result.text, result.title, source metadata and a retrieval receipt, plus credits_used, credits_left and change.
Request options
| Option | Meaning |
|---|---|
| url | Required public HTTP or HTTPS URL; ports 80/443 only. |
| render | never (1 credit), auto (1–3), or always (3). Default: auto. |
| chunks | Text chunk size for RAG. Example: 1000. |
| screenshot | Boolean; renders the page and returns screenshot_png_base64. |
| wait_selector | CSS selector to wait for when rendering. |
| max_age | Cache age in milliseconds; 0 requests a fresh fetch. |
| page | Part of a long document to return, starting at 1. See Long documents. |
| max_tokens | 200–60000. Returns the page in parts that each fit this budget. See Fit a context budget. |
| fallback | "archive" reads the latest Internet Archive copy when the live site refuses. See Archive fallback. |
Python
import json, urllib.request
request = urllib.request.Request(
"https://webscraper.apexflowlabs.com/v1/scrape",
data=json.dumps({"url": "https://example.com", "render": "never"}).encode(),
headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
)
with urllib.request.urlopen(request, timeout=100) as response:
print(json.load(response)["result"]["markdown"])Extract named fields without an AI model
Add a recipe to a scrape request. Fields are returned in result.data at no additional credit cost.
{"url":"https://example.com","render":"never","recipe":{"fields":{"heading":{"selector":"h1","required":true}}}}Discover URLs
POST /v1/map with the body below. One credit per successful map call; empty results are free. Up to 1,000 URLs and 20 sitemap files, with a 45-second deadline. Sitemap requests also honor robots.txt.
{"url":"https://example.com","limit":1000}Scrape a batch
POST /v1/batch with 1–10 URLs and the same scrape options. Pages run in parallel: two at once on a trial, six on Pass and Starter, twelve on Growth and twenty on Scale. Results come back in the order you sent the URLs, each with its own status, credit count and change status. The reply reports concurrency and duration_ms. The 80-second batch deadline returns any unprocessed URLs so you can retry them. Successful pages cost the usual 1 or 3 credits.
{"urls":["https://example.com","https://example.org"],"render":"never"}Search your saved pages
POST /v1/search to search the pages you have already scraped: your latest 100 on a trial and your latest 1,000 on any paid plan. This searches your account’s saved text, not the open web. Search uses no credits. limit accepts 1–25 results.
{"query":"documentation","limit":10}AI extraction to your schema
On any paid plan, add extract with a JSON Schema and an optional prompt. A model reads the page and returns JSON checked against your schema in result.extracted: data, valid, and any validation errors. It costs 150 credits on top of the page. The model reads the first 20,000 characters of the page. Check valid and spot-check values before relying on them. For fields you can point to with a CSS selector, a recipe is exact and free.
{"url":"https://example.com","render":"never","outputs":["markdown"],
"extract":{"schema":{"type":"object","properties":{"heading":{"type":"string"}},"required":["heading"]},
"prompt":"Return the main heading."}}Data packages
New: POST /v1/packages/home {"region"} joins the house price trend, HUD rents by bedroom count (FY2026) and Freddie Mac mortgage rates for a metro in one answer. POST /v1/packages/rent {"region"} returns monthly rent for a studio to a 4-bedroom. POST /v1/packages/pay {"job","region","limit"} returns BLS pay (May 2024) for the closest job titles in a metro: median, mean, 10th to 90th percentile and employment. POST /v1/packages/mortgage-rates {} returns this week's 30- and 15-year rates. POST /v1/packages/jobs {"company","query","location","limit"} returns a company's open jobs from its public Greenhouse or Lever board (details). One credit an answer; candidate lists are free. Pages: housing, pay.
A package reads an official public source and returns a small, typed answer with its source. We only use sources whose terms allow automated reading and reuse. One credit for an answer; nothing is charged when the source is down or no single answer matches.
curl https://webscraper.apexflowlabs.com/v1/packages/housing \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"region":"Sacramento, CA","quarters":8}'House prices by metro. The reply has the metro's latest house price index, the one-year and five-year change and a quarterly series, from the Federal Housing Finance Agency. It is U.S. government data in the public domain. It is an index, not a dollar price, and it covers US metro areas, not individual homes. If the name matches several metros you get the candidates in matches, free.
curl https://webscraper.apexflowlabs.com/v1/packages/npr \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"topic":"business","limit":5}'NPR headlines. Topics: news, world, business, science, politics, technology, health. Each story has a title, summary, publication time and a link you can pass to /v1/scrape. GET /v1/packages lists every package.
Store watch
Track a Shopify store's public catalog and see what changes in it. POST /v1/stores/track reads the catalog now and saves a snapshot; the reply lists what changed since your last snapshot of that store (new products, price drops and rises, sold out, restocked, variant activity). It costs one credit per catalog page read, and a page holds 250 products. A store can be read once an hour, up to 5,000 products.
curl https://webscraper.apexflowlabs.com/v1/stores/track \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"store":"example-store.com"}'POST /v1/stores/rising with {"store","days","limit"} ranks the store's products by the changes seen between your snapshots. It is free. The ranking is a change signal, not a sales or revenue figure: a variant record changes on a sale and on any edit. GET /v1/stores lists the stores you track (3 on the free trial, 50 on paid plans) and POST /v1/stores/forget deletes one. Only stores that publish their catalog file can be tracked; robots.txt is obeyed, and a store that refuses costs nothing. More about store watch.
Crawl a site
POST /v1/crawl starts a background job that reads a site’s own pages, starting from your URL and its sitemap and following links on the same host. It answers at once with an id. Page limits: 10 on a trial, 100 on Pass and Starter, 500 on Growth, 1,000 on Scale. Each page costs the usual 1 or 3 credits and a page that fails is free. A crawl obeys robots.txt and crawl delays, stops at your limit, at 30 minutes, or when credits run out, and keeps what it collected for 7 days.
curl https://webscraper.apexflowlabs.com/v1/crawl \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.sqlite.org/docs.html","limit":25}'Options: limit, max_depth (default 3), include (text every crawled URL must contain), render, outputs (default Markdown), recipe and fallback. Read progress and pages with GET /v1/crawl/{id}?offset=0. Each reply holds up to 50 pages; pass next_offset as offset until it is null. DELETE /v1/crawl/{id} cancels a running crawl.
{"id":"crawl_…","status":"completed","pages_done":25,"pages_failed":0,"credits_used":25,
"results":[{"url":"…","status":200,"credits_used":1,"change":{"status":"new"},"result":{"markdown":"…"}}],
"next_offset":null}Python and Node clients
Both clients have no dependencies, wait out rate limits, join long pages, stream crawl results and call the data packages (house_prices, npr_news in Python; housePrices, nprNews in Node).
python -m pip install "git+https://github.com/Apexflowlabsllc/apex-flow-web-scraper.git"
from rainbo_scrape.hosted_client import Apex
apex = Apex() # reads APEX_SCRAPER_API_KEY
print(apex.scrape("https://example.com", outputs=["markdown"])["result"]["markdown"])
for page in apex.crawl("https://www.sqlite.org/docs.html", limit=25):
print(page["url"], page["status"])Node 18+: copy sdk/node/hosted.mjs into your project.
import { Apex } from "./hosted.mjs";
const apex = new Apex();
const { result } = await apex.scrape("https://example.com", { outputs: ["markdown"] });
for await (const page of apex.crawl("https://www.sqlite.org/docs.html", 25)) console.log(page.url);Long documents
A response holds up to 256 KiB. A longer document, such as a full specification or a long report, is returned in consecutive parts instead of failing. The reply includes pagination with page, pages and next_page. Request the next part with the same options plus "page". Parts are cut on line breaks, so headings, tables and code blocks stay whole lines. Each part is a normal request at the usual credit price; send max_age to reuse the fetch.
{"url":"https://www.rfc-editor.org/rfc/rfc9110.html","render":"never","outputs":["markdown"],"max_age":3600000,"page":2}Fit a context budget
Every scrape reply includes estimated_tokens for the text it returned, counted as four characters per token. Set max_tokens to receive a page in consecutive parts that each fit your model’s budget. Parts are cut on line breaks and joined parts reproduce the page exactly. Follow pagination.next_page as with long documents.
{"url":"https://en.wikipedia.org/wiki/Web_scraping","render":"never","outputs":["markdown"],"max_tokens":2000}Archive fallback
Some sites refuse automated readers, return an error, or have removed the page. We do not disguise requests, rotate addresses or solve CAPTCHAs. When a live read fails for one of those reasons, a single-page or batch request returns the most recent public copy held by the Internet Archive’s Wayback Machine instead of an error. Send "fallback":"none" if you would rather receive the error. Crawls return archive copies only when you send "fallback":"archive".
{"url":"https://www.glassdoor.com/","render":"never","outputs":["markdown"]}An archived result is always labelled. result.archive states captured (when the copy was taken), snapshot_url, the reason the live read failed and live_page_served: false; result.warnings includes archived_copy. Archived content can be out of date, so check captured before relying on prices, stock or news. A page that reads normally is never replaced by an archive copy. The usual 1 credit applies when a copy is returned; when none exists you get the original error at no charge. Site owners can ask the Internet Archive to exclude their pages.
Track what changed
Every scrape compares the page with the copy your account read last time and adds a change object: status is new, unchanged or changed, with the content hash and the time of your previous check. To monitor a page, add "diff" to outputs. You receive the source receipt and the changed lines without the page body, so a monitoring agent spends context only on what moved. The usual 1 or 3 credits apply. History is private to your account and covers your saved pages.
{"url":"https://example.com/pricing","render":"never","outputs":["diff"]}{"credits_used":1,"credits_left":24990,
"change":{"status":"changed","previous_check":1794500000.0,
"diff":"--- previous\n+++ current\n@@ -3 +3 @@\n-Price: $10\n+Price: $12"},
"result":{"url":"https://example.com/pricing","receipt":{}}}Send the same option to /v1/batch to check ten pages in one call. MCP clients use check_changes.
Choose what goes into your agent’s context
Set outputs on a scrape or batch request to return just the content your agent uses. For reading, request ["markdown"]. For a CSS recipe, request ["data", "evidence"]. For retrieval, request ["chunks"]. The response retains available source receipts and validation warnings. The same credit price applies.
Check usage
curl https://webscraper.apexflowlabs.com/v1/usage \ -H "Authorization: Bearer YOUR_API_KEY"
Returns credits_left, credits_total, plan, period_end, your limits, the number of saved pages, and daily credits and requests for the last 14 days. Every API response also carries X-Credits-Remaining, X-RateLimit-Limit, X-RateLimit-Remaining and an X-Request-Id you can quote to support.
Limits and errors
Pass and Starter accounts may make 60 API requests per minute, Growth 120 and Scale 240; free accounts may make 30. This shared limit includes credit-free search and usage requests. Batch pages also count toward the scrape limit. Pass and Starter accounts may run six page scrapes at once, Growth twelve and Scale twenty. Free trials allow two. The hosted service accepts twenty active page scrapes in total and runs up to two browser renders at once. Other admitted renders wait within the request deadline. Requests to the same host follow its crawl delay. Scrapes have a 90-second deadline. Responses hold 256 KiB; longer documents are returned in parts. Each billing period permits at most twice the included credit allowance in scrape/map attempts, including failures. Contact support if repeated source failures exhaust this protection limit. The service also applies a shared concurrency cap; retry a 429 response after the Retry-After interval.
Every error is JSON with a readable error, a stable code and retryable. A 402 includes credits_left and a buy_url; a 429 includes retry_after in seconds. MCP tool errors carry the same fields, so an agent can decide to retry, stop, or show the purchase link to its user.
{"error":"needs up to 1 credits, 0 left","code":"insufficient_credits","retryable":false,
"credits_left":0,"buy_url":"https://webscraper.apexflowlabs.com/#pricing"}| Status | Action |
|---|---|
400 access_challenge, http_error, robots_denied | The live site refused. Follow the hint: retry with "fallback":"archive". |
400 invalid_request | Check the URL and options. A blocked or disallowed source may also return 400. |
401 invalid_key | Use a valid API key. The response links to the free trial. |
402 insufficient_credits / inactive_plan | Open buy_url to add credits or renew. |
429 rate_limited | Wait retry_after seconds, then retry. |
| 502 / 503 / 504 | Temporary failure. Retry with backoff. Failed scrapes return reserved credits. |
Hosted versus self-hosted
The hosted API supports single-page and parallel 10-URL batch scraping, whole-site crawl jobs, change tracking with diffs, sitemap discovery, deterministic CSS extraction, AI extraction to a JSON Schema on paid plans, account-scoped saved-page search, Markdown/text, PDF/DOCX, rendering, screenshots and chunks. The open-source edition additionally supports local search, sitemap discovery, crawl jobs, change tracking and extraction with your own supported model provider. The open-source edition can also read pages you are signed in to, through your own browser profile on your own machine: rainbo-scrape login URL opens a browser window for you to sign in, then rainbo-scrape fetch URL --signed-in reads with that session. Nothing from that session is sent to the hosted service. Python and Node clients for the hosted API are in the repository.
Responsible collection
Only submit public URLs you are authorized to collect. Crawls and site maps obey robots.txt. A page you request by its exact address is read even where robots.txt disallows it, and the receipt says so. We do not bypass login requirements, CAPTCHAs or bot walls. When a live read is refused you receive the latest Internet Archive copy, labelled with its capture time, unless you send "fallback":"none". Do not put credentials or personal information in URLs.