Overview
One request per page, no session to manage: fetch, screenshot, PDF, extract and crawl.
Sometimes you only need a page, not a whole session. The web APIs open a URL in a real Chrome, inside a sandbox, and give you the result in one request. There is nothing to create or stop.
The APIs
| API | You get | Limit per project |
|---|---|---|
Fetch POST /v1/fetch | The page as Markdown, HTML or text, and its links if you ask. | 120 per minute, shared |
Screenshot POST /v1/screenshot | A PNG or JPEG of the page, the whole page, or one element. | |
PDF POST /v1/pdf | The page printed to PDF. | |
Extract POST /v1/extract | JSON from up to 10 pages, shaped by your schema or prompt. Uses an AI model. | 30 per minute |
Crawl POST /v1/crawls | Up to 200 pages of a site on Free, 1,000 on paid plans, followed link by link in the background. | 10 per minute |
Search POST /v1/search | Web search results, with the top pages as Markdown if you want them. | 60 per minute |
One request
curl -X POST https://api.boxline.dev/v1/fetch \ -H "x-api-key: $BOXLINE_API_KEY" \ -H "content-type: application/json" \ -d '{"url": "https://example.com"}'const page = await bx.fetch("https://example.com");console.log(page.content);page = bx.fetch("https://example.com")print(page["content"])boxline fetch https://example.com # Markdown on stdoutOptions they share
Every web API takes these, next to its own options:
| Field | Default | Description |
|---|---|---|
waitUntil | "load" | When the page counts as loaded: "load", "domcontentloaded", "networkidle" (no network traffic for a moment) or "commit". |
delayMs | 0 | Extra wait after the page loads, up to 10,000 ms. Useful for pages that draw late. |
timeoutMs | 30000 | How long to wait for the page, from 1,000 to 120,000 ms. |
proxy | none | Load the page through a residential, datacenter or your own proxy, e.g. { "type": "residential", "country": "FR" }. The IP changes with every request unless you ask for "ip": "sticky". See Proxies. |
browser | standard | The page’s clock and language, e.g. { "mode": "realistic" } to follow the proxy’s country, or { "locale": "fr-FR", "timezone": "Europe/Paris" }. See Browser mode. |
blockAds | false | Refuse requests to ad and tracker sites while the page loads: faster, with less clutter, and no proxy data spent on them. See Ad and cookie-banner blocking. |
Web API or session?
- Web API when one page load is enough: read an article, check a price, take a picture.
- A session when the work needs clicks, a login, downloads, or several pages in one browser. See Configuring sessions.
- The AI agent when you would rather describe the goal than write the steps. See AI agent.
Your plan must include the web APIs (and extract and crawl, which are separate switches). See Plans and features. The SDKs are @boxline/sdk and boxline-sdk.
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.