Make your first request
A capture is asynchronous. Create the task, poll its status, then read the saved result.
Create an API key
Generate a key in the dashboard and copy it once.
Submit a URL
Use browser or automatic capture.
Read the result
Poll the task until it succeeds, then fetch its result.
1. Create an API key
Keys start with fb_live_. FetchBeam stores only a fingerprint, so the full secret cannot be shown again.
2. Submit a capture
Use an idempotency key when a request may be retried by your system.
curl -X POST https://fetchbeam.com/v1/captures \
-H "Authorization: Bearer fb_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: capture-products-001" \
-d '{
"url": "https://example.com/products",
"mode": "browser",
"outputs": ["html", "text", "extract"],
"goal": "Product name, price and link"
}'{
"success": true,
"task_id": "6d06c8e8-…",
"status": "QUEUED",
"created_at": "2026-09-30T02:18:00.000Z",
"retry_after": 1
}Authentication
Send the API key as a Bearer token on every /v1 request. Never expose the key in frontend code or browser URLs.
Current public API
These endpoints are implemented today. Planned fields and endpoints are deliberately omitted so examples can be copied into production code.
/v1/capturesCreate a durable capture task/v1/tasksList tasks; filter by status or search with q/v1/tasks/{task_id}Read status and metadata/v1/tasks/{task_id}/resultRead the saved result after SUCCESS/v1/tasks/{task_id}/cancelCancel an unfinished task/v1/batchesCreate an ordered batch/v1/usageRead current usage and balance/v1/credit-ledgerRead the account Credit ledger/v1/packagesRead package options and the active package/v1/packagesBuy a package with purchased Credits; requires Idempotency-Key/v1/vouchers/redeemRedeem a one-time Credit voucherCreate a capture
POST /v1/captures returns a task ID immediately. Both auto and browser currently run through the managed browser pool.
/v1/captures202| Field | Type | Description |
|---|---|---|
url | stringRequired | Public HTTP or HTTPS URL, up to 2,048 characters |
mode | auto | browserOptional | Capture mode; defaults to auto |
outputs | string[]Optional | Any of html, text, extract |
goal | stringOptional | Plain-language collection goal, up to 1,000 characters |
allow_payg_fallback | booleanOptional | When a package is exhausted, explicitly allow 2-Credit pay-as-you-go capture |
Managed browser capture, HTML, text, deterministic extract output, durable tasks, idempotency, and batch export.
Direct HTTP mode, screenshots, request cookies, proxy and wait options, and an API-triggered AI extraction call. Do not send these fields yet.
Task lifecycle
Use the task resource as the source of truth. Poll every three seconds unless Retry-After asks you to wait longer.
/v1/tasks/{task_id}PENDING → QUEUED → STARTING → RUNNING → SUCCESS / FAILED / TIMEOUT / CANCELED/v1/tasks/{task_id}/resultSaved HTML, text, and deterministic extract output are available after SUCCESS. request_headers is returned only with an active Pro or Business package; request_headers_access indicates availability. Page files are available for 24 hours. Download them before they expire. HTTP 410 / RESULT_EXPIRED: This page file has expired and cannot be viewed or downloaded. Run a new capture.Poll, then read the result
Stop polling on every terminal state. Read /result only after SUCCESS; otherwise it returns RESULT_UNAVAILABLE.
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
let task;
do {
const response = await fetch(
"https://fetchbeam.com/v1/tasks/6d06c8e8-…",
{ headers: { Authorization: "Bearer fb_live_YOUR_API_KEY" } }
);
({ task } = await response.json());
if (["FAILED", "TIMEOUT", "CANCELED"].includes(task.status)) {
throw new Error(task.error_message || "Capture " + task.status);
}
if (task.status !== "SUCCESS") await delay(3000);
} while (task.status !== "SUCCESS");
const result = await fetch(
"https://fetchbeam.com/v1/tasks/" + task.id + "/result",
{ headers: { Authorization: "Bearer fb_live_YOUR_API_KEY" } }
).then((response) => response.json());AI organization
AI organization currently runs from the signed-in dashboard after a successful capture. The goal field is saved with the task and guides analysis, but creating a public API task does not invoke the model by itself.
Batch capture
Create multiple durable captures together, track ordered items, retry failed items, and merge successful results into one download.
/v1/batchesCreate an ordered batch/v1/batches/{batch_id}Read progress and items/v1/batches/{batch_id}/retryRetry one failed item/v1/batches/{batch_id}/cancelCancel unfinished items/v1/batches/{batch_id}/export?format=csvDownload successful results/v1/batches/{batch_id}/export?format=jsonlDownload JSON LinesRetries only FAILED or TIMEOUT items and reserves credits for the replacement task.
Exports successful results as CSV, JSON, or JSONL.
Create a batch
curl -X POST https://fetchbeam.com/v1/batches \
-H "Authorization: Bearer fb_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: batch-products-001" \
-d '{
"name": "Supplier pages",
"urls": [
"https://example.com/products/1",
"https://example.com/products/2"
],
"outputs": ["html", "text", "extract"]
}'Credits & limits
A successful browser capture costs 2 Credits, or one capture from an active package. Successful AI extraction costs 2 Credits pay-as-you-go, or 2 / 1 / 0 Credits with an active Developer / Pro / Business package. Failed reservations are released.
Default and trial limits
Errors
Errors use a stable code and include X-Request-Id. Preserve that header when contacting support.
{
"success": false,
"code": "INVALID_REQUEST",
"error": "A readable message"
}| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | The request body or parameters are invalid. |
| 401 | INVALID_API_KEY | The Bearer key is missing, invalid, or revoked. |
| 402 | INSUFFICIENT_CREDITS | The account does not have enough available Credits. |
| 404 | RESULT_UNAVAILABLE | The task has no saved result yet. |
| 409 | TASK_NOT_RETRYABLE | The resource state does not allow this operation. |
| 413 | BODY_TOO_LARGE | The request or generated export is too large. |
| 422 | FEATURE_NOT_AVAILABLE | The requested engine or feature is not enabled. |
| 429 | RATE_LIMITED | Wait before submitting more requests. |
| 503 | SERVICE_UNAVAILABLE | Retry temporary failures with exponential backoff. |