Skip to main content

Cloud API

Create robots and agents, run and schedule them, watch for changes and manage webhooks on Maxun Cloud.

note

From October 2026, the original /api/robots API is deprecated on Maxun Cloud. Use the v1 endpoints on this page.

Basics​

Base URL​

https://app.maxun.dev/api/v1

Authentication​

Send your API key as Authorization: Bearer <api-key> or x-api-key: <api-key>.

curl https://app.maxun.dev/api/v1/robots \
-H "Authorization: Bearer YOUR_API_KEY"

Teams​

Requests use your personal robots. To use a team's robots, add x-team-id: <team-id>. The Team ID is on the Teams page of the dashboard and in GET /me. Your team role applies: viewers can read, members can also create, update and run, and admins can also delete.

Responses​

Every response is JSON with a success flag:

{ "success": true, "data": { … } }
{ "success": false, "error": "Robot not found" }
StatusMeaning
200 / 201Success / created
202Accepted; the work continues in the background
400Invalid request; error says what to fix
401API key missing
402Not enough credits
403Invalid API key, plan limit reached, or your team role doesn't allow it
404Not found
409Conflict, such as a duplicate robot name or a run that has already finished
429Rate limited; wait for the Retry-After seconds

Pagination​

Lists take limit (default 25, max 100) and offset, newest first. A page shorter than limit is the last one.

Rate limits​

Limits are per minute and scale with your plan. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining.

Account​

MethodEndpointDescription
GET/meYour account, plan and teams
GET/usagePlan, credits and robot, agent and run counts
GET/usage/rate-limitsYour current rate limits
GET/queueRuns running and waiting

Get me​

GET /me

{
"success": true,
"data": {
"email": "you@example.com",
"plan": "GROWTH",
"credits": 3120.5,
"expiresAt": "2026-11-13T12:09:17.759Z",
"teams": [{ "id": "864e4c60-…", "name": "Acme data", "role": "ADMIN", "isOwner": true }]
}
}

Get usage​

GET /usage. With x-team-id, the plan and credits are the team owner's and the counts are the team's.

{
"success": true,
"data": {
"scope": { "type": "personal" },
"plan": "GROWTH",
"credits": 3120.5,
"billingCycle": "MONTHLY",
"expiresAt": "2026-11-13T12:09:17.759Z",
"robots": 14,
"agents": 3,
"runs": 1287
}
}

robots includes agents. runs counts runs to date.

Rate limits and queue​

  • GET /usage/rate-limits returns each limit with category, limitPerMinute and remaining.
  • GET /queue returns running, queued, oldestQueuedAt and lastSuccessAt. Runs wait in the queue when all your browser slots are busy.

Robots​

MethodEndpointDescription
GET/robotsList robots
GET/robots/{id}Get a robot
POST/robots/scrapeCreate a scrape robot
POST/robots/crawlCreate a crawl robot
POST/robots/searchCreate a search robot
POST/robots/document-extractCreate a document extract robot
POST/robots/document-parseCreate a document parse robot
PATCH/robots/{id}Update a robot
POST/robots/{id}/duplicateCopy a robot onto another URL
DELETE/robots/{id}Delete a robot and its runs
PUT/robots/{id}/documentReplace a document robot's file
PATCH/robots/{id}/document-promptChange a document extract robot's prompt

Robots built in the recorder are created in the dashboard; every other endpoint works with them.

The robot object​

{
"id": "4db5f26d-6f37-4c21-9f9c-e06c3bd092d9",
"name": "Pricing page",
"type": "scrape",
"status": "ready",
"error": null,
"url": "https://example.com/pricing",
"description": null,
"smartQueries": "What is the price of the Pro plan?",
"formats": ["markdown", "links"],
"teamId": null,
"createdAt": "2026-10-14T12:09:22.797Z",
"updatedAt": "2026-10-14T13:10:08.709Z",
"schedule": null,
"monitoring": { "compareRuns": true, "monitoringPrompt": null, "alertsEnabled": false, "alertEmail": null },
"webhooks": []
}
FieldDescription
typeextract (built in the recorder), agent, scrape, crawl, search, doc-extract or doc-parse
statusready. Agents can also be creating or failed, with the reason in error
smartQueriesScrape robots only: questions answered from the page
prompt, deepExtractionAgents only
schedule, monitoring, webhooksSee Schedules, Monitoring and Webhooks

List and get robots​

GET /robots takes type, q (name search), scheduled (true or false), limit and offset. GET /robots/{id} returns one robot.

Create a scrape robot​

POST /robots/scrape

FieldRequiredDescription
urlYesPage to scrape
nameNoDefaults to Scrape Robot - <hostname>
formatsNoAny of markdown, html, text, links, summary, screenshot-visible, screenshot-fullpage. Default ["markdown"]
smartQueriesNoQuestions to answer from the page
curl -X POST https://app.maxun.dev/api/v1/robots/scrape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/pricing", "formats": ["markdown", "links"] }'

Create a crawl robot​

POST /robots/crawl with url, an optional name and crawlConfig. Send "crawlConfig": {} to use the defaults.

crawlConfig optionDefaultDescription
mode"domain"Links to follow: "domain", "subdomain" or "path"
limit50Maximum pages
maxDepth3How many links away from the start page to go
includePaths / excludePaths[]URL patterns to include or skip, e.g. ["/blog/*"]
useSitemaptrueAlso find pages through sitemap.xml
followLinkstrueFollow links found on each page
respectRobotstrueObey robots.txt
outputFormatsWhat to capture from each page, from the scrape formats list

Create a search robot​

POST /robots/search with an optional name and searchConfig:

searchConfig optionDefaultDescription
queryrequiredWhat to search for
mode"discover""discover" returns titles, URLs and snippets; "scrape" also opens each result
limit10Number of results
filters.timeRangeany time"day", "week", "month" or "year"
outputFormatsIn scrape mode, what to capture from each result

Create a document robot​

Send multipart/form-data with a file (PDF, DOCX, XLSX, CSV, JPG or PNG).

  • POST /robots/document-extract takes prompt (the fields to extract) and an optional name. It returns the robot with its extractionSchema.
  • POST /robots/document-parse takes name and outputFormats (any of markdown, html, links, summary).
curl -X POST https://app.maxun.dev/api/v1/robots/document-extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-F file=@invoice.pdf \
-F prompt="Invoice number, date, vendor and total amount"

PUT /robots/{id}/document replaces the stored file. PATCH /robots/{id}/document-prompt with { "prompt": "…" } changes a document extract robot's fields.

Update, duplicate and delete​

  • PATCH /robots/{id} takes any of name, url, formats and smartQueries (scrape), crawlConfig (crawl) and searchConfig (search). Configs are merged into the current ones.
  • POST /robots/{id}/duplicate with url (and optionally name) copies a robot onto a new URL. The schedule and webhooks are not copied.
  • DELETE /robots/{id} deletes the robot and its runs. Cancel queued or running runs first.

Agents​

An agent is a robot built from a prompt, like AI Mode in the dashboard.

MethodEndpointDescription
POST/agentsCreate an agent
GET/agentsList agents
GET PATCH DELETE/agents/{id}Get, rename or delete an agent
POST GET/agents/{id}/runsRun an agent or list its runs

Agents are robots, so the schedule, monitoring and webhook endpoints also work under /agents/{id}/….

Create an agent​

POST /agents

FieldRequiredDescription
promptYesWhat to extract, in plain English
urlNoWhere to start; leave it out to let the agent find the site
nameNoDefaults to LLM Extract: <prompt>
deepExtractionNoAlso open each item's detail page (paid plans). See Deep Extraction
curl -X POST https://app.maxun.dev/api/v1/agents \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "Job title, location and team for every open role", "url": "https://example.com/careers" }'

Wait until it's ready​

Building takes a minute or two, so POST /agents returns 202 with the agent in status: "creating". Poll GET /agents/{id} until status is ready, or failed with the reason in error. Then run, schedule and monitor it like any robot. Failed agents don't count toward your plan limits.

Runs​

MethodEndpointDescription
POST/robots/{id}/runsStart a run
GET/runs/{runId}Get a run and its data
GET/runsList runs
GET/robots/{id}/runsList a robot's runs
GET/runs/activeList queued and running runs
POST/runs/{runId}/cancelCancel a run
DELETE/runs/{runId}Delete a run

Start a run​

POST /robots/{id}/runs takes optional formats (to override the robot's formats) and params (input parameter values). It returns 202 at once. If your browser slots are busy, status is queued and the run starts when one frees up. Each run needs at least 1 credit.

curl -X POST https://app.maxun.dev/api/v1/robots/ROBOT_ID/runs \
-H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "id": "a30eba41-…", "status": "running", "url": "https://app.maxun.dev/api/v1/runs/a30eba41-…" }

Get a run​

Poll GET /runs/{runId} until status is success, failed or aborted, or use a webhook.

{
"success": true,
"data": {
"id": "a30eba41-…",
"robotId": "4db5f26d-…",
"robotName": "Pricing page",
"status": "success",
"source": "api",
"startedAt": "2026-10-14T12:10:03.361Z",
"finishedAt": "2026-10-14T12:10:21.457Z",
"durationMs": 18096,
"isPartial": false,
"hasChanges": true,
"changedFormats": ["markdown"],
"error": null,
"data": {
"textData": {},
"listData": [],
"crawlData": [],
"searchData": null,
"markdown": "# Pricing\n…",
"html": null,
"text": null,
"links": ["https://example.com/signup"],
"summary": null,
"promptResult": "The Pro plan costs $49 per month.",
"documentData": null
},
"screenshots": []
}
}
FieldDescription
sourceapi, sdk, mcp, cli, schedule or dashboard
isPartialThe run stopped early but kept what it extracted
data.textData, data.listDataFields and list rows captured by recorder robots and agents
data.crawlData, data.searchDataCrawl pages and search results
data.markdown … data.summaryPage content in the formats you asked for
data.promptResultAnswers to a scrape robot's smartQueries
data.documentDataFields from a document extract robot

List, cancel and delete runs​

  • GET /runs and GET /robots/{id}/runs list runs without their data. Filter with robotId (on /runs), status (comma-separated), source, hasChanges, since and until (ISO 8601), plus limit and offset.
  • GET /runs/active lists queued and running runs.
  • POST /runs/{runId}/cancel stops a queued or running run.
  • DELETE /runs/{runId} deletes a finished run.

Schedules​

MethodEndpointDescription
PUT/robots/{id}/scheduleSet or replace a schedule
GET/robots/{id}/scheduleGet a schedule, or null
DELETE/robots/{id}/scheduleRemove a schedule
GET/schedulesList scheduled robots, soonest first

Set a schedule​

PUT /robots/{id}/schedule. It's the same schedule as in the dashboard.

FieldRequiredDescription
runEveryYesUnits between runs. Max 59 for minutes and 23 for hours; 1 for weeks
runEveryUnitYesMINUTES, HOURS, DAYS, WEEKS or MONTHS
timezoneYesIANA timezone, e.g. Asia/Kolkata
atTimeStartNoTime to run, HH:MM. Default 00:00
startFromNoWeekday for WEEKS. Default SUNDAY
dayOfMonthNoDay for MONTHS. Default 1
curl -X PUT https://app.maxun.dev/api/v1/robots/ROBOT_ID/schedule \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "runEvery": 1, "runEveryUnit": "DAYS", "atTimeStart": "09:30", "timezone": "Asia/Kolkata" }'

The response includes the cronExpression and nextRunAt. Scheduled runs use the credits of the person who created the robot.

Monitoring​

With monitoring on, each successful run is compared with the previous one and flagged with hasChanges. See Monitoring for how it works.

MethodEndpointDescription
GET PUT/robots/{id}/monitoringRead or change monitoring settings
GET/runs/{runId}/diffCompare a run with the previous one

Change settings​

PUT /robots/{id}/monitoring. Fields you leave out keep their value. You can also send these when creating a scrape robot, crawl robot or agent.

FieldDescription
compareRunsCompare each run with the previous one
monitoringPromptWhat counts as a meaningful change, in plain English (AI-judged)
alertsEnabledEmail when a run has changes. Needs compareRuns
alertEmailWhere to send alerts. Defaults to the robot owner

Read a diff​

GET /runs/{runId}/diff returns a line diff for each changed format (text, markdown, html, captured-text, captured-list). Add ?format=markdown for one format. To find runs with changes, use GET /runs?hasChanges=true.

{
"success": true,
"data": {
"runId": "2222…",
"previousRunId": "1111…",
"hasChanges": true,
"changedFormats": ["markdown"],
"diffs": [
{
"format": "markdown",
"changes": [
{ "value": "Pro: $39\n", "added": false, "removed": true },
{ "value": "Pro: $49\n", "added": true, "removed": false }
]
}
]
}
}

Webhooks​

Webhooks POST to your URL when a run completes or fails. See Webhooks for the payload.

MethodEndpointDescription
GET POST/robots/{id}/webhooksList or add webhooks
PATCH DELETE/robots/{id}/webhooks/{webhookId}Update or remove a webhook
POST/robots/{id}/webhooks/{webhookId}/testSend a test event

Add a webhook​

POST /robots/{id}/webhooks. A robot can have up to 10 webhooks.

FieldDefaultDescription
urlrequiredA public http or https URL
eventsbothrun_completed, run_failed or both
activetruefalse pauses the webhook
retryAttempts3Attempts per event (1–10)
retryDelay5Seconds before the first retry; doubles each time
timeout30Seconds to wait for your server (1–120)
curl -X POST https://app.maxun.dev/api/v1/robots/ROBOT_ID/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/hooks/maxun" }'

POST …/{webhookId}/test sends a sample event and returns whether your server accepted it.