docs

HTTP API

The base URL, the auth header, and the endpoints — for a caller with no MCP client and nothing installed.

Reading this with an agent?

This page as plain text: /docs/http-api.md. A summarising fetch tool paraphrases long pages, so for code to copy exactly, fetch it raw: curl -s https://bowmark.ai/docs/http-api.md. The whole site as one file: https://bowmark.ai/llms-full.txt. Index of every page: https://bowmark.ai/llms.txt.

Bowmark is an HTTP API behind an API key. Nothing needs to be installed and no MCP client is required — if your code can send a request, it can use Bowmark.

This page is the reference: the base URL, the header, the endpoints. For worked examples in Node, Python and curl, go to Scripting § No install at all.

Base URL and auth

https://api.bowmark.ai

Not bowmark.ai — that host serves the marketing site and these docs, and will 404 an API path. Every endpoint below takes the same header:

Authorization: Bearer $BOWMARK_API_KEY

OpenAPI spec

The endpoints on this page as an OpenAPI 3.1 spec, for Postman, Swagger UI or an SDK generator. It needs no key:

https://api.bowmark.ai/openapi.json

One spec per site

Every site Bowmark covers also has its own spec, with one endpoint per function. Use it when you want a typed client for one site instead of writing a script. Pass the site's id or its host:

https://api.bowmark.ai/v1/sites/kayak/openapi.json

Each function becomes POST /v1/sites/<site>/<function>, and the body is the function's arguments keyed by name:

curl -sS -X POST https://api.bowmark.ai/v1/sites/kayak/search \
  -H "Authorization: Bearer $BOWMARK_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"query":{"from":"YYZ","to":"LHR","depart":"2026-12-01"}}'

It answers the same envelope as POST /v1/run, with the same billing and status codes. GET /v1/sites lists every site, each with its openapiUrl. Neither spec needs a key; calling a function does.

Getting a key

There is no anonymous tier and no public browsing: every call — GET /v1/library included — is refused with 401 without a key. Sign up at bowmark.ai/sign-up, create a key at bowmark.ai/dashboard/keys. Your first $10 of usage is free with no card (one-time, it does not reset); add one at bowmark.ai/dashboard/billing to go past it.

The two calls

Everything a caller does is one of these, in this order — read the library, then send a script written against it.

GET /v1/library?query=…Read the vocabulary. Returns the typed function library for a task or a site. Read-only, touches no site, costs nothing, and an unrecognized query returns the whole index rather than an error — so the call cannot dead-end.
POST /v1/runExecute a script written against that library, on the live sites. Body is {"script":"…"}; the script is async JavaScript and returns its result.
curl -sS "https://api.bowmark.ai/v1/library?query=flights" \
  -H "Authorization: Bearer $BOWMARK_API_KEY"
curl -sS -X POST https://api.bowmark.ai/v1/run \
  -H "Authorization: Bearer $BOWMARK_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"script":"const { offers } = await bowmark.pcparts.search(\"RTX 5080\"); return offers.slice(0,3);"}'

A sample response, field types as sent on the wire — result is whatever your script returned, here an array; ms is a number, not a string:

{
  "ok": true,
  "status": "ok",
  "result": [
    { "store": "newegg", "title": "ASUS ROG RTX 5080", "price": 1099.99, "url": "https://www.newegg.com/..." }
  ],
  "logs": [],
  "error": null,
  "ms": 2143,
  "runId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

When a script reaches a login, the HTTP response is still 200, but the envelope is status: "needs_user", with no result. needs names the sites and meta.handoff.url is the single-use link the person opens to sign in; after they finish, send the same script again unchanged.

run answers an envelope: ok, status, result, logs, error and ms are always present, plus runId, queuedMs, incomplete, emptyHanded, notes, needs, meta and notice when they are relevant to what happened. Full field-by-field reference, including exactly when each optional field shows up: Scripting § Reading the response. What you may write inside script — the bowmark.* globals (including bowmark.read.page for sites with no provider), log, talk, and pay — is Scripting.

`/v1/library` returns markdown by default

It is a document meant to go straight into a model's context, so the default response is text/markdown. Send Accept: application/json to get the machine shape instead.

Recipes

For a common job you can skip writing a script. POST /v1/recipes/:id runs a ready-made one with the inputs you send, and returns the same envelope as run. GET /v1/recipes lists them, and needs no key. Full reference: Recipes.

Saved scripts

A script you run often can be saved once and then run by its name or id, with an input. Saving checks the script, so one that does not parse is refused at save time instead of on every run. Inside the script, input is the object the run sends. Your scripts belong to your account, so every key you mint sees the same ones.

# Save it (saving again under the same name replaces the script and keeps its id)
curl -X POST https://api.bowmark.ai/v1/scripts \
  -H "authorization: Bearer $BOWMARK_API_KEY" -H "content-type: application/json" \
  -d '{"name": "rintaro-slots", "script": "return await bowmark.providers.resy.checkAvailability({ venueId: input.venueId, date: input.date, partySize: 2 })"}'

# Run it by name or id
curl -X POST https://api.bowmark.ai/v1/scripts/rintaro-slots/run \
  -H "authorization: Bearer $BOWMARK_API_KEY" -H "content-type: application/json" \
  -d '{"input": {"venueId": 339, "date": "2026-10-31"}}'

A run returns the same envelope, billing and status codes as run. GET /v1/scripts lists yours, GET /v1/scripts/:ref reads one, and DELETE /v1/scripts/:ref deletes it. You can keep up to 200.

read.page and browser_agent — the two fallbacks

These are globals your script calls inside run(), not separate endpoints — the two calls above are still the whole HTTP surface. There is no separate raw-HTTP shape for either one, including for polling a browser_agent session: every call goes through POST /v1/run with a script body, so the types documented here, and on Browser agent, are exactly the JSON a plain HTTP caller gets back — there is nothing else to confirm. This is the reference for their parameters and return shape; Scripting has the full walkthrough, error codes and worked examples for both.

bowmark.read.page(url, options?) — reads one page directly when GET /v1/library returns no provider for the site.

Param
urlrequired
format"markdown" (default) or "html"
maxCharscap on returned content, default 200,000

Returns { ok, title, content, format, chars, truncated, warnings, url, requestedUrl, status, error, needsLogin, escalationReason, wall, json?, headers? } — ok: false on a wall, a login page, or an empty shell, not only on a network failure.

bowmark.read.pages(urls: string[], options?: ReadOptions): Promise<ReadResult[]> — the same call over several URLs at once, returning one result object per page in the same shape as read.page. One dead URL in the batch does not lose the others; each page's own error carries its own failure.

Field-by-field reference for every field above, and when each one is set: Scripting § No provider for a site? Use read.page.

bowmark.browser_agent.start({ task, outputSchema? }) — hands a transactional task (a booking, a form, a login walkthrough) to a hosted browser agent. One-off only; never for a scheduled or repeating check.

Call
start({ task, outputSchema? })returns a session id; outputSchema (JSON Schema) gets validated JSON back instead of free text
status(id, { waitMs? })"running" | "needs_input" | "idle" | "failed" | "stopped" | "closed"
send(id, answer)answers a needs_input pause
stop(id) / list()release a session / see what you're holding — max 3 open at once
watchLink(id)mints a fresh watchUrl, for when the one start() returned was lost — the old one stops working

Callable only through run() — session() and the bare top-level client refuse it with code: "run_only", which is never an API-key problem. Full reference, costs, every status() field and the merchant_verification_failed safety check: Browser agent § What status(id) returns, field by field, or Scripting § When nothing else works: the browser agent.

Errors and rate limits

POST /v1/run answers with an HTTP status that tells you, without parsing the body, whether the call itself was accepted — status inside the envelope is a separate, narrower thing: whether your script succeeded. A failed script, or one that paused on a login, is still a 200.

HTTP statusWhenWhat to do
200The call was accepted and run — including a script that threw (status: "error") or paused for a login (status: "needs_user")Read status in the body
401No key, a bad key, or (anonymous callers only) past the free run limitCreate or fix the key; www-authenticate names the next step for an anonymous caller
402The account is out of free usage, at its spend cap, or its card was declinedFix billing at bowmark.ai/dashboard/billing — waiting does not clear this
429Too many runs in flight at once (currently 16 concurrent)Read Retry-After and meta.concurrency (limit, inFlight, retryAfterSeconds); nothing was started and nothing was charged
503The queue or an identity lookup failed on our sideRetry; this is never your script's fault

A code on a thrown error (from the typed client, or inside your own script's own reasoning) is a second, finer-grained vocabulary — no_api_key, wire_refused, bad_argument, unknown_function, rung_undeclared, run_only, merchant_verification_failed — one run() call can throw any of these from your own process. Full table, and what to do for each: Scripting § What it throws.

An empty body is fine. Any POST here that takes no arguments, POST /v1/session among them, accepts Content-Type: application/json with no body and reads it as {}. A body that is present but not valid JSON is still a 400.

The only hard numeric ceiling on /v1/run itself is 16 concurrent runs per account. Past it you get the 429 above. There is no separate per-minute request limit on calling run or library. A vendor behind a provider — a site a capability or provider calls — may have its own limit; that shows up in incomplete.failures on that call, not as an HTTP status on your own request.

What you have spent

curl -s https://api.bowmark.ai/v1/usage \
  -H "Authorization: Bearer $BOWMARK_API_KEY"

The account's bill for the current UTC month, itemized by resource, with the same key you run with. Add ?month=YYYY-MM for a past month.

{
  "month": "2026-11",
  "totalUsd": 17.78,
  "lines": [{ "sku": "browser.headless", "quantity": 120000, "unit": "ms", "usd": 0.8 }],
  "unitemizedUsd": 0
}

totalUsd is what the account has been charged this month, the same figure the billing dashboard shows. A run's own response carries no price, so to see what a run cost, read this before and after it. A malformed month is a 400; a request with no key is a 401. Over MCP the same answer is the get_usage tool.

Generating types

GET /v1/manifest?units=…The same library as a machine-readable manifest, for a code generator rather than a model. units is required and comma-separated (?units=flights,providers.kayak) — there is deliberately no whole-catalog form, so call /v1/library first to find the ids.

You usually do not need this: the @bowmark/web and bowmark-web packages are generated from it and ship the types already.

What is not here

The routes above, including saved scripts, plus Recipes, are the whole caller-facing surface. Everything else under /v1/ — the login handoff, secrets, files, saved connections, the per-company MCP servers — is machinery the SDK and the sandbox drive on your behalf, documented where it is used rather than as a route list. If you are reaching for one of those directly, email support@bowmark.ai and tell us what you are building; that is a gap in this page, not in the API.

Where to go next

  • Quickstart — one curl, a real answer off three live retailers.
  • Scripting § No install at all — the same two endpoints with worked Node, Python and curl examples, and the Python urllib User-Agent caveat that costs a 403 if you miss it.
  • Installation — if your client does speak MCP, wire it up once and skip the HTTP layer entirely.
  • Browser Agent — the fallback for a page that needs a form filled, a login walked through, or a wizard driven; a plain run() call, not a separate surface.