Reference REST API 01 / 06
REST API reference
Every customer endpoint of Writ Cloud, grouped by resource, with requests and responses.
On this page
Writ Cloud's REST API covers most of what you do in the web app: call the APIs you built, run workflows, read pages, harvest sites, read collected data, and manage monitors and automations. Each section below is one resource. Each operation shows the scope your key needs, what it costs, a request and the response.
Before you call
| Topic | How it works |
|---|---|
| Base URL | https://api.usewrit.app. Every path on this page starts there. |
| Authentication |
Send Authorization: Bearer wt_... on every call, except keyless calls and signed webhooks.
Each operation names the scope it needs. A key without that scope gets 403, and so does
any route that is not open to keys. OAuth tokens (wto_) follow the same scopes, except on published endpoints and runs by workflow id, which take API keys only. See API keys and OAuth.
|
| Format | Request and response bodies are JSON (Content-Type: application/json). File uploads use multipart form data, and exports return CSV, Markdown or HTML when you ask for them. |
| Pagination | List operations take limit and offset query parameters. The largest limit is listed with each operation. A page shorter than limit is the last one. |
| Errors | Most errors answer {"detail": ...}. Published endpoints answer {"success": false, "error": ..., "detail": ...}. Codes and bodies: Errors and limits. |
| Rate limits | Your plan sets the calls per minute, shared by every key and token of the account. Past it you get 429 with a Retry-After header. |
| Retries | Send an Idempotency-Key header on POST, PUT and PATCH. The same key within 24 hours replays the first answer instead of running the call again. |
| Cost headers | A call that waits for a run answers with X-Writ-Credits-Charged, X-Writ-Credits-Remaining and X-Writ-Ran-On (local, cloud or cloud-wall). |
| OpenAPI | There is no OpenAPI file for the whole API. Each API you build exports its own: GET /api/v1/workflows/{id}/api-docs?format=openapi, or Download OpenAPI on its Documentation tab. |
Check your key with a small read. This one lists your last five runs:
curl "https://api.usewrit.app/api/runs?limit=5" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/runs",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 5},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/runs?limit=5", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); Published endpoints
A published endpoint is the stable URL of an API you built, turned on with Publish REST endpoint on the API's Call tab. {ref} is your organization's public id or vanity
name. More on waiting, caching and envelopes: Call your API.
Call a published endpoint
/v1/{ref}/{path}
Runs the API with the inputs in the body and waits for the result, up to the endpoint's timeout
(5 to 300 seconds, 120 by default). The endpoint's own method can also be GET, PUT, PATCH or DELETE.
Path
-
refstring required - Your organization's public id or vanity name.
-
pathstring required - The path you gave the endpoint.
Query and headers
-
Prefer: respond-asyncheader - Answer
202at once with arun_id, astatus_urland aLocationheader. Same as?async=true. -
Cache-Control: max-age=Nheader - Accept a stored answer up to
Nseconds old. Same as?max_age=N.0forces a fresh run. The response carriesX-Cache: HITorMISSandAge.
Body
-
(inputs)object - The function's inputs as JSON fields.
-
function_namestring - For an API with several functions: the one to run. Without it, the whole API runs.
A run that outlives the timeout answers 504 with run_id and status_url. The run keeps going; collect it with the next operation. Your plan's calls per minute apply, and each key may also make 60 calls a minute here.
curl -X POST "https://api.usewrit.app/v1/your-org/top-stories" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 3}' import os, requests
res = requests.post(
"https://api.usewrit.app/v1/your-org/top-stories",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"limit": 3},
timeout=130,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/v1/your-org/top-stories", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ limit: 3 }),
});
console.log(await res.json()); {
"success": true,
"data": {
"stories": [
{ "rank": 1, "title": "...", "points": 412, "url": "https://..." },
{ "rank": 2, "title": "...", "points": 288, "url": "https://..." },
{ "rank": 3, "title": "...", "points": 175, "url": "https://..." }
]
}
} Collect a run
/v1/{ref}/_runs/{run_id}
Reads a run started with Prefer: respond-async, or one that timed out. Use the key that
started it. The answer is 200 even when the run failed: read status and error.
Path
-
run_idstring required - The
run_idfrom the202or504answer.
While done is false, the response has a Retry-After: 2 header. Polls do not count against your calls per minute.
curl "https://api.usewrit.app/v1/your-org/_runs/run_Xb2c9T0qLm4sV8eYp1Aw" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/v1/your-org/_runs/run_Xb2c9T0qLm4sV8eYp1Aw",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/v1/your-org/_runs/run_Xb2c9T0qLm4sV8eYp1Aw", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"success": true,
"run_id": "run_Xb2c9T0qLm4sV8eYp1Aw",
"status": "running",
"done": false,
"status_url": "https://api.usewrit.app/v1/your-org/_runs/run_Xb2c9T0qLm4sV8eYp1Aw"
} {
"success": true,
"run_id": "run_Xb2c9T0qLm4sV8eYp1Aw",
"status": "success",
"done": true,
"data": { "stories": [ { "rank": 1, "title": "...", "points": 412 } ] }
} APIs by workflow id
These operations address an API or workflow by its numeric id, the number in its address in the app. They work without publishing an endpoint.
List workflows with data
/api/v1/workflows Lists your workflows that have collected data, most recent data first, with their run count.
Query
-
limitinteger - Page size, 1 to 500. Without it, every workflow is returned.
-
offsetinteger default0 - Rows to skip.
curl "https://api.usewrit.app/api/v1/workflows?limit=20" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/workflows",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 20},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/workflows?limit=20", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"workflows": [
{
"workflow_id": 412,
"workflow_name": "Hacker News top stories",
"entry_url": "https://news.ycombinator.com",
"run_count": 37,
"last_data_at": "2026-10-31T13:58:06+00:00"
}
]
} Run a workflow
/api/v1/workflows/{id}/runs
Runs the whole workflow with new inputs. By default the call waits and returns the extracted data. To
run one function of a multi-function API, call its published endpoint with function_name.
Query
-
waitboolean defaulttrue - Wait for the result. With
false, the answer is{"task_id", "status": "pending"}at once. -
timeoutinteger default120 - Seconds to wait, 10 to 300. Past it the answer carries
errorandtask_id, and the run continues.
Body
-
form_dataobject - The workflow's inputs. Without it, the saved inputs are used.
curl -X POST "https://api.usewrit.app/api/v1/workflows/412/runs?wait=true&timeout=120" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"form_data": {"limit": 3}}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/v1/workflows/412/runs",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"wait": "true", "timeout": 120},
json={"form_data": {"limit": 3}},
timeout=130,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/workflows/412/runs?wait=true&timeout=120", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ form_data: { limit: 3 } }),
});
console.log(await res.json()); {
"stories": [
{ "rank": 1, "title": "...", "points": 412 },
{ "rank": 2, "title": "...", "points": 288 },
{ "rank": 3, "title": "...", "points": 175 }
]
} Get a run's result
/api/v1/workflows/{id}/runs/{task_id} Reads one run of the workflow: its status, extracted data, error and duration.
Path
-
idinteger required - The workflow id.
-
task_idinteger required - The run's
task_id.
curl "https://api.usewrit.app/api/v1/workflows/412/runs/98123" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/workflows/412/runs/98123",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/workflows/412/runs/98123", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"task_id": 98123,
"status": "success",
"success": true,
"extracted_data": { "stories": [ { "rank": 1, "title": "...", "points": 412 } ] },
"result_data": { "extracted_data": { "stories": [ "..." ] } },
"error": null,
"duration_ms": 4210
} Export an API's description
/api/v1/workflows/{id}/api-docs Returns the API's functions as an OpenAPI 3 document, Markdown, a Postman collection or an agent skill file.
Query
-
formatstring defaultopenapi openapi,markdown,postman,bundle(all of them) orskill(a SKILL.md for AI agents).
curl "https://api.usewrit.app/api/v1/workflows/412/api-docs?format=openapi" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/workflows/412/api-docs",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"format": "openapi"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/workflows/412/api-docs?format=openapi", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"openapi": "3.0.3",
"info": { "title": "Hacker News", "version": "1.0.0", "description": "Auto-generated API for Hacker News. ..." },
"tags": [ { "name": "Stories", "description": "Stories functions" } ],
"paths": {
"/top_stories": {
"post": {
"tags": ["Stories"],
"summary": "Top stories with title, points and link",
"operationId": "top_stories",
"requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } },
"responses": { "200": { "description": "Success" } }
}
}
},
"servers": [ { "url": "https://api.usewrit.app" } ]
} Website to API
Describe what you need from a site and Writ's builder makes the API. A build runs in the background: start it, then poll it. Details: Turn a website into an API.
Start a build
/api/v1/website-to-api
Answers 202 in one of three ways. "status": "existing_workflows" means your own
workflows already cover the goal; "marketplace_candidates" means ready-made APIs do. Neither
spends a build. Otherwise the answer is a new build with "status": "queued".
Body
-
urlstring required - The site to start on.
-
goalstring required - What the API should return or do, in plain words. Up to 5,000 characters.
-
persona_idinteger - A persona to sign in with, for data behind a login.
-
tierstring defaultstandard standardordeep. A deep build covers the whole site with bigger bounds and always costs 6,000 credits, never an included build.-
accept_creditsboolean defaultfalse - Consent to pay credits for this build: a standard build past your plan’s monthly count (1,500 credits) or a deep build. Held while the build runs, charged in full only when it delivers a working API; a build you stop pays what it used, never more than its price.
-
save_asstring - Name of the API the build saves.
-
skip_existingboolean defaultfalse - Build even if your own workflows match.
-
skip_marketplaceboolean defaultfalse - Build even if a ready-made API matches.
-
contribute_to_catalogboolean - Marketplace choice for this build. Left out, a free build is submitted to the Marketplace for review and a paid one stays private.
truesubmits it;falsekeeps it private, on Starter and up or during a trial.
curl -X POST "https://api.usewrit.app/api/v1/website-to-api" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://news.ycombinator.com",
"goal": "Top stories with title, points, comment count and link. Let me ask for how many.",
"save_as": "Hacker News"
}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/v1/website-to-api",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={
"url": "https://news.ycombinator.com",
"goal": "Top stories with title, points, comment count and link. Let me ask for how many.",
"save_as": "Hacker News",
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/website-to-api", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://news.ycombinator.com",
goal: "Top stories with title, points, comment count and link. Let me ask for how many.",
save_as: "Hacker News",
}),
});
console.log(await res.json()); {
"build_id": 5821,
"status": "queued",
"url": "https://news.ycombinator.com",
"goal": "Top stories with title, points, comment count and link. Let me ask for how many.",
"created_at": "2026-10-31T14:02:11+00:00",
"completed_at": null,
"workflow_id": null,
"error": null
} Get a build
/api/v1/website-to-api/{build_id}
Reads a build. status goes from queued to building, then ends as succeeded, failed or cancelled. A finished build carries the new API's workflow_id.
While it builds, the answer adds progress, steps_taken and current_url. If it
has fallback_build_id, Writ moved the work to a new build: poll that id instead. A build that a
site refused carries site_block.
curl "https://api.usewrit.app/api/v1/website-to-api/5821" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/website-to-api/5821",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/website-to-api/5821", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"build_id": 5821,
"status": "succeeded",
"url": "https://news.ycombinator.com",
"goal": "Top stories with title, points, comment count and link. Let me ask for how many.",
"created_at": "2026-10-31T14:02:11+00:00",
"completed_at": "2026-10-31T14:06:40+00:00",
"workflow_id": 981,
"error": null
} Read pages
One-off reads of a page or a site's links, without saving anything.
Read a page
/api/crawl/scrape Reads one page and returns its main content as Markdown, or its HTML. A page read with a plain fetch costs 0.5 credit, one that needs a browser 1. On Pro and up, a CAPTCHA passed by a paid solver adds 10.
Body
-
urlstring required - The page to read.
-
formatstring defaultmarkdown markdown,html(the raw page) orboth.-
render_modestring defaultauto autotries a plain fetch first, then a browser.httporbrowserforce one.-
persona_idinteger - Read the page signed in as this persona.
-
use_residentialboolean defaultfalse - Read through a residential address, billed at 7 credits per MB.
A page that cannot be read answers 422 with a code such as scrape_not_found or scrape_bot_wall, and retry_with when another read could work.
curl -X POST "https://api.usewrit.app/api/crawl/scrape" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/pricing", "format": "markdown"}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/crawl/scrape",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"url": "https://example.com/pricing", "format": "markdown"},
timeout=100,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/scrape", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com/pricing", format: "markdown" }),
});
console.log(await res.json()); {
"verb": "scrape",
"url": "https://example.com/pricing",
"title": "Pricing",
"format": "markdown",
"markdown": "# Pricing\n\n...",
"counts": { "chars": 5120, "raw_tokens_est": 9800, "clean_tokens_est": 1280 },
"tier": "metered"
} Map a site
/api/crawl/map Lists the URLs a harvest of this site would reach, ranked by how well they match search.
Body
-
urlstring required - The site to map.
-
searchstring - Rank URLs by relevance to this text.
-
limitinteger default100 - URLs to return, 1 to 500.
-
max_depthinteger default1 - Link hops from the start page, 0 to 10.
0reads the start page and its sitemap only. -
persona_idinteger - Map the site signed in as this persona.
limits says what stopped the walk, so a partial map does not read as a complete one.
curl -X POST "https://api.usewrit.app/api/crawl/map" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "search": "pricing", "limit": 50}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/crawl/map",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"url": "https://example.com", "search": "pricing", "limit": 50},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/map", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com", search: "pricing", limit: 50 }),
});
console.log(await res.json()); {
"urls": [
{ "url": "https://example.com/pricing", "score": 0.91, "title": "Pricing", "depth": 1, "source": "link" },
{ "url": "https://example.com/plans", "score": 0.64, "title": "Plans", "depth": 0, "source": "sitemap" }
],
"count": 86,
"limits": { "max_depth": 1, "depth_reached": 1, "pages_fetched": 12, "budget_exhausted": false }
} Harvest
A harvest collects many pages of a site into a dataset. Writ decides per page whether it needs a browser. Details: Harvest a site.
Start a harvest
/api/crawl Starts collecting pages and returns the harvest at once. Each page costs what it needed: 0.5 credit for a plain page or document, 2 for OCR, 1 for a browser, plus 10 for a CAPTCHA passed by a paid solver (Pro and up).
Body
-
urlstring required - The start page.
-
intentstring - What you want from the site, in plain words. Writ uses it to pick and rank pages.
-
page_budgetinteger default1000 - Most pages to collect, 1 to 50,000.
-
credit_budgetinteger default5000 - Most credits this harvest may spend. Pages stop once it is reached.
-
extract_modestring defaultmarkdown markdown,htmlorschema(withextract_schema).-
persona_idinteger - Collect signed in as this persona.
-
include_pathsstring[] - Only follow URLs that match these patterns.
-
exclude_pathsstring[] - Skip URLs that match these patterns.
Read the collected pages with the Data operations below, using data_workflow_id as the workflow or dataset id. Sending the same request again within two minutes returns the running harvest with "deduplicated": true.
curl -X POST "https://api.usewrit.app/api/crawl" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://books.toscrape.com",
"intent": "Every book with title, price and stock",
"page_budget": 200
}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/crawl",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={
"url": "https://books.toscrape.com",
"intent": "Every book with title, price and stock",
"page_budget": 200,
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://books.toscrape.com",
intent: "Every book with title, price and stock",
page_budget: 200,
}),
});
console.log(await res.json()); {
"id": 7310,
"seed_url": "https://books.toscrape.com",
"status": "queued",
"intent": "Every book with title, price and stock",
"extract_mode": "markdown",
"pages_discovered": 0,
"pages_done": 0,
"pages_failed": 0,
"page_budget": 200,
"credit_budget_micros": 5000000,
"data_workflow_id": 1204,
"created_at": "2026-10-31T14:10:00+00:00"
} Get a harvest
/api/crawl/{crawl_id}
Reads a harvest's status and page counts. status ends as completed, failed or cancelled. A harvest that a site refused also carries site_block.
curl "https://api.usewrit.app/api/crawl/7310" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/crawl/7310",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/7310", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"id": 7310,
"seed_url": "https://books.toscrape.com",
"status": "completed",
"pages_discovered": 214,
"pages_done": 200,
"pages_failed": 3,
"pages_skipped": 11,
"records_total": 200,
"data_workflow_id": 1204,
"completed_at": "2026-10-31T14:16:52+00:00"
} Cancel a harvest
/api/crawl/{crawl_id}/cancel Stops the harvest at once. Pages already saved stay in the dataset; pages that were still being read are dropped.
curl -X POST "https://api.usewrit.app/api/crawl/7310/cancel" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.post(
"https://api.usewrit.app/api/crawl/7310/cancel",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/7310/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"id": 7310,
"status": "cancelled",
"pages_done": 88,
"data_workflow_id": 1204
} Estimate a harvest
/api/crawl/meta/estimate
What a harvest may cost before you start it. Nothing is fetched. Amounts ending in _micros are thousandths of a credit: 500000 is 500 credits.
Query
-
urlstring - The site. With it, the estimate uses what Writ remembers about the site (it needs a browser, it shows a CAPTCHA).
-
pagesinteger default500 - Pages the harvest may collect, 1 to 50,000.
low_micros assumes every page is plain, high_micros that every page needs a browser.
curl "https://api.usewrit.app/api/crawl/meta/estimate?url=https%3A%2F%2Fbooks.toscrape.com&pages=500" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/crawl/meta/estimate",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"url": "https://books.toscrape.com", "pages": 500},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/meta/estimate?url=https%3A%2F%2Fbooks.toscrape.com&pages=500", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"pages": 500,
"low_micros": 500000,
"high_micros": 2500000,
"likely_rung": "http",
"likely_micros": 500000,
"per_page": {
"http_micros": 1000,
"doc_micros": 1000,
"ocr_micros": 2000,
"browser_micros": 5000,
"ai_micros": 5000,
"captcha_micros": 10000
},
"captchas": null,
"learned": { "render": null, "residential": false, "captcha": false },
"default_credit_budget_micros": 5000000
} Run a saved harvest
/api/crawl/definitions/{ref}/run
Runs a harvest you saved with Make callable, with its saved settings. {ref} is
its id, its slug or its exact name. With max_age, a recent enough run is returned at once
with "cached": true and costs nothing.
Body
-
max_ageinteger - Reuse the last completed run if it finished within this many seconds (up to 30 days).
-
waitboolean defaultfalse - Wait for the harvest to finish. Without it, a fresh run answers
202withstatus_url. -
timeoutinteger default120 - Seconds to wait, 5 to 300. Past it the answer is
504withcrawl_id, and the harvest continues. -
limitinteger default50 - Rows of data to include, 1 to 500.
curl -X POST "https://api.usewrit.app/api/crawl/definitions/books-catalog/run" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"max_age": 86400, "wait": true, "timeout": 120, "limit": 20}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/crawl/definitions/books-catalog/run",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"max_age": 86400, "wait": True, "timeout": 120, "limit": 20},
timeout=130,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/definitions/books-catalog/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ max_age: 86400, wait: true, timeout: 120, limit: 20 }),
});
console.log(await res.json()); {
"cached": true,
"definition": {
"id": 18,
"slug": "books-catalog",
"name": "Books catalog",
"run_url": "/api/crawl/definitions/books-catalog/run",
"data_url": "/api/crawl/definitions/books-catalog/data"
},
"crawl": { "id": 7310, "status": "completed", "pages_done": 200 },
"status_url": "/api/crawl/7310",
"data": {
"columns": ["url", "title", "markdown"],
"rows": [
{ "run_id": 98501, "record_index": 0, "fields": { "url": "https://books.toscrape.com/...", "title": "...", "markdown": "..." } }
],
"total": 200
}
} Read a saved harvest's data
/api/crawl/definitions/{ref}/data Returns the data of the saved harvest's last completed run. It never starts a harvest.
Query
-
limitinteger default50 - Rows to return, 1 to 500.
age_seconds says how old the data is. Before the first run, data is null.
curl "https://api.usewrit.app/api/crawl/definitions/books-catalog/data?limit=50" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/crawl/definitions/books-catalog/data",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 50},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/crawl/definitions/books-catalog/data?limit=50", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"definition": { "id": 18, "slug": "books-catalog", "name": "Books catalog" },
"crawl": { "id": 7310, "status": "completed" },
"age_seconds": 5400,
"data": {
"columns": ["url", "title", "markdown"],
"rows": [
{ "run_id": 98501, "record_index": 0, "fields": { "url": "https://books.toscrape.com/...", "title": "...", "markdown": "..." } }
],
"total": 200
}
} Data
Everything your workflows and harvests collect is a dataset. A dataset's id is the id of the workflow
that collected it. These operations need datasets:read and workflows:read. More: Outputs and exports.
Read a workflow's data
/api/v1/workflows/{id}/data Pages through everything the workflow collected as one table. A run that extracted a list gives one row per item, and each row names the run it came from.
Query
-
qstring - Keep rows that contain this text in any field.
-
filterstring - A column filter as
column:text. Repeat it for several columns. -
sort_bystring - A column, or
run_at,status,duration_ms. -
sort_dirstring defaultdesc ascordesc.-
limitinteger default50 - Rows per page, 1 to 500.
-
offsetinteger default0 - Rows to skip.
-
include_inputsboolean defaultfalse - Add each run's inputs as
input.<name>columns.
GET /api/v1/workflows/{id}/data/facets describes each column, and /data/export downloads the whole table.
curl "https://api.usewrit.app/api/v1/workflows/412/data?q=show%20hn&sort_by=points&sort_dir=desc&limit=50" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/workflows/412/data",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={
"q": "show hn",
"sort_by": "points",
"sort_dir": "desc",
"limit": 50,
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/workflows/412/data?q=show%20hn&sort_by=points&sort_dir=desc&limit=50", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"workflow": { "id": 412, "name": "Hacker News top stories" },
"columns": ["rank", "title", "points", "url"],
"rows": [
{
"run_id": 98123,
"run_at": "2026-10-31T13:58:06+00:00",
"status": "success",
"record_index": 0,
"fields": { "rank": 1, "title": "Show HN: ...", "points": 412, "url": "https://..." }
}
],
"pagination": { "limit": 50, "offset": 0, "total": 1, "scanned_runs": 37, "truncated": false }
} List datasets
/api/v1/datasets Lists every dataset you own, most recently updated first. source_type is crawl for a harvest, else workflow.
Query
-
limitinteger - Page size, 1 to 500. Without it, every dataset is returned.
-
offsetinteger default0 - Rows to skip.
curl "https://api.usewrit.app/api/v1/datasets?limit=20" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/datasets",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 20},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/datasets?limit=20", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"datasets": [
{ "id": 412, "name": "Hacker News top stories", "source_type": "workflow", "run_count": 37, "last_updated": "2026-10-31T13:58:06+00:00" },
{ "id": 1204, "name": "books.toscrape.com", "source_type": "crawl", "run_count": 11, "last_updated": "2026-10-31T14:16:52+00:00" }
]
} Search all datasets
/api/v1/datasets/search
Full-text search across every dataset, newest first. Each result names its dataset and the field
that matched. To search one dataset, use GET /api/v1/datasets/{id}/search.
Query
-
qstring required - Keywords. All must match; case does not matter; a word matches its start.
-
limitinteger default50 - Results per page, 1 to 200.
-
offsetinteger default0 - Results to skip.
-
formatstring defaultjson json,csv,markdownorhtml.
curl "https://api.usewrit.app/api/v1/datasets/search?q=rust%20compiler&limit=20" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/datasets/search",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"q": "rust compiler", "limit": 20},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/datasets/search?q=rust%20compiler&limit=20", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"query": "rust compiler",
"terms": ["rust", "compiler"],
"results": [
{
"dataset": { "id": 412, "name": "Hacker News top stories", "source_type": "workflow" },
"run_id": 98123,
"run_at": "2026-10-31T13:58:06+00:00",
"fields": { "title": "A faster Rust compiler", "points": 288 },
"highlight": { "field": "title", "snippet": "A faster Rust compiler" }
}
],
"total": 1,
"truncated": false,
"scanned_runs": 48
} Read a dataset's records
/api/v1/datasets/{id}/records
The same table as a workflow's data, with the same q, filter, sort_by, limit and offset parameters. GET /api/v1/datasets/{id} returns the dataset's columns and row count.
Query
-
limitinteger default50 - Records per page, 1 to 500.
-
formatstring defaultjson json,csv,markdownorhtml. Paging still applies.
curl "https://api.usewrit.app/api/v1/datasets/1204/records?limit=100&offset=0" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/datasets/1204/records",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 100, "offset": 0},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/datasets/1204/records?limit=100&offset=0", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"dataset": { "id": 1204, "name": "books.toscrape.com", "source_type": "crawl" },
"columns": ["url", "title", "markdown"],
"records": [
{ "run_id": 98501, "record_index": 0, "fields": { "url": "https://books.toscrape.com/...", "title": "...", "markdown": "..." } }
],
"pagination": { "limit": 100, "offset": 0, "total": 200, "scanned_runs": 11, "truncated": false }
} Export a dataset
/api/v1/datasets/{id}/export Downloads the whole dataset, with your search, filters and sort applied and no paging. Harvested pages download as readable documents in Markdown and HTML.
Query
-
formatstring defaultcsv csv,json,markdownorhtml.
curl "https://api.usewrit.app/api/v1/datasets/412/export?format=csv" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-o stories.csv import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/datasets/412/export",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"format": "csv"},
)
res.raise_for_status()
open("stories.csv", "wb").write(res.content) import { writeFile } from "node:fs/promises";
const res = await fetch("https://api.usewrit.app/api/v1/datasets/412/export?format=csv", {
headers: { Authorization: `Bearer ${process.env.WRIT_API_KEY}` },
});
await writeFile("stories.csv", Buffer.from(await res.arrayBuffer())); rank,title,points,url
1,Show HN: ...,412,https://...
2,A faster Rust compiler,288,https://... Files
Files you upload for workflows to use, and files your runs produce. The shape follows OpenAI's Files
API, so an OpenAI client pointed at https://api.usewrit.app/api/v1 can use it.
Upload a file
/api/v1/files Stores a file and returns its id. Files count against your plan's storage.
Form fields
-
filefile required - The file, as multipart form data.
-
purposestring - A tag of your choice.
user_datawhen empty.
curl -X POST "https://api.usewrit.app/api/v1/files" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-F "file=@invoices.csv" \
-F "purpose=user_data" import os, requests
with open("invoices.csv", "rb") as f:
res = requests.post(
"https://api.usewrit.app/api/v1/files",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
files={"file": f},
data={"purpose": "user_data"},
)
res.raise_for_status()
print(res.json()) import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("file", new Blob([await readFile("invoices.csv")]), "invoices.csv");
form.append("purpose", "user_data");
const res = await fetch("https://api.usewrit.app/api/v1/files", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.WRIT_API_KEY}` },
body: form,
});
console.log(await res.json()); {
"id": "file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d",
"object": "file",
"bytes": 18244,
"created_at": 1761919200,
"filename": "invoices.csv",
"purpose": "user_data",
"content_type": "text/csv",
"status": "ready",
"source": "api"
} List files
/api/v1/files Lists your files, newest first. GET /api/v1/files/{file_id} returns one.
Query
-
purposestring - Only files with this tag.
-
limitinteger default50 - Files per page, 1 to 200.
-
offsetinteger default0 - Files to skip.
curl "https://api.usewrit.app/api/v1/files?limit=50" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/files",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 50},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/v1/files?limit=50", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"object": "list",
"data": [
{
"id": "file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d",
"object": "file",
"bytes": 18244,
"created_at": 1761919200,
"filename": "invoices.csv",
"purpose": "user_data",
"content_type": "text/csv",
"status": "ready",
"source": "api"
}
]
} Download a file
/api/v1/files/{file_id}/content Returns the file's bytes, often as a redirect to a short-lived download link. Follow redirects.
curl -L "https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d/content" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-o invoices.csv import os, requests
res = requests.get(
"https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d/content",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
open("invoices.csv", "wb").write(res.content) import { writeFile } from "node:fs/promises";
const res = await fetch(
"https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d/content",
{ headers: { Authorization: `Bearer ${process.env.WRIT_API_KEY}` } },
);
await writeFile("invoices.csv", Buffer.from(await res.arrayBuffer())); Delete a file
/api/v1/files/{file_id} Deletes the file and its stored bytes. The key needs both scopes.
curl -X DELETE "https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.delete(
"https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.status_code) const res = await fetch("https://api.usewrit.app/api/v1/files/file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(res.status); {
"id": "file_5d0c1f9a2b7e4c6f8a1d3e5b7c9f0a2d",
"object": "file",
"deleted": true
} Monitors
A monitor checks a page on a schedule and records each change. Responses use camelCase field names. More: Monitor a page.
List monitors
/api/targets Lists your monitors with their state and last check. GET /api/targets/{id} returns one.
Query
-
enabledboolean - Only active (
true) or paused (false) monitors. -
limitinteger - Page size, 1 to 500. Without it, every monitor is returned.
-
offsetinteger default0 - Rows to skip.
curl "https://api.usewrit.app/api/targets?limit=50" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/targets",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 50},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets?limit=50", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); [
{
"id": 311,
"url": "https://example.com/product/42",
"checkType": "content",
"selector": ".price",
"checkPeriodMs": 3600000,
"enabled": true,
"state": "ok",
"lastCheckedAt": "2026-10-31T15:20:02+00:00",
"changesCount": 2
}
] Create a monitor
/api/targets
Starts watching a page. A plain check costs 0.5 credit, a browser check 5. Your plan sets the fastest
interval; a faster one answers 402.
Body
-
urlstring required - The page to watch.
-
selectorstring - A CSS selector for the part to watch. Without it, the main content is watched.
-
check_period_msinteger - Time between checks, in milliseconds. Without it, your plan's default is used.
-
schedule_kindstring defaultinterval interval,dailyorweekly, withschedule_time(HH:MM),schedule_days(1 = Monday) andschedule_tz.-
requires_playwrightboolean defaultfalse - Check the page in a browser, for pages that need JavaScript.
-
persona_idinteger - Check the page signed in as this persona.
-
auto_repairboolean defaulttrue - Repair the selector automatically when it stops matching.
-
enabledboolean defaulttrue - Start active.
curl -X POST "https://api.usewrit.app/api/targets" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product/42",
"selector": ".price",
"check_period_ms": 3600000
}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/targets",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={
"url": "https://example.com/product/42",
"selector": ".price",
"check_period_ms": 3600000,
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com/product/42",
selector: ".price",
check_period_ms: 3600000,
}),
});
console.log(await res.json()); {
"id": 311,
"url": "https://example.com/product/42",
"checkType": "content",
"selector": ".price",
"checkPeriodMs": 3600000,
"scheduleKind": "interval",
"enabled": true,
"requiresPlaywright": false,
"createdAt": "2026-10-31T14:20:00+00:00",
"lastCheckedAt": "2026-10-31T15:20:02+00:00",
"changesCount": 2,
"state": "ok",
"lastChangeAt": "2026-10-31T15:20:02+00:00",
"autoRepair": true
} Update a monitor
/api/targets/{id} Changes any field you send, with the same names as when you create a monitor. Returns the monitor.
curl -X PATCH "https://api.usewrit.app/api/targets/311" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"check_period_ms": 1800000, "selector": ".price-now"}' import os, requests
res = requests.patch(
"https://api.usewrit.app/api/targets/311",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"check_period_ms": 1800000, "selector": ".price-now"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets/311", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ check_period_ms: 1800000, selector: ".price-now" }),
});
console.log(await res.json()); Check now
/api/targets/{id}/run
Runs one check right away, outside the schedule. Its result arrives like any other check. A paused
monitor answers 409. If no checker has picked up the monitor yet, the answer has "ok": false and the monitor runs at its next scheduled check. The key needs both scopes.
curl -X POST "https://api.usewrit.app/api/targets/311/run" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.post(
"https://api.usewrit.app/api/targets/311/run",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets/311/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); { "ok": true, "dispatched": 1 } Pause or resume a monitor
/api/targets/{id}/toggle Pauses (enabled=false) or resumes (enabled=true) the monitor. Returns the monitor.
Query
-
enabledboolean required - The new state.
curl -X PATCH "https://api.usewrit.app/api/targets/311/toggle?enabled=false" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.patch(
"https://api.usewrit.app/api/targets/311/toggle",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"enabled": "false"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets/311/toggle?enabled=false", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); Delete a monitor
/api/targets/{id} Deletes the monitor and its change history. Answers 204 with no body.
curl -X DELETE "https://api.usewrit.app/api/targets/311" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.delete(
"https://api.usewrit.app/api/targets/311",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.status_code) const res = await fetch("https://api.usewrit.app/api/targets/311", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(res.status); List changes
/api/targets/{id}/changes
Lists the changes a monitor detected, newest first. GET /api/targets/changes/recent lists
recent changes across all monitors.
Query
-
limitinteger default100 - Changes to return, 1 to 1,000.
-
sincestring - Only changes detected after this ISO 8601 time, oldest first. To page, pass the last row's
lastDetectedAt. -
since_idinteger - With
since: the last row'sid, for rows with the same time.
curl "https://api.usewrit.app/api/targets/311/changes?limit=20" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/targets/311/changes",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"limit": 20},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/targets/311/changes?limit=20", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); [
{
"id": "9811",
"targetId": "311",
"timestamp": "2026-10-31T15:20:02+00:00",
"oldContent": "$129.00",
"newContent": "$119.00",
"diff": "- $129.00\n+ $119.00",
"firstDetectedAt": "2026-10-31T15:20:02+00:00",
"lastDetectedAt": "2026-10-31T15:20:02+00:00",
"selectorId": null,
"selectorName": null,
"reviewed": false,
"reviewedAt": null
}
] Automations
An automation runs actions when an event happens: a monitor change, a webhook, a schedule, a run that finishes. Automations are easiest to build in the app; these operations list, run and manage them. More: Schedules, triggers and webhooks.
List automations
/api/triggers/all Lists your automations, highest priority first. GET /api/triggers/{id} returns one.
Query
-
enabled_onlyboolean defaultfalse - Only active automations.
-
event_typestring - Only automations for this event, such as
change_detected. -
workflow_idinteger - Only automations tied to this workflow.
-
fieldsstring defaultfull summaryleaves out theblocksof each automation.-
limitinteger - Page size, 1 to 500. Without it, every automation is returned.
curl "https://api.usewrit.app/api/triggers/all?fields=summary&limit=50" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/triggers/all",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"fields": "summary", "limit": 50},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/triggers/all?fields=summary&limit=50", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); [
{
"id": 57,
"target_id": 311,
"event_type": "change_detected",
"name": "Price drop: reorder",
"enabled": true,
"priority": 0,
"actions": [ { "type": "workflow", "config": { "workflow_id": 412 } } ],
"last_triggered_at": "2026-10-31T15:20:03+00:00",
"trigger_count": 4
}
] Create an automation
/api/triggers Creates an automation from an event and a list of actions. This example runs workflow 412 each time monitor 311 sees a change.
Body
-
namestring required - A name, up to 255 characters.
-
event_typestring defaultchange_detected - The event:
change_detected,webhook_received,scheduled,workflow_started,workflow_completed,monitor_down,monitor_stale,monitor_recovered,crawl_started,crawl_completed,crawl_failed,ai_session_startedorai_session_completed. -
target_idinteger - The monitor, for monitor events.
-
workflow_idinteger - The workflow, for workflow events.
-
actionsobject[] - What to do: each item has a
type(workflow,notification,crawl,scrape...) and aconfig. -
enabledboolean defaulttrue - Start active.
curl -X POST "https://api.usewrit.app/api/triggers" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Price drop: reorder",
"event_type": "change_detected",
"target_id": 311,
"actions": [{"type": "workflow", "config": {"workflow_id": 412}}]
}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/triggers",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={
"name": "Price drop: reorder",
"event_type": "change_detected",
"target_id": 311,
"actions": [{"type": "workflow", "config": {"workflow_id": 412}}],
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/triggers", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Price drop: reorder",
event_type: "change_detected",
target_id: 311,
actions: [{ type: "workflow", config: { workflow_id: 412 } }],
}),
});
console.log(await res.json()); {
"id": 57,
"target_id": 311,
"event_type": "change_detected",
"workflow_id": null,
"name": "Price drop: reorder",
"description": null,
"enabled": true,
"priority": 0,
"conditions": {},
"actions": [ { "type": "workflow", "config": { "workflow_id": 412 } } ],
"blocks": null,
"last_triggered_at": null,
"next_scheduled_at": null,
"trigger_count": 0,
"created_at": "2026-10-31T15:30:00+00:00",
"updated_at": "2026-10-31T15:30:00+00:00"
} Run an automation
/api/triggers/{id}/run Runs the automation's actions now, as if its event had happened. Workflows it starts are billed as usual.
Body
-
contextobject - Values to pass to the actions, as the event would.
curl -X POST "https://api.usewrit.app/api/triggers/57/run" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"context": {"note": "manual test"}}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/triggers/57/run",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"context": {"note": "manual test"}},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/triggers/57/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ context: { note: "manual test" } }),
});
console.log(await res.json()); {
"trigger_id": 57,
"execution_id": 3301,
"status": "completed",
"action_results": [
{ "index": 0, "type": "workflow", "status": "completed", "task_id": 98160, "workflow_id": 412 }
],
"error": null
} Pause, resume or delete an automation
/api/triggers/{id}/toggle /api/triggers/{id} toggle switches the automation between active and paused and returns it. DELETE removes it and answers 204.
curl -X PATCH "https://api.usewrit.app/api/triggers/57/toggle" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.patch(
"https://api.usewrit.app/api/triggers/57/toggle",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/triggers/57/toggle", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); curl -X DELETE "https://api.usewrit.app/api/triggers/57" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.delete(
"https://api.usewrit.app/api/triggers/57",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.status_code) const res = await fetch("https://api.usewrit.app/api/triggers/57", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(res.status); List an automation's runs
/api/triggers/{id}/executions The automation's past runs: what started each one, what each action did, and any error.
curl "https://api.usewrit.app/api/triggers/57/executions" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/triggers/57/executions",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/triggers/57/executions", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); [
{
"id": 3301,
"trigger_rule_id": 57,
"detected_change_id": 9811,
"status": "completed",
"trigger_context": { "event_type": "change_detected" },
"action_results": [ { "index": 0, "type": "workflow", "status": "completed", "task_id": 98152 } ],
"triggered_at": "2026-10-31T15:20:03",
"completed_at": "2026-10-31T15:20:04",
"error_message": null
}
] Inbound webhooks
An incoming webhook lets another system start a workflow or an automation with a plain HTTP call. Create one in Developers → Endpoints → Incoming webhooks or in an automation's webhook trigger.
Call a webhook
/api/webhooks/hook/{token} The JSON body becomes the run's inputs. Every request must be signed with the webhook's secret, shown once when you set it with Set a new signing secret.
Headers
-
X-Writ-Timestampheader required - The current time in Unix seconds. Requests more than 5 minutes off are refused.
-
X-Writ-Signatureheader required sha256=plus the hex HMAC-SHA256 of"{timestamp}.{body}", keyed with the secret.X-Hub-Signature-256is also accepted.
Query
-
waitboolean defaultfalse - Hold the request until the run finishes and return its data.
-
timeoutinteger default120 - Seconds to wait, 10 to 300.
An unsigned or stale request answers 401. A request replayed with the same signature answers 403. Each webhook accepts 30 calls a minute.
BODY='{"query": "laptops"}'
TS=$(date +%s)
SIG=$(printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$WRIT_WEBHOOK_SECRET" | sed 's/^.* //')
curl -X POST "https://api.usewrit.app/api/webhooks/hook/Kq3vN8sPz1mY0aT6rB4wXe7Lc9Hd2Jf5" \
-H "Content-Type: application/json" \
-H "X-Writ-Timestamp: $TS" \
-H "X-Writ-Signature: sha256=$SIG" \
-d "$BODY" import hashlib, hmac, json, os, time, requests
body = json.dumps({"query": "laptops"}).encode()
ts = str(int(time.time()))
sig = hmac.new(
os.environ["WRIT_WEBHOOK_SECRET"].encode(),
f"{ts}.".encode() + body,
hashlib.sha256,
).hexdigest()
res = requests.post(
"https://api.usewrit.app/api/webhooks/hook/Kq3vN8sPz1mY0aT6rB4wXe7Lc9Hd2Jf5",
data=body,
headers={
"Content-Type": "application/json",
"X-Writ-Timestamp": ts,
"X-Writ-Signature": f"sha256={sig}",
},
)
print(res.json()) import { createHmac } from "node:crypto";
const body = JSON.stringify({ query: "laptops" });
const ts = Math.floor(Date.now() / 1000).toString();
const sig = createHmac("sha256", process.env.WRIT_WEBHOOK_SECRET!)
.update(`${ts}.${body}`)
.digest("hex");
const res = await fetch("https://api.usewrit.app/api/webhooks/hook/Kq3vN8sPz1mY0aT6rB4wXe7Lc9Hd2Jf5", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Writ-Timestamp": ts,
"X-Writ-Signature": `sha256=${sig}`,
},
body,
});
console.log(await res.json()); {
"success": true,
"triggered": true,
"action": "run_workflow",
"data": { "task_id": 98140, "workflow_id": 412 }
} Sign-in links
When your code needs to act on a site behind a login, it can ask you for that login without ever seeing it. Writ makes a link; you open it, sign in on Writ's own form, and a persona is saved. More: Sign-ins and secrets.
Create a sign-in link
/api/personas/links
Returns a link for one site. Send url to the person; it expires after 30 minutes. If a link for
the site is already open, you get that one back with "created": false.
Body
-
domainstring required - The site, such as
github.com, or a URL on it. -
login_urlstring - The site's sign-in page.
-
whystring - One line shown to the person: what you need the login for. Up to 300 characters.
curl -X POST "https://api.usewrit.app/api/personas/links" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "github.com",
"login_url": "https://github.com/login",
"why": "Read your open pull requests"
}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/personas/links",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={
"domain": "github.com",
"login_url": "https://github.com/login",
"why": "Read your open pull requests",
},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/personas/links", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
domain: "github.com",
login_url: "https://github.com/login",
why: "Read your open pull requests",
}),
});
console.log(await res.json()); {
"link_id": "q8Zr1mT0bV3xK9pL2wYc4nHa",
"url": "https://app.usewrit.app/persona-link/q8Zr1mT0bV3xK9pL2wYc4nHa",
"site": "github.com",
"login_url": "https://github.com/login",
"why": "Read your open pull requests",
"requested_by": "Reporting script",
"status": "pending",
"closed_for_good": false,
"created_at": "2026-10-31T15:40:00+00:00",
"expires_at": "2026-10-31T16:10:00+00:00",
"expires_in_s": 1800,
"opened_at": null,
"saved_at": null,
"finished_at": null,
"created": true
} Wait for a sign-in link
/api/personas/links/{link_id}
Reads the link. status is pending, opened, saved, completed, cancelled or closed. When it is completed, persona.id is the persona to use.
Query
-
waitnumber default0 - Hold the call up to this many seconds (75 at most) and answer as soon as the person saves or declines.
curl "https://api.usewrit.app/api/personas/links/q8Zr1mT0bV3xK9pL2wYc4nHa?wait=60" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/personas/links/q8Zr1mT0bV3xK9pL2wYc4nHa",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"wait": 60},
timeout=70,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/personas/links/q8Zr1mT0bV3xK9pL2wYc4nHa?wait=60", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"link_id": "q8Zr1mT0bV3xK9pL2wYc4nHa",
"site": "github.com",
"status": "completed",
"expires_in_s": 1310,
"finished_at": "2026-10-31T15:48:11+00:00",
"persona": { "id": 77, "name": "GitHub (work)" },
"sign_in": "ready",
"source": "link"
} Runs feed
List runs
/api/runs One feed of every run in the account: workflows, monitor checks, AI sessions, automations and harvests, newest first. It is what the Runs page shows.
Query
-
run_typestring workflow,check,ai_session,automationorcrawl.-
statusstring pending,running,success,failed,cancelled,pausedorskipped.-
sincestring - Only runs started at or after this ISO 8601 time.
untilsets the end. -
entity_idinteger - Only runs of this workflow, monitor, session or automation.
-
limitinteger default50 - Runs per page, 1 to 200.
-
offsetinteger default0 - Runs to skip.
curl "https://api.usewrit.app/api/runs?run_type=workflow&status=failed&limit=20" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/runs",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"run_type": "workflow", "status": "failed", "limit": 20},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/runs?run_type=workflow&status=failed&limit=20", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); [
{
"id": "workflow-98123",
"run_type": "workflow",
"entity_id": 412,
"entity_name": "Hacker News top stories",
"status": "failed",
"started_at": "2026-10-31T13:58:02Z",
"finished_at": "2026-10-31T13:58:06Z",
"duration_ms": 4210,
"trigger_source": "manual",
"error": "..."
}
] Live sessions
A live session keeps a signed-in browser open for a workflow recorded with Run style: Live session, so each call acts at once. A live browser costs 2 credits a minute, and a session ends after one hour. More: Live sessions.
Start a session
/api/streaming/sessions/start
Opens the browser and returns a session_key. Call handlers once status is running (read it with GET /api/streaming/sessions/{session_key}). End it early
with POST /api/streaming/sessions/{session_key}/end.
Body
-
workflow_idinteger required - The live-session workflow.
-
target_urlstring required - The page to open.
curl -X POST "https://api.usewrit.app/api/streaming/sessions/start" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_id": 512, "target_url": "https://web.whatsapp.com"}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/streaming/sessions/start",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"workflow_id": 512, "target_url": "https://web.whatsapp.com"},
timeout=100,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/streaming/sessions/start", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ workflow_id: 512, target_url: "https://web.whatsapp.com" }),
});
console.log(await res.json()); {
"session_key": "c41d7e0f9a2b4d38b6e1f05a7c3d9e21",
"status": "starting",
"target_url": "https://web.whatsapp.com",
"current_url": null,
"agent_id": null,
"workflow_id": 512,
"handlers": [],
"max_duration_seconds": 3600
} Call a handler
/api/streaming/sessions/{session_key}/invoke/{handler} Runs one of the workflow's handlers in the open browser and returns its result.
Body
-
dataobject - The handler's inputs.
-
timeoutnumber default30 - Seconds to wait for the handler, 1 to 120.
curl -X POST "https://api.usewrit.app/api/streaming/sessions/c41d7e0f9a2b4d38b6e1f05a7c3d9e21/invoke/send_message" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data": {"to": "Alex", "text": "On my way"}, "timeout": 30}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/streaming/sessions/c41d7e0f9a2b4d38b6e1f05a7c3d9e21/invoke/send_message",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"data": {"to": "Alex", "text": "On my way"}, "timeout": 30},
timeout=45,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/streaming/sessions/c41d7e0f9a2b4d38b6e1f05a7c3d9e21/invoke/send_message", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ data: { to: "Alex", text: "On my way" }, timeout: 30 }),
});
console.log(await res.json()); {
"session_key": "c41d7e0f9a2b4d38b6e1f05a7c3d9e21",
"handler": "send_message",
"result": { "sent": true }
} Chat with a session (OpenAI-compatible)
/api/streaming/workflows/{id}/v1/chat/completions
Talks to the workflow's live sessions with the OpenAI Chat Completions format, so any OpenAI client
works. A conversation stays on the same session. /v1/responses and GET /v1/models exist under the same base.
Body and headers
-
messagesobject[] required - The conversation, as in the OpenAI API.
-
streamboolean defaultfalse - Stream the answer as server-sent events.
-
X-Session-Keyheader - Send the conversation to this session.
curl -X POST "https://api.usewrit.app/api/streaming/workflows/512/v1/chat/completions" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "streaming", "messages": [{"role": "user", "content": "Send Alex: on my way"}]}' import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.usewrit.app/api/streaming/workflows/512/v1",
api_key=os.environ["WRIT_API_KEY"],
)
reply = client.chat.completions.create(
model="streaming",
messages=[{"role": "user", "content": "Send Alex: on my way"}],
)
print(reply.choices[0].message.content) import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.usewrit.app/api/streaming/workflows/512/v1",
apiKey: process.env.WRIT_API_KEY,
});
const reply = await client.chat.completions.create({
model: "streaming",
messages: [{ role: "user", content: "Send Alex: on my way" }],
});
console.log(reply.choices[0].message.content); {
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1761925200,
"model": "streaming",
"choices": [
{ "index": 0, "message": { "role": "assistant", "content": "Sent to Alex." }, "finish_reason": "stop" }
]
} Marketplace
Ready-made APIs that others published and that pass live tests. Installing is free; a call costs credits only when it succeeds. Runs always happen on Writ Cloud. More: Ready-made APIs.
Search listings
/api/marketplace/listings Searches public listings. Each one has a slug, used by the next two operations.
Query
-
qstring - Search text.
-
target_sitestring - Only listings for this site, such as
news.ycombinator.com. -
sortstring defaultrank rank,most_used,newest,success,fastestorcheapest.-
limitinteger default24 - Listings per page, 1 to 100.
curl "https://api.usewrit.app/api/marketplace/listings?q=hacker%20news&sort=most_used&limit=10" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.get(
"https://api.usewrit.app/api/marketplace/listings",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
params={"q": "hacker news", "sort": "most_used", "limit": 10},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/marketplace/listings?q=hacker%20news&sort=most_used&limit=10", {
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"listings": [
{
"listing_id": 93,
"slug": "hacker-news-top-stories",
"title": "Hacker News top stories",
"summary": "Front-page stories with points and comment counts.",
"target_domain": "news.ycombinator.com",
"required_plan": null
}
],
"total": 1
} Install a listing
/api/marketplace/listings/{slug}/install Adds the listing to your account. Installing twice returns the same install. If the listing needs your own login or inputs, attach them in the app before you run it.
curl -X POST "https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/install" \
-H "Authorization: Bearer $WRIT_API_KEY" import os, requests
res = requests.post(
"https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/install",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/install", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
},
});
console.log(await res.json()); {
"install_id": 640,
"workflow_id": 2210,
"proxy_workflow_id": 2304,
"listing_id": 93,
"slug": "hacker-news-top-stories",
"status": "active"
} Run a listing
/api/marketplace/listings/{slug}/run Runs the listing with your inputs, billed to your account.
Body
-
form_dataobject - The listing's inputs.
-
waitboolean or number - Wait for the result:
truewaits up to 90 seconds, a number waits that many. Without it, the answer has atask_idat once.
curl -X POST "https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/run" \
-H "Authorization: Bearer $WRIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"form_data": {"limit": 3}, "wait": true}' import os, requests
res = requests.post(
"https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/run",
headers={"Authorization": f"Bearer {os.environ['WRIT_API_KEY']}"},
json={"form_data": {"limit": 3}, "wait": True},
timeout=100,
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/api/marketplace/listings/hacker-news-top-stories/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WRIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ form_data: { limit: 3 }, wait: true }),
});
console.log(await res.json()); {
"task_id": 98207,
"call_task_id": 98207,
"status": "success",
"success": true,
"extracted_data": { "stories": [ { "rank": 1, "title": "...", "points": 412 } ] },
"output_files": [],
"error": null,
"duration_ms": 3880
} Run a listing without a key
/api/marketplace/listings/{slug}/run
For AI assistants and tools that can only open a URL. Name the function and give each input as a query parameter; the answer holds the function's data. A GET never uses a key or a session: it runs public functions that only read, on the keyless allowance (10 free credits a day per IP address; a call costs the price shown on the listing). Without function_name nothing runs, and the answer lists the functions, each with a ready URL. A call still running after 60 seconds answers with a result_url: open it to read the answer.
Query
-
function_namestring - The function to run. Left out, the answer lists them.
-
{input}string - Each input of the function, by name.
GET https://api.usewrit.app/api/marketplace/listings/fide-chess-ratings-players/run?function_name=get_player_profile&fide_id=1503014 {
"tier": "keyless",
"slug": "fide-chess-ratings-players",
"function_name": "get_player_profile",
"inputs": { "fide_id": "1503014" },
"status": "success",
"success": true,
"price_credits": 2,
"charged_credits": 2,
"extracted_data": {
"name": "Carlsen, Magnus",
"fide_id": "1503014",
"fide_title": "GM",
"federation": "NOR",
"birth_year": "1990",
"std_rating": "2823",
"rapid_rating": "2801",
"blitz_rating": "2860"
},
"truncated": false,
"duration_ms": 2490,
"quota": {
"tier": "keyless",
"credits_remaining": 8,
"credits_per_day": 10,
"reset_at": "2026-11-08T00:00:00Z"
}
} Keyless
Read pages without an account or a key, to try Writ. Send any stable id in X-Writ-Client-Id;
it counts your daily allowance. Writ may answer with an X-Writ-Device-Token header: send it
back on later calls.
Tools that can only open a URL, such as an AI assistant's browser, can make the same calls as a GET: the body's fields go in the query string, no header needed, and the call counts against the IP address's allowance.
GET https://api.usewrit.app/v1/keyless/scrape?url=https://news.ycombinator.com Read, map or crawl without a key
/v1/keyless/scrape /v1/keyless/map /v1/keyless/crawl /v1/keyless/scrape /v1/keyless/map /v1/keyless/crawl scrape reads one page as Markdown. map lists a site's links (add search and limit). crawl reads up to 5 linked pages, one level deep: as many as the day's credits pay for.
Body, or query string for a GET
-
urlstring required - The page or site.
-
searchstring - For
mapandcrawl: rank links by relevance to this text. -
limitinteger - For
mapandcrawl: how many URLs or pages.
curl -X POST "https://api.usewrit.app/v1/keyless/scrape" \
-H "X-Writ-Client-Id: 6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11" \
-H "Content-Type: application/json" \
-d '{"url": "https://news.ycombinator.com"}' import requests
res = requests.post(
"https://api.usewrit.app/v1/keyless/scrape",
headers={"X-Writ-Client-Id": "6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11"},
json={"url": "https://news.ycombinator.com"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/v1/keyless/scrape", {
method: "POST",
headers: {
"X-Writ-Client-Id": "6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://news.ycombinator.com" }),
});
console.log(await res.json()); {
"verb": "scrape",
"url": "https://news.ycombinator.com",
"title": "Hacker News",
"format": "markdown",
"markdown": "1. Show HN: ...",
"quota": {
"tier": "keyless",
"requests_remaining": 9,
"pages_remaining": 19,
"credits_remaining": 8,
"requests_per_day": 10,
"pages_per_day": 20,
"credits_per_day": 10,
"reset_at": "2026-11-01T00:00:00Z",
"upgrade_url": "https://usewrit.app/pricing"
}
} Check the keyless allowance
/v1/keyless/quota What is left of today's allowance for this device. It resets at midnight UTC.
curl "https://api.usewrit.app/v1/keyless/quota" \
-H "X-Writ-Client-Id: 6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11" import requests
res = requests.get(
"https://api.usewrit.app/v1/keyless/quota",
headers={"X-Writ-Client-Id": "6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11"},
)
res.raise_for_status()
print(res.json()) const res = await fetch("https://api.usewrit.app/v1/keyless/quota", {
headers: {
"X-Writ-Client-Id": "6f1d2c4e-0b7a-4c1e-9f3a-2d5e8b9c0a11",
},
});
console.log(await res.json()); {
"tier": "keyless",
"requests_remaining": 9,
"pages_remaining": 19,
"credits_remaining": 8,
"requests_per_day": 10,
"pages_per_day": 20,
"credits_per_day": 10,
"reset_at": "2026-11-01T00:00:00Z",
"upgrade_url": "https://usewrit.app/pricing",
"shared_pool": { "available": true }
}