Quickstart
Pick a route. Each is a few stops and ends with a check that it worked — the others stay out of your way.
Call the API
Get a key
Sign in, then put the key in your shell. Paste it into the key chip at the top and every command here fills in.
Sign in and grab a key — every example below fills itself in.
One Onto account across the dashboard, docs and site. Free tier is 1,000 reads a month and takes no card.
export ONTO_API_KEY="onto_sk_live_YOUR_KEY"Read a page
Nothing to install. Press Run, or paste it in a terminal.
POST /v1/read[curl] curl -X POST https://api.buildonto.dev/v1/read \ -H "Authorization: Bearer $ONTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://stripe.com/pricing"}'- It works when
The response has a
markdownfield of readable text, andstats.reduction_percentsays how much of the page was markup.It didn’t work
401? The key is missing its
Bearerprefix, or$ONTO_API_KEYwas in single quotes and never expanded.Every error carries a stable code — see Error codes.
Plug into Claude Code
Install
Pick your client. Your agent gets six tools —
read_url,read_and_score,score_url,batch,map_site,extract_data.Install inOne command$ claude mcp add --scope user --transport http onto https://api.buildonto.dev/mcp- Run it in a terminal. Claude Code asks you to approve Onto on first use.
- Then ask Claude Code to “read example.com with onto”.
Ask it to read a page
In a new chat.
Read https://example.com with onto and show me the Markdown.- It works when
The agent calls
read_urlinstead of fetching the page itself, and answers from clean Markdown.It didn’t work
The tools never show up? The config is in the wrong place — clients ignore a file they can’t find, silently. Check the path in step 1, then restart the client.
On ChatGPT or Claude on the web? They can’t run a local process — pick Paste a URL in step 1 and sign in when asked.
Serve your site
Install and scaffold
initwritesonto.config.ts,middleware.tsand.env.local— skipping any that already exist.npm install @ontosdk/next npx onto-next initAdd your site key
Register the domain in Serve for its key. The variable is
ONTO_API_KEY, but the value is the site’s own key — not a Read key. SetbaseUrlinonto.config.tsto your real origin too..env.localONTO_API_KEY=onto_live_YOUR_SITE_KEYAdd the build step
After
next build,onto-nextwrites a clean.mdof every page intopublic/.onto/and syncs the list to your dashboard.package.json"scripts": { "build": "next build && onto-next" }Build and deploy
The CLI prints how many pages it extracted, then deploy as usual. None extracted means the build step didn’t run.
npm run build- It works when
A request with an agent’s user-agent comes back as Markdown. In a browser, add
?ontoto any URL to see what agents get.curl -sI -A 'GPTBot/1.0' https://yoursite.com/pricing # Content-Type: text/markdown; charset=utf-8 # X-Onto-Bot: GPTBot (OpenAI) # X-Onto-Matched: trueIt didn’t work
Still HTML? Either the build step didn’t run — check
public/.onto/has files — or the middlewarematcherexcludes the route.Had a
middleware.tsalready?initleaves it alone — callontoMiddleware(req, ontoConfig)from yours.“Sync skipped: Invalid API Key”? That’s a Read key in
ONTO_API_KEY; it needs the site key.