Clients
SDKs & integrations
Every client wraps the same v1 API and behaves the same way: the key comes from PAGETEER_API_KEY (base URL from PAGETEER_BASE_URL, default https://api.pageteer.com), 429 and 5xx are retried with backoff that honors Retry-After, a 402 is never retried, and crawl and batch submits send an Idempotency-Key so a retry never starts a second job.
| Integration | Package | What it gives you |
|---|---|---|
| JavaScript / TypeScript | @pageteer/clientclients/js | Every endpoint, zero dependencies; Node 18+, Bun, Deno and edge runtimes. Full reference |
| Python | pageteerclients/python | Sync and async clients, typed responses and exceptions; Python 3.9+, depends only on httpx. |
| LangChain | langchain-pageteerclients/langchain-pageteer | PageteerLoader (pages, mapped sites or whole crawls as Documents) and PageteerSearchTool for agents. |
| n8n | n8n-nodes-pageteerclients/n8n-nodes-pageteer | A community node with Render, Screenshot, Extract, Search, Map and Crawl; usable as an AI agent tool. |
| MCP server | @pageteer/mcpclients/mcp | Web search, page fetching, extraction, screenshots, site maps, crawling and page monitors as tools for Claude, Cursor and other MCP clients. Full reference |
The packages are not on npm or PyPI yet: install them from the Pageteer repository as shown below. While you build, use a test key (pk_test_…): every client then gets deterministic fake results for free.
JavaScript / TypeScript
npm install /path/to/pageful/clients/jsimport { Pageteer } from '@pageteer/client';
const pageteer = new Pageteer(); // PAGETEER_API_KEY
const page = await pageteer.render('https://example.com', { formats: ['markdown'] });
console.log(page.markdown, page.meta.creditsUsed);
const job = await pageteer.crawl.run({ url: 'https://docs.example.com', max_pages: 25 });
for (const p of job.pages) console.log(p.url, p.title);Python
pip install /path/to/pageful/clients/pythonfrom pageteer import Pageteer, PageteerError
client = Pageteer() # PAGETEER_API_KEY, PAGETEER_BASE_URL
page = client.render("https://example.com", formats=["markdown"])
print(page["markdown"], page["meta"]["credits_used"])
hits = client.search("best pizza minneapolis", n=5)
shot = client.screenshot("https://example.com", full_page=True)
shot.save("example.png")
job = client.crawl.run("https://docs.example.com", max_pages=25, wait_timeout=600)
for p in job["pages"]:
print(p["url"], p.get("title"))
urls = client.map("https://example.com", search="pricing")["urls"]
product = client.extract("https://shop.example.com/p/1", template="product")["data"]
monitor = client.monitors.create("https://example.com/pricing", interval="daily", selector="#plans")AsyncPageteer has the same methods with await. Failures raise PageteerError subclasses (PaymentRequiredError, RateLimitError, TargetError…) carrying the error code, request id and retry_after. Batch results page with client.batch.iter_results(job_id); finished crawls download with client.crawl.export(job_id, "llms.txt").
LangChain
pip install /path/to/pageful/clients/python /path/to/pageful/clients/langchain-pageteerfrom langchain_pageteer import PageteerLoader, PageteerSearchTool
docs = PageteerLoader(["https://example.com"]).load() # one Document per URL
docs = PageteerLoader("https://docs.example.com", mode="crawl",
params={"max_pages": 50}).load() # one Document per crawled page
docs = PageteerLoader("https://example.com", mode="map",
map_params={"search": "blog"}).load() # map the site, render what matches
search = PageteerSearchTool(max_results=5)
print(search.invoke({"query": "pageteer browser api"}))Documents carry the page's Markdown with source, title, status, credits and crawl depth as metadata. The search tool returns API errors to the model as text, so an agent can react to rate_limited or insufficient_credits.
n8n
cd /path/to/pageful/clients/n8n-nodes-pageteer && npm install && npm run build && npm pack
mkdir -p ~/.n8n/custom && cd ~/.n8n/custom && npm init -y >/dev/null
npm install /path/to/pageful/clients/n8n-nodes-pageteer/n8n-nodes-pageteer-0.1.0.tgz
# restart n8n, then add a "Pageteer API" credential with your keyThe Pageteer node has Render, Screenshot (an image in a binary field), Extract (templates, selectors, schemas), Search (one item per result, optionally with page contents), Map (one item per URL) and Crawl (waits for the job and outputs one item per page, or returns the job ID). Errors read Pageteer <code>: <message>; with Continue On Fail they become items.
MCP server
claude mcp add pageteer --scope user \
-e PAGETEER_API_KEY=pk_live_… \
-- node /path/to/pageful/clients/mcp/dist/index.jsTools: web_search, fetch_page, extract, screenshot, map_site, crawl_site, the monitor tools (watch_page, list_monitors, monitor_changes, check_monitor, manage_monitor) and check_usage. Setup for Claude Desktop, Cursor and .mcp.json is on the MCP server page.
Other languages
Generate a client from the OpenAPI spec, or call the API directly: every endpoint page has curl, JavaScript and Python samples.