docs

Run JavaScript against live websites, hosted

Bowmark runs a short JavaScript script against live websites on its own servers and returns the result as JSON. Your agent or program sends the script over MCP or one HTTP call. Free $10 to start.

Reading this with an agent?

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

Bowmark is a hosted service that runs JavaScript against live websites. You send a short async script that calls typed site functions, Bowmark runs it on its servers, and you get back whatever the script returned, as JSON. Nothing to install, deploy or keep running.

How it works

  1. Look up the functions. GET /v1/library?query=<task or site> returns the typed functions for that site or job. It touches no site and costs nothing.
  2. Send a script. POST /v1/run with {"script": "…"}. The script is a plain async body that calls bowmark.* functions and returns a value.
  3. Read the result. The response carries result (what you returned), logs, ms and a runId. If one site in the script came back incomplete, the response says so instead of passing off a partial answer as whole.

A script, end to end

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);"}'

One call to bowmark.pcparts.search checks several stores at once and returns price-sorted offers. Sequential awaits in one script share state, so a multi-step flow on a site is just several lines in the same script.

From an agent

Over MCP (https://api.bowmark.ai/mcp) the same thing is two tools: get_library to read the functions, then run with the script. Claude, ChatGPT, Cursor or your own agent writes the script for the task in front of it, so one connection covers every site in the library.

Run it again later

Save a script you use often with POST /v1/scripts, then run it by name with new input. Saving checks the script, so a broken one is refused once instead of failing on every run. Your own cron job, n8n or Zapier calls it on whatever schedule you want. Details are in HTTP API.

Connect it

Make a key at dashboard/keys; your first $10 of usage is free, no card needed. The Node and Python libraries give you the same functions with full types: see Scripting and Installation.

FAQ

Is there a hosted service that runs JavaScript scripts against live websites? Yes, Bowmark: send an async script that calls typed site functions to POST /v1/run or the MCP run tool, and get its return value back as JSON.

Do I write selectors or scraping code? No. Scripts call typed functions such as bowmark.pcparts.search(), which return fields like price and url. When a site changes, the function is fixed on Bowmark's side and your script keeps working.

What if a site has no function yet? bowmark.read.page(url) reads any page into text you can work with in the same script. See Scripting.

Can the script act as a signed-in user? Yes, on sites with signed-in functions: the user signs in once and later runs act as that account. Check a site on Providers.

What does it cost? Free $10 of usage to start, then pay as you go for what each run uses. See Pricing.