API Reference
Complete reference for the Scraper REST API. All endpoints require authentication via API key.
Authentication
Include your API key in the X-API-Key header with every request. Generate keys from the dashboard under Settings > API Keys.
X-API-Key: scr_live_your_key_hereBase URL
https://scraper.bot/api/flowsList all flows. Supports filtering by status and mode.
Query Parameters
| Name | Type | Description |
|---|---|---|
status | string | Filter by flow status: active, paused, draft, error |
mode | string | Filter by flow mode: extract, interact, monitor |
Response
{
"data": [
{
"id": "flow-1",
"name": "Product Price Monitor",
"status": "active",
"mode": "monitor",
"url": "https://example-store.com/products",
"successRate": 98.5,
"totalRuns": 248,
"createdAt": "2026-02-15T10:00:00Z"
}
],
"total": 6
}Examples
curl https://scraper.bot/api/flows?status=active \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/flows?status=active", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/flowsCreate a new flow.
Request Body
{
"name": "My New Flow",
"description": "Scrape product listings",
"url": "https://example.com/products",
"mode": "extract",
"steps": [
{ "type": "navigate", "label": "Go to page" },
{ "type": "extract", "label": "Extract data" }
],
"outputSchema": { "title": "string", "price": "number" }
}Response
{
"data": {
"id": "flow-1710000000000",
"name": "My New Flow",
"status": "draft",
"createdAt": "2026-03-18T12:00:00Z"
}
}Examples
curl -X POST https://scraper.bot/api/flows \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"My New Flow","url":"https://example.com","mode":"extract"}'const res = await fetch("/api/flows", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My New Flow",
url: "https://example.com",
mode: "extract",
}),
});
const { data } = await res.json();/flows/:idGet a single flow by ID.
Response
{
"data": {
"id": "flow-1",
"name": "Product Price Monitor",
"description": "Track prices across e-commerce sites",
"url": "https://example-store.com/products",
"mode": "monitor",
"status": "active",
"steps": [...],
"outputSchema": { "name": "string", "price": "number" },
"successRate": 98.5,
"totalRuns": 248
}
}Examples
curl https://scraper.bot/api/flows/flow-1 \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/flows/flow-1", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/flows/:idUpdate an existing flow. Merge-patches the provided fields.
Request Body
{
"name": "Updated Flow Name",
"status": "active"
}Response
{
"data": {
"id": "flow-1",
"name": "Updated Flow Name",
"status": "active",
"updatedAt": "2026-03-18T12:00:00Z"
}
}Examples
curl -X PUT https://scraper.bot/api/flows/flow-1 \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Updated Flow Name","status":"active"}'const res = await fetch("/api/flows/flow-1", {
method: "PUT",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Updated Flow Name" }),
});/flows/:idDelete a flow by ID.
Response
{
"message": "Flow flow-1 deleted successfully"
}Examples
curl -X DELETE https://scraper.bot/api/flows/flow-1 \
-H "X-API-Key: scr_live_your_key_here"await fetch("/api/flows/flow-1", {
method: "DELETE",
headers: { "X-API-Key": "scr_live_your_key_here" },
});/runsList all runs. Supports filtering by flow ID and status.
Query Parameters
| Name | Type | Description |
|---|---|---|
flowId | string | Filter runs by flow ID |
status | string | Filter by run status: queued, running, completed, failed, cancelled |
Response
{
"data": [
{
"id": "run-1",
"flowId": "flow-1",
"flowName": "Product Price Monitor",
"status": "completed",
"startedAt": "2026-03-18T12:00:00Z",
"duration": 12400,
"itemsExtracted": 147,
"cost": 0.003
}
],
"total": 5
}Examples
curl https://scraper.bot/api/runs?flowId=flow-1&status=completed \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/runs?flowId=flow-1", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/runsTrigger a new run for a flow. The run starts in queued status.
Request Body
{
"flowId": "flow-1"
}Response
{
"data": {
"id": "run-1710000000000",
"flowId": "flow-1",
"flowName": "Product Price Monitor",
"status": "queued",
"startedAt": "2026-03-18T12:00:00Z",
"cost": 0
}
}Examples
curl -X POST https://scraper.bot/api/runs \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"flowId":"flow-1"}'const res = await fetch("/api/runs", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ flowId: "flow-1" }),
});/runs/:idGet a single run by ID, including full logs.
Response
{
"data": {
"id": "run-1",
"flowId": "flow-1",
"status": "completed",
"duration": 12400,
"itemsExtracted": 147,
"logs": [
{ "timestamp": "...", "level": "info", "message": "Run started" },
{ "timestamp": "...", "level": "info", "message": "Extracted 147 items" }
],
"outputPreview": [...]
}
}Examples
curl https://scraper.bot/api/runs/run-1 \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/runs/run-1", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();
console.log(data.logs);/extractOne-shot extraction. Send a URL and optional instructions to get structured data back instantly without creating a flow.
Request Body
{
"url": "https://example-store.com/products",
"instructions": "Extract all product names and prices",
"schema": {
"name": "string",
"price": "number"
}
}Response
{
"data": {
"url": "https://example-store.com/products",
"extractedAt": "2026-03-18T12:00:00Z",
"itemCount": 3,
"items": [
{ "name": "Wireless Headphones Pro", "price": 79.99 },
{ "name": "USB-C Hub 7-in-1", "price": 34.99 },
{ "name": "Mechanical Keyboard", "price": 129.99 }
]
}
}Examples
curl -X POST https://scraper.bot/api/extract \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url":"https://example-store.com/products","instructions":"Extract all product names and prices"}'const res = await fetch("/api/extract", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example-store.com/products",
instructions: "Extract all product names and prices",
schema: { name: "string", price: "number" },
}),
});
const { data } = await res.json();
console.log(data.items);/keysList all API keys. Keys are returned masked for security.
Response
{
"data": [
{
"id": "key-1",
"name": "Production API Key",
"key": "scr_live_****xxxx",
"createdAt": "2026-01-15T10:00:00Z",
"scopes": ["flows:read", "flows:write", "runs:read", "runs:write"]
}
],
"total": 3
}Examples
curl https://scraper.bot/api/keys \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/keys", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/keysCreate a new API key. The full key is only returned once on creation.
Request Body
{
"name": "My New Key",
"scopes": ["flows:read", "runs:read", "runs:write"]
}Response
{
"data": {
"id": "key-1710000000000",
"name": "My New Key",
"key": "scr_live_abc123def456...",
"createdAt": "2026-03-18T12:00:00Z",
"scopes": ["flows:read", "runs:read", "runs:write"]
}
}Examples
curl -X POST https://scraper.bot/api/keys \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"My New Key","scopes":["flows:read","runs:read"]}'const res = await fetch("/api/keys", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My New Key",
scopes: ["flows:read", "runs:read"],
}),
});
const { data } = await res.json();
// Save data.key - it won't be shown again/runs/triggerTrigger a run for a flow by flow ID. Alias for POST /runs with additional trigger metadata.
Request Body
{
"flowId": "flow-1",
"trigger": "api"
}Response
{
"data": {
"id": "run-1710000000000",
"flowId": "flow-1",
"status": "queued",
"trigger": "api",
"startedAt": "2026-03-19T12:00:00Z"
}
}Examples
curl -X POST https://scraper.bot/api/runs/trigger \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"flowId":"flow-1","trigger":"api"}'const res = await fetch("/api/runs/trigger", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ flowId: "flow-1", trigger: "api" }),
});/generateGenerate a complete scraping flow from a natural language description using Claude AI.
Request Body
{
"prompt": "Scrape all product names and prices from this e-commerce page",
"url": "https://example-store.com/products"
}Response
{
"data": {
"name": "Product Price Scraper",
"description": "Extract product names and prices",
"url": "https://example-store.com/products",
"mode": "extract",
"steps": [
{ "type": "navigate", "url": "https://example-store.com/products" },
{ "type": "extract", "selector": ".product-card", "fields": ["name", "price"] }
],
"outputSchema": { "name": "string", "price": "number" }
}
}Examples
curl -X POST https://scraper.bot/api/generate \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"prompt":"Scrape all product names and prices","url":"https://example-store.com/products"}'const res = await fetch("/api/generate", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "Scrape all product names and prices",
url: "https://example-store.com/products",
}),
});
const { data } = await res.json();/alertsList all alerts. Supports filtering by severity and read status.
Query Parameters
| Name | Type | Description |
|---|---|---|
severity | string | Filter by severity: info, warning, critical |
read | boolean | Filter by read status |
Response
{
"data": [
{
"id": "alert-1",
"type": "change_detected",
"severity": "warning",
"flowId": "flow-1",
"message": "Price changed from $29.99 to $24.99",
"read": false,
"createdAt": "2026-03-19T08:00:00Z"
}
],
"total": 3
}Examples
curl https://scraper.bot/api/alerts?severity=warning \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/alerts?severity=warning", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/analyticsRetrieve usage analytics including run counts, success rates, and cost breakdown over a time range.
Query Parameters
| Name | Type | Description |
|---|---|---|
period | string | Time period: 7d, 30d, 90d |
Response
{
"data": {
"totalRuns": 1247,
"successRate": 96.8,
"totalCost": 12.47,
"dataPointsExtracted": 48230,
"dailyBreakdown": [
{ "date": "2026-03-19", "runs": 42, "success": 41, "cost": 0.42 }
]
}
}Examples
curl https://scraper.bot/api/analytics?period=30d \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/analytics?period=30d", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/auditRetrieve the audit log of all actions performed on the account.
Query Parameters
| Name | Type | Description |
|---|---|---|
limit | number | Number of entries to return (default 50) |
Response
{
"data": [
{
"id": "audit-1",
"action": "flow.created",
"userId": "user-1",
"resource": "flow-1",
"timestamp": "2026-03-19T10:00:00Z",
"metadata": { "name": "Product Scraper" }
}
],
"total": 128
}Examples
curl https://scraper.bot/api/audit?limit=20 \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/audit?limit=20", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/checkoutCreate a Stripe checkout session for plan upgrades. Redirects the user to Stripe for payment.
Request Body
{
"plan": "pro",
"interval": "monthly"
}Response
{
"url": "https://checkout.stripe.com/c/pay/cs_live_...",
"sessionId": "cs_live_..."
}Examples
curl -X POST https://scraper.bot/api/checkout \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"plan":"pro","interval":"monthly"}'const res = await fetch("/api/checkout", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ plan: "pro", interval: "monthly" }),
});
const { url } = await res.json();
window.location.href = url;/emailSend a transactional email via Resend. Used internally for alerts, reports, and welcome emails.
Request Body
{
"to": "user@example.com",
"subject": "Your scraping report is ready",
"template": "report_ready",
"data": { "flowName": "Product Monitor", "itemCount": 147 }
}Response
{
"id": "msg_1710000000000",
"status": "sent"
}Examples
curl -X POST https://scraper.bot/api/email \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"to":"user@example.com","subject":"Report ready","template":"report_ready"}'const res = await fetch("/api/email", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
to: "user@example.com",
subject: "Report ready",
template: "report_ready",
}),
});/healthHealth check endpoint. Returns the current status of all platform services.
Response
{
"status": "healthy",
"services": {
"api": "up",
"database": "up",
"scraping_engine": "up",
"ai": "up"
},
"version": "0.6.0",
"uptime": 864000
}Examples
curl https://scraper.bot/api/healthconst res = await fetch("/api/health");
const { status, services } = await res.json();/screenshotCapture a screenshot of any URL using the Browserless Chrome engine.
Request Body
{
"url": "https://example.com",
"fullPage": true,
"width": 1280
}Response
{
"data": {
"url": "https://example.com",
"screenshotUrl": "https://storage.scraper.bot/screenshots/scr_1710000000.png",
"width": 1280,
"height": 2400,
"capturedAt": "2026-03-19T12:00:00Z"
}
}Examples
curl -X POST https://scraper.bot/api/screenshot \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","fullPage":true}'const res = await fetch("/api/screenshot", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com", fullPage: true }),
});
const { data } = await res.json();/ticketsSubmit a trouble ticket or bug report. Supports visual bug reports with element selectors.
Request Body
{
"subject": "Flow fails on login page",
"description": "The flow times out when trying to click the login button",
"type": "bug",
"priority": "high",
"flowId": "flow-1",
"screenshot": "data:image/png;base64,..."
}Response
{
"data": {
"id": "ticket-1710000000000",
"subject": "Flow fails on login page",
"status": "open",
"priority": "high",
"createdAt": "2026-03-19T12:00:00Z"
}
}Examples
curl -X POST https://scraper.bot/api/tickets \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"subject":"Flow fails on login page","type":"bug","priority":"high"}'const res = await fetch("/api/tickets", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
subject: "Flow fails on login page",
type: "bug",
priority: "high",
}),
});
const { data } = await res.json();/activityRetrieve the recent activity feed for the authenticated user.
Query Parameters
| Name | Type | Description |
|---|---|---|
limit | number | Number of entries (default 20) |
Response
{
"data": [
{
"id": "act-1",
"type": "run.completed",
"message": "Product Monitor completed successfully",
"flowId": "flow-1",
"timestamp": "2026-03-19T11:30:00Z"
}
],
"total": 45
}Examples
curl https://scraper.bot/api/activity?limit=10 \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/activity?limit=10", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/webhooksList all configured webhooks for the authenticated user.
Response
{
"data": [
{
"id": "wh-1",
"url": "https://example.com/webhook",
"events": ["run.completed", "alert.created"],
"active": true,
"createdAt": "2026-03-10T10:00:00Z"
}
],
"total": 2
}Examples
curl https://scraper.bot/api/webhooks \
-H "X-API-Key: scr_live_your_key_here"const res = await fetch("/api/webhooks", {
headers: { "X-API-Key": "scr_live_your_key_here" },
});
const { data } = await res.json();/webhooksCreate a new webhook endpoint to receive event notifications.
Request Body
{
"url": "https://example.com/webhook",
"events": ["run.completed", "run.failed", "alert.created"],
"secret": "whsec_your_signing_secret"
}Response
{
"data": {
"id": "wh-1710000000000",
"url": "https://example.com/webhook",
"events": ["run.completed", "run.failed", "alert.created"],
"active": true,
"createdAt": "2026-03-19T12:00:00Z"
}
}Examples
curl -X POST https://scraper.bot/api/webhooks \
-H "X-API-Key: scr_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/webhook","events":["run.completed"]}'const res = await fetch("/api/webhooks", {
method: "POST",
headers: {
"X-API-Key": "scr_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com/webhook",
events: ["run.completed", "run.failed"],
}),
});
const { data } = await res.json();