post ▸ article opened 0
Turn sites into APIs

Website to API: how to turn any website into an API (without waiting for the vendor to build one)

Describe what you need in one sentence (or record the difficult part) and get a tested API: a stable REST endpoint and an MCP tool, on your own account.

The Writ team · Jun 18, 2026 · 9 min read
On authorization. Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

APIs cover a thin slice of the software world. The rest (internal admin panels, supplier portals, government filing systems, legacy tools, anything behind a login) has no API and never will. The standard answers are brittle scripts that break on the next UI change, or heavyweight RPA suites built for one-off tasks. There is a simpler path: describe the task once, and turn it into something your software can call.

The problem: most of the web has no API

Think about the last time you needed data out of a vendor portal, or needed to file a form in a system that only exists as a web app. There was no documented endpoint, no SDK, no webhook. A person could do the task in a browser in two minutes. Software could not, because the work lived behind authentication and a submit button.

Writ closes that gap. You describe the goal and let AI build it, recording only the difficult part yourself, and Writ exposes it as a stable, callable endpoint at /v1/{slug}/{path} and as an MCP tool. It runs the way a person would, on your own account and with your own credentials, so it reaches the authenticated, dynamic web that read-only crawlers cannot.

How the API gets built

One sentence is the normal path; the other two cover what a sentence cannot reach:

  • Describe. Tell Writ what you need in plain language. Scribe builds the API in a real browser, tests it on your inputs, and publishes it.
  • Discover. Writ watches the network while the site is used and keeps the underlying calls, so a noisy UI flow becomes a clean HTTP request wherever one exists.
  • Record the difficult part. For a login, a 2FA prompt or a step the sentence cannot describe, do it once in a real browser; Writ keeps that step and builds the rest.

The result is a workflow with typed inputs and a structured output. From there, publishing is a single action.

Publish it as a REST endpoint

Publishing turns the workflow into an API with its own slug. You call it with a wt_ API key, pass inputs as JSON, and get structured JSON back.

quickstart.sh · cURL
curl https://api.usewrit.app/v1/{slug}/{path} \
  -H "Authorization: Bearer wt_8f3a…" \
  -H "Content-Type: application/json" \
  -d '{ "account_id": "AC-19284", "since": "2026-06-01" }'
response.json · json
{
  "status": "succeeded",
  "run_id": "run_7d1c…",
  "data": {
    "invoices": [
      { "id": "INV-5521", "amount": 1840.00, "due": "2026-07-15" },
      { "id": "INV-5522", "amount":  620.50, "due": "2026-07-18" }
    ]
  }
}

That is the whole contract: a slug, a key, JSON in, JSON out. Your software no longer needs to know that the data lives behind a login and three menu clicks.

Expose it as an MCP tool

The same workflow can be published as a Model Context Protocol tool, so an AI agent can call it directly. Point your MCP client at the Writ server and the workflow shows up as a typed tool the agent can invoke, with the same authorization and spend controls as the REST path.

mcp-client config · json
{
  "mcpServers": {
    "writ-cloud": {
      "url": "https://api.usewrit.app/mcp",
      "headers": { "Authorization": "Bearer wt_8f3a…" }
    }
  }
}

Now Claude, Cursor, or any MCP-capable agent has a tool for a site that never shipped an API. The agent does not see your credentials. It calls the tool, and Writ runs the workflow on your account.

Where it runs (and what it costs)

A workflow can run two ways. On a BYO agent (the Writ agent on your own machine) there is no compute charge on any plan, and it can reach localhost, your LAN, and VPN-only systems the cloud cannot see. In the managed cloud, runs are charged in credits per call (2 for a plain call, 20 for a browser call, 0 when the call fails) from your plan’s included credits, and from a prepaid top-up past it.

Free on your own hardware. Run on your own machine and you pay nothing for compute: runs there cost 0 credits on every plan, Free included. Only cloud runs are metered, and hard spend caps are on by default for them.

Surviving UI changes

The reason scripts rot is that they pin to fragile selectors. The APIs Writ builds use resilient selectors with stability helpers, and when a run still fails, auto-repair rebuilds the broken step; repairs are free. The endpoint stays the same even when the site underneath does not.

That is the whole idea: a durable interface in front of an interface that was never meant to be one. Read the website → API docs for a step-by-step walkthrough.

Try it on a real site

Describe what you need (or record the difficult part), then call it as REST and MCP.

Common questions

Is this allowed?
Writ automates work a person could do by hand in a browser, on sites you are authorized to use, with your own credentials. It does not break into anything, and your credentials never leave your control. Respect each target site's terms of service and rate limits.
Does the endpoint break when the site changes?
Saved workflows use resilient selectors with stability helpers, and when a run still fails, auto-repair rebuilds the broken step; repairs are free. The endpoint stays the same while the site underneath changes.
What does it cost to run?
Runs on your own machine cost 0 credits. Managed-cloud calls are charged in credits (2 for a plain call, 20 for a browser call, 0 when the call fails) from your plan’s included credits, then from a prepaid balance at the same rates.

Related reading

New posts on the no-API web, every few weeks. No spam.

Subscribe (RSS)