Skip to content

Library API

The import
import { openCrawler } from "polite-crawler";

The package is ESM only, and it includes its TypeScript declarations.

The function opens a crawler on a folder and gives a HybridCrawler. It is an OpenedCrawler (a PoliteCrawler that has discover, crawl, diff, watch and extract) with hybrid search: hybrid, embed and rankWithin. These members are optional in PoliteCrawler, so an object of your own that implements the interface of 0.1.1 or 0.1.2 stays correct.

Option Type Default What it does
dir string (necessary) The folder of the capture log, the bodies and the index.
token string "PoliteCrawler" The product token that robots.txt rules match.
userAgent string PoliteCrawler/<version> (+<bot page>) The full User-Agent header.
contact string none An address for the User-Agent. An email address goes into the From header too.
renderer Renderer | false a Playwright renderer The browser for pages that need JavaScript. false turns rendering off.
maxActive number 16 The number of hosts that get requests at one time.
onBehalfOf string[] [] More product tokens whose robots.txt rules apply, for example ["Claude-User"].
dispatcher Dispatcher an undici agent The dispatcher for the requests, for a proxy or a test.
egress EgressOptions public addresses only The addresses that the crawler fetches. { allowPrivate: true } permits loopback and private addresses.
politeness PolicyOptions DEFAULT_POLICY The limits of the policy, for each host or for some hosts.
hostState HostStateStore the file hosts.sqlite in dir The pace, the counts and the stops of each host. The processes on one store share the file.
clock Clock the real clock The time of the crawler and the index, for a test.
scope string none A label for each capture record.
onEvent (event) => void none A function that gets each request, response, wait, stop and skip.
extractors Record<string, Extractor> the recipe page The readers of the recipes of an application.
recipes Recipe[] none The recipes of defineRecipe. reindex reads their captures.
watchFloor a duration, for example "1h" "1h" The shortest every of a watch.
embedder Embedder none The local model of hybrid search: transformersEmbedder, ollamaEmbedder or your own.

createRuntime(options) takes the same options, and your own log, blobs and index in place of dir. It gives the parts of the runtime that openCrawler uses. Then use catchUpIndex(runtime), as openCrawler does at open. It rebuilds a stale index. When the index is behind the log, it adds the captures that the index missed.

The crawler of openCrawler has these methods. find, read, verify, extract, versions and diff read the store and send no request.

The method fetches a page, reads it and adds it to the index. It gives a PageResult.

Option Type Default
render "auto" | "never" | "always" "auto"
maxAge a count of milliseconds, or a text, for example "30m", "24h" or "7d" "24h"
onBehalfOf string[] []
signal AbortSignal none
scope, labels a text, and a record of texts none
fallback "archive" | "none" "none"
archiveDespiteRobots boolean false

The value "0" of maxAge asks the site again, and "auto" uses the freshness that the server gave.

With fallback: "archive", a page that the site refuses, or a site that is down, gets a copy from the Wayback Machine or Common Crawl. The result then has archived: the archive, the date of the copy and its URL there. Its outcome stays the outcome of the live fetch. By default, a page that the current robots.txt disallows gets no copy, and archiveDespiteRobots changes that.

PageResult
interface PageResult {
url: string;
doc: string | null; // the document id, for read and verify
outcome: string; // ok, not-modified, skipped, blocked, rate-limited and others
status: number;
title: string | null;
chars: number;
rendered: boolean;
structured: string[]; // the schema.org types of the JSON-LD
links: number;
captures: string[]; // the capture ids behind the text, 10 or fewer
capture: string | null; // the capture of the text to cite
capture_count: number;
fetched_at: string | null; // when the crawler fetched this text
from_cache: boolean; // true when the store answered with no request
held_back: boolean; // true when the page asked not to be AI input
note: string | null; // for example "robots.txt disallows it for PoliteCrawler"
archived?: { source: "wayback" | "commoncrawl"; timestamp: string; url: string; original: string }; // an archived copy, not a fresh fetch
}

The method searches the stored documents with SQLite FTS5 and BM25, and gives a promise. It sends no request. The options are limit (default 10), kind (for example "page" or "pdf") and rank. Each result has doc, kind, title, url, snippet, score, ai_input, capture and fetched_at.

  • rank is "exact" (the default), "fast" or "hybrid". "fast" makes a long question faster. "hybrid" also finds by meaning, and each hit then has passage. Hybrid search tells how.

  • Text in double quotes is a phrase, and bake* is a prefix.

  • The documents that hold each word come first, then the documents that hold one word.

  • Case, accents and Unicode forms do not change a match. Chinese, Japanese and Thai words match too.

  • A page that refuses AI input is not in the results.

The method gives a range of the text of a document. The options are from (default 0), length (default 4000), capture, at and userProvided. A from or a length less than 0 is an error. The result names the capture and the fetched_at of its text. With capture, the method reads the text of that capture, not the current text.

With at (an ISO 8601 time or a Date), the method reads the version that was current at that time. The rules that choose the current version apply to the versions of that time. The result gives at. When at is before the first capture, before_first is true, the text is empty, and the note gives the time of the first capture. Give capture or at, not the two.

When a page refuses AI input, the title and the text are empty, and held_back is true, unless userProvided is true. A capture of a version that refused AI input is held back too. The crawler records each userProvided read. The MCP server sets it only with a signal from a person: read the rule.

The method finds a quote in a stored document, and gives a promise. It ignores case, spaces, typographic punctuation, soft hyphens and Unicode forms. It gives found, the start and end positions, an excerpt, and the capture, blob and fetched_at of the text that holds the quote.

  • With no option, it examines the current text first, then the earlier texts. stale is true when only an earlier capture holds the quote.
  • With capture, it examines the text of that capture only. A citation of that capture thus stays true after a new fetch.
  • With at, it examines only the version that was current at that time. A time before the first capture gives found: false and before_first: true.
  • A page that refuses AI input gives found: false and held_back: true, unless userProvided is true.
  • An earlier version that refused AI input stays held back after a later capture drops the signal. With no option, the method does not examine it, and the note says so.

The method checks the values that you propose for the fields of a stored document, and gives a promise. It does not make values. It only checks and locates the values that it gets. It sends no request.

A check of three fields
const result = await crawler.extract(page.doc!, {
price: { value: "4.50 EUR", kind: "money" },
since: { value: "2026-03-04", kind: "date" },
offer: { value: "4.50", kind: "json-ld:Product.offers.price" },
});
// a page that says "€4,50" gives "normalized", with the span of "€4,50" and its capture
const { status, normalization, span, capture } = result.fields["price"]!;
Option Type What it does
capture string Check the version of this capture, not the current version.
at string | Date Check the version that was current at this time. Give capture or at, not the two.
userProvided boolean Check a page that refuses AI input. Use it only for a URL that a person gave. The crawler logs it.

Each field has a value (a text or a number) and a kind: text, number, money, date, url, email, phone or json-ld:<path>. The result of each field gives these values:

  • status: verified (the exact text), normalized (a different form), ambiguous (more than one meaning), not-found, held-back or invalid.
  • span (start, end and in) or path, the stored text (raw), an excerpt and the reading that matched.
  • normalization: the names of the normalizations, joined with +, for example thousands-separator+number-form.
  • candidates: the places of an ambiguous field, each with its readings. The method does not choose one.
  • capture and fetched_at of the text that the method read.

A normalized match must have one meaning. 1,234, 03/04/2026 and $12 for USD 12 give ambiguous, and the method does not guess. A page that refuses AI input gives held-back for each field, with no position, unless userProvided is true. The README of the package gives each normalization.

checkFields(source, fields) does the same check on a text and its metadata, with no store.

The method gives the versions of a document, the newest first: the capture, the blob, the fetch time and the length of each text. A version that refused AI input shows no title.

The method finds the pages of a site from its sitemaps and its feeds, and gives a promise. It fetches the files that list the pages, not the pages. Each file is a polite fetch with its capture.

Option Default What it does
maxFiles 20 The most sitemap and feed files to read.
maxUrls 10000 The most URLs to give.
maxBytes 10 MiB The most bytes of one file, after decompression.
maxNesting 3 The most levels of sitemap index to follow.
budgetMs 60000 The longest time of the discovery. No request starts after it.
sameSite, allowHosts the site of site The hosts whose URLs discovery keeps.
feeds, sitemaps none More feeds and sitemaps to read.
linkedFeeds true Read the page at site for the feeds that it links.
maxAge, onBehalfOf, signal, scope, labels as for fetch These options apply to each file.

The result gives urls (each with url, lastmod, changefreq, via and source), the newest lastmod first. It also gives sources (what discovery did with each file), dropped (the URLs that it did not keep, for each reason), stopped and note. Discovery keeps a URL only when robots.txt permits it.

The method fetches the seeds, then follows the links of each page on the same site. It gives a CrawlRun: a for await loop gets each page when its fetch ends, and summary resolves at the end.

Option Default What it does
maxPages 100 The most pages that the crawl gives.
maxDepth 3 The most links from a seed to a page.
budgetMs 600000 The longest time of the crawl. No request starts after it.
sameSite, allowHosts the sites of the seeds The hosts that the crawl follows.
include, exclude none Patterns: /blog/* matches a path, and a RegExp tests the whole URL.
useSitemaps false Add the pages of the sitemaps, the newest first.
render, maxAge, onBehalfOf, signal, scope, labels as for fetch These options apply to each page.

Each page is a PageResult with depth, source (seed, sitemap or link) and referrer. The summary gives the counts of the pages and of the links that the crawl did not follow, and stopped and reason. The crawl keeps one request at a time for each host, at its pace. Its state is in memory, for one call.

The method compares two versions of a stored document, and gives a promise. It sends no request.

Option Default What it does
from the version before to of the same kind The old version: a capture id, or { at } for the version that was current at a time.
to the newest version The new version: a capture id, or { at }.
limits DIFF_LIMITS The bounds of the diff: characters, lines, steps, hunk lines and changes of the metadata.

The result gives from and to (the capture, the fetch time and the length of each version) and summary (the counts of the lines, the words and the changes of the metadata). It also gives hunks and meta:

  • hunks give the text as a line diff with 2 lines of context. A changed line pairs a removed line with an added line, and its words give the word diff.
  • meta gives the changes of the title, the URL and the metadata at their paths, for example meta.jsonld[0].openingHours.
  • The line diff uses the algorithm of Myers, with a budget of steps. A large change stays bounded. Then exact is false or truncated is true, and the note tells why.
  • When a version or the document is held back, the result has no text and no title, and same is null.

The watch list keeps the pages that the crawler checks again on a schedule, in the file watch.sqlite of the store.

A watch of a page, and one run
await crawler.watch.add("https://example.com/hours", { every: "6h" });
const run = crawler.watch.run({ budgetMs: 120_000 });
for await (const event of run) console.log(event.kind, event.suspected, event.confirmed, event.url);
console.log(await run.summary);
Method What it does
add(url, options?) It adds a page, or changes the options of its watch. The options are every (default 24h, floor 1h), confirm (2 or 1, default 2), render, labels, scope, onBehalfOf and keepSchedule. A new entry is due at once.
remove(url) It removes a page. It gives false when the list does not have the page.
list() It gives the entries, the first due first, with the last confirmed capture and a suspected change.
run(options?) It checks the due entries through the normal fetch, to budgetMs (10 minutes) and maxPages (100). It gives a WatchRun.
reschedule(url, { at }) It changes the time of the next check of a page, not before one floor after the last check. It gives the entry, or undefined. It is beta.

Each event has the kind of the check: new, changed, unchanged, gone, refused or error. It also has the capture of the check, the last confirmed capture (previous) and the counts of the diff.

  • With confirm: 2, a change is suspected at its first check. The next check gives confirmed when it sees the same version.
  • A check that finds a stopped host is due again at the end of the stop.
  • A run claims each entry with a lease, so two processes do not check one entry two times.
  • A scheduler of the operator starts watch.run, or the daemon starts it on a schedule.

The method builds the index again from the capture log and the blobs, with no request. It builds a new index beside the old one, so a rebuild that fails keeps the old index. It gives the counts of the captures, the documents and the URLs, the damaged lines, the missing bodies and the readers that failed. The documents of a recipe that it cannot read stay.

The method closes the browser, the log files and the index. A second close does nothing, and a method after the close rejects.

A recipe tells the crawler what to fetch and how to read it into documents. The package has two recipes, and an SDK for a recipe of your own. Each fetch of a recipe is a fetch of the crawler, so robots.txt, the pace, the stops and the capture log apply.

The recipe reader starts the readers of the two recipes in your browser. Write a recipe starts a recipe of your own.

readVenue, readProduct and runRecipe take a crawler or a runtime of createRuntime. The option onBehalfOf of openCrawler does not apply to them: give onBehalfOf to each call.

The function reads the opening hours of a venue from its own site. It reads the JSON-LD and the text of the home page, and of the pages that most likely hold hours or a menu.

The hours of a venue
import { compareHours, readVenue } from "polite-crawler";
const venue = await readVenue(crawler, "https://forno-esempio.example/", {
name: "Forno Esempio",
osm: "Mo-Fr 07:00-15:00; Sa 08:00-13:00; Su off",
});
console.log(venue.best?.hours, venue.best?.capture, venue.disagree);
const change = compareHours(keptWeek, venue.from_site!.week);
Option Default What it does
pages 3 The pages after the home page that the recipe reads, from 0 to 8.
name none The name of the venue. names_venue tells if the home page names it.
requireName false With true, a home page that does not name the venue gives no reading.
location none The address, or lat and lon, of the venue, for a page that lists more than one location.
osm none An OpenStreetMap opening_hours value. The recipe sends no request to OpenStreetMap.
render, maxAge, onBehalfOf, signal, scope, labels, job as for fetch These options apply to each page.
budget none No request starts after this time.
userProvided, fallback, archiveDespiteRobots as for read and fetch The rule for a held-back page, and the archived copies.
  • Each reading gives from (jsonld, text or osm), rank, label, week, hours, inferred, partial, season and raw. It names its url, doc and capture.
  • best is the best reading of the opening hours. from_site is the best reading of the site itself, with no guess. disagree names the days where the readings disagree.
  • The result also gives pages, menus, phone, captures, moved and held_back.
  • venueReadingsOf(doc) reads one stored document or version with no request.
  • compareHours(kept, reading, { skipSplit }) compares two weeks, day by day. It gives status (same, changed or new) and the days that changed.

The function reads the schema.org Product data of a product page. It takes the options of readVenue that apply to one page.

A product page
import { readProduct } from "polite-crawler";
const product = await readProduct(crawler, "https://bottega-campione.example/products/olio-esempio");
console.log(product.wall, product.name, product.price, product.price_to, product.availability);
  • The result gives name, brand, sku, gtin, price, price_to, availability, availabilities, variant, seller, image, doc and capture.
  • A price is { amount, currency, raw }, with an ISO 4217 currency. price_to is the highest price of a range.
  • The recipe picks the product of the page, not a related product. variant is the variant that the URL names.
  • A shop that refuses the crawler gives wall: true and a note. The crawler does not try a different identity.
  • productOf(records, url) reads JSON-LD records with no request.

The function declares a recipe of your own: its name, the request for an input and the extractor.

A recipe for a menu API
import { defineRecipe, openCrawler, runRecipe } from "polite-crawler";
const menu = defineRecipe({
name: "forno-menu",
mode: "api",
minInterval: "2s",
fetch: (day: string) => `https://api.forno-esempio.example/menu?day=${day}`,
extract: (body, capture) =>
(JSON.parse(new TextDecoder().decode(body)) as { items: { id: string; name: string }[] }).items.map((item) => ({
doc: `menu:forno-esempio/${item.id}`,
kind: "menu-item",
title: item.name,
text: item.name,
url: capture.url,
meta: {},
})),
});
const crawler = openCrawler({ dir: "./crawl", recipes: [menu] });
const run = await runRecipe(crawler, menu, "mon");
Value Default What it does
name (necessary) The name that goes into each capture record. Do not change it.
extract (necessary) The pure function that reads a body into documents.
fetch the input is the URL The function that gives the request for an input.
mode page page obeys robots.txt. api is a documented API.
accept, minInterval, maxAge, maxBytes, description The Accept header, the pace of the source, the age of a stored copy and the size of a body.
  • runRecipe(crawler, recipe, input, options?) gives outcome, docs, capture, from_cache, held_back, error and note. reindex reads the captures of the recipe again.
  • An extractor is pure and sends no request. When it throws, the runtime reports the error, and the fetch continues.
  • readJson(body, capture) reads a body as JSON in its declared encoding, and names a body that is not JSON.
  • The name of a recipe is part of each capture id. The README of the package gives each rule.

Hybrid search fuses the BM25 ranking with the ranking of the vectors of a local model. It is opt-in, and it needs the option embedder. How hybrid search ranks shows the two lists and their fusion.

Hybrid search with transformers.js or Ollama
import { ollamaEmbedder, openCrawler, transformersEmbedder } from "polite-crawler";
const crawler = openCrawler({ dir: "./crawl", embedder: transformersEmbedder() });
// or: embedder: ollamaEmbedder({ model: "nomic-embed-text" })
await crawler.embed({ budget: "10m" });
const hits = await crawler.find("a loaf with a dark crust", { rank: "hybrid" });
const ranked = await crawler.rankWithin("rye", ["url:https://example.com/a"], { rank: "hybrid" });
  • transformersEmbedder(options) uses transformers.js in the process. Install the optional peer @huggingface/transformers. The options are model (Xenova/bge-small-en-v1.5), quantized (true), cacheDir, localOnly, pooling, queryPrefix, documentPrefix and batch.
  • The first use of a transformers.js model downloads it from the Hugging Face Hub, not through the polite crawler.
  • ollamaEmbedder(options) sends the texts to a local Ollama server. The options are model (nomic-embed-text), baseUrl (http://127.0.0.1:11434), batch (32), allowRemote (false), timeoutMs and the prefixes.
  • An Embedder of your own has id (the model and its version), dimensions, maxInputTokens and embed(texts, { signal, purpose }).
Option of find and rankWithin Default What it does
candidates 50 The BM25 candidates. A candidate with no vectors gets them first.
neighbors 50 The documents with the closest chunks, from a brute-force cosine.
fusionK 60 The constant k of reciprocal rank fusion: 1 / (k + rank) for each list.
signal none An AbortSignal that stops the embedder.
  • embed(options) gives vectors to each stored page that has none. The options are budget ("10m"), maxDocs, kind and signal. The result counts the documents, the new texts, the reused vectors and the held-back pages, and gives stopped.
  • The vectors go into vectors.sqlite, a projection beside the index. The key of a row is the hash of the text, the chunk and the id of the embedder, so a reindex keeps each vector.
  • A held-back page does not go to the embedder, and no result gives it.
  • Without an embedder, rank: "hybrid", embed and rankWithin with rank: "hybrid" reject with NO_EMBEDDER.

The option signer of openCrawler signs each request with HTTP Message Signatures, as the Web Bot Auth draft tells (draft-ietf-webbotauth-httpsig-protocol-00).

const crawler = openCrawler({
dir: "./crawl",
signer: { privateKey: pem, signatureAgent: "https://bot.example.com" },
});
  • createWebBotAuthSigner(options) makes a signer from an Ed25519 key. The options are privateKey, signatureAgent, agentType, keyId, lifetimeMs and label.
  • keyDirectory(keys) makes the key directory to host at /.well-known/http-message-signatures-directory, with the type application/http-message-signatures-directory+json.
  • verifySignature(request, directory) checks the signature of a request. Use it to test your setup.

The User-Agent does not change. The README of the package tells how to host the key directory.

exportWarc and exportWacz write the stored captures as WARC/1.1 or WACZ 1.1.1. Archive tools read them, for example warcio, pywb and ReplayWeb.page. They only read the store.

An export of a store and of one site
import { exportWacz, exportWarc } from "polite-crawler";
await exportWarc("./crawl", { out: "crawl.warc.gz" });
const result = await exportWacz(crawler.runtime, { out: "site.wacz", host: "example.com" });
Option Default What it does
out none The archive to write. The export needs it.
since, until none Only the captures received at since or later, and before until.
host none Only the captures of this host and its subdomains.
urlPrefix none Only the captures whose URL starts with this text.
ids none Only the captures with these ids.
includeRefusals false A metadata record for each capture with no body too.
overwrite false Replace the file when it exists.

The result counts the records of each type, the captures with no body, the missing bodies and the damaged lines of the log. A capture keeps only some headers, so the export rebuilds the HTTP header block and marks the record. The README of the package tells what goes into the archive and why.

A daemon in your code
import { startDaemon } from "polite-crawler";
const daemon = await startDaemon({
dir: "./crawl",
tick: "1m",
onChange: (event) => console.log(event.url, event.kind, event.capture),
mcp: { port: 9307 }, // the MCP tools over local HTTP, with a bearer token
});
await daemon.done; // after SIGINT, SIGTERM or daemon.stop()

startDaemon checks the watch list on a schedule. Each tick is one watch.run, so each polite rule applies. The daemon, tick by tick shows a schedule. It takes the options of openCrawler and these options:

Option Default What it does
tick 1m The longest wait between two ticks, 1s or more. A tick comes sooner when an entry is due sooner.
jitter 10s A random wait from 0 to this time after each tick. A check does not come before its time.
budget 10m The budget of the checks of one tick.
maxPages 100 The most checks of one tick.
grace 10s At a stop, the checks in progress get this time to end. Then they abort, and their leases end.
events the standard output A file or a function for the change lines, one JSON line for each change. false writes no line.
onChange none A function for each change. changeCommand(command) gives a function that starts a command of the operator.
mcp none The MCP server over HTTP: port, host, allowRemote, token, tokenFile, onBehalfOf and allowUserProvided.
mcpHost mcpHttpHost of polite-crawler-mcp The seam to the MCP server. A different MCP host can replace the default. The default needs the package polite-crawler-mcp.
signals true false installs no handler of SIGINT and SIGTERM.
  • A change is an event with confirmed: true. The Daemon gives status(), stop(grace?), done, crawler, mcp and stateFile.
  • readDaemonState(dir) reads the state file of a store. scheduleWatches(watch, options) gives the schedule over the watch list of a crawler of your own.
  • startMcpHttpServer(crawler, options) of polite-crawler-mcp serves the tools over HTTP. There, crawl_site and crawl_discover are MCP tasks.

The MCP server is the package polite-crawler-mcp, so polite-crawler loads no MCP SDK and no zod. Until 0.2.0, it was the entry point polite-crawler/mcp. Its nine tools are procedures on the shared MCP host of @procedures/mcp-server.

An MCP server in your code
import { openCrawler } from "polite-crawler";
import { createMcpServer, startMcpServer } from "polite-crawler-mcp";
await startMcpServer({ dir: "./crawl" }); // standard input and output
const server = createMcpServer(openCrawler({ dir: "./crawl" }));
await server.connect(transport); // one transport of the MCP SDK

The server has no tool that adds a watch or writes an export. These are actions of the operator.

Option of createMcpServer Default What it does
onBehalfOf ["Claude-User"] The product tokens whose robots.txt rules apply to each fetch, with the token of the crawler.
allowUserProvided false The opt-in of the operator: user_provided works when the client cannot ask the user.
renderOff none The reason for a server with no browser. A page that needs JavaScript shows it in its note.

startMcpServer takes the options of openCrawler and these options. It turns rendering off at start when no browser is installed. With the option embedder, the tool crawl_find takes rank: "hybrid".

The package is ESM only. These are its entry points:

Import What it gives
polite-crawler openCrawler, and the parts of the runtime for an application. It needs Node.js.
polite-crawler/robots parseRobots, decide, robotsFromStatus, robotsFromResponse, productToken: robots.txt as RFC 9309 specifies it. decide gives the rule that decided and its line. A robots.txt that is a web page is unreadable.
polite-crawler/html extractPage: the JSON-LD, the visible text, the links and the decision about JavaScript. It also gives the canonical URL, a quick redirect, the name of a bot check and notes about what it left out.
polite-crawler/hours fromText, fromSchemaOrg, fromCompact, describeWeek and compareHours: opening hours. A reading tells its season and if it left out a rule (season, partial).
polite-crawler/classify classify, parseRetryAfter: the outcome of a response.
polite-crawler/politeness HostScheduler, backoffMs, restAfter: one request in progress for each host, and the rest of a host after a request.
polite-crawler/signals readSignals: content signals for AI input.
polite-crawler/urls canonicalUrl, cacheKeyOf, siteOf, scopeTest: the canonical form of a URL, its cache key, its site and the scope of a crawl. It imports no module.
polite-crawler/text decodeBody, bodyEncoding: the text of a body in its declared encoding. It imports no module.
polite-crawler/api send, sendWithToken, tokenStore, readGrant, reactToOutcome: the polite send of a documented API, with the OAuth 2.0 client credentials grant, and the reaction of a host to an answer. It stores no page.

The entry points below polite-crawler have no Node.js dependency, so they operate in a browser too. The MCP server is the package polite-crawler-mcp: createMcpServer, startMcpServer and startMcpHttpServer. It needs Node.js.

The main entry point also exports Crawler, CaptureLog, DocIndex, FileBlobStore, Extractors, fetchAndIndex, fetchPage, reindex and makeRecord, for an application that builds its own runtime. It exports the readers that such an application uses: extractPage, decodeBody, readPdf, the hours reader, parseRobots and decide.

The stable API is openCrawler with its results (extract too), the MCP server of polite-crawler-mcp, the reader entry points, and exportWarc and exportWacz. The recipes (readVenue, readProduct, compareHours) and the recipe SDK (defineRecipe, runRecipe) are stable too. The diff, the watch list, the command line and the store on disk are stable too. The parts of the runtime are the engine: before version 1.0.0, a minor version can change them, and the changelog says so. The declaration of each part of the engine has the tag @beta, so your editor shows it. The API review gives the tier of each export, and CI compares the public API with a report of it.