🪸 GET /<site>/<method>

Turn any website into an API — even one that never had one.

Plenty of systems worth integrating with were never built for it — no REST API, no webhook, just a browser UI. QA Reef records a flow the way a person performs it and exposes it as a real HTTP endpoint — GET /<site>/<method> — callable like any other service.

How it works

Every site QA Reef knows is a small class with public methods — login(), search(query), fetchDocument(id). src/api.js is a dependency-free HTTP facade: one warm browser instance per site, calls queued so they don't collide, every public method auto-becomes a route.

This is real code in the repo today, not a mockup:

GET /countyportal/search?q=123+Main+St
POST /erp/fetchInvoice  { "id": "INV-4482" }
GET /pdfviewer/fetchDocument?id=abc123

→ { "ok": true, "result": { ... } }

Three concrete examples

A county records portal, as an API

A public records site with a search form and viewer — no API, no bulk export. Wrapped as a QA Reef site: GET /countyrecords/search and /fetchDocument return JSON, callable from a script or cron job.

An old ERP with frames, as an API

Frame-era internal systems often hold data another tool needs (invoice status, shipment record) behind a UI with no export or API. A QA Reef site class that navigates the frameset turns fetchInvoice(id) into a plain function call.

A PDF-viewer document fetch, as an API

An in-browser document viewer isn't reachable by a normal HTTP request — you can't curl it. A QA Reef flow that opens it, reads the toolbar by OCR, and clicks "download" turns that into GET /viewer/fetchDocument?id=..., same interface as a real API.

What we won't do

  • No CAPTCHA solving, ever — it reports what it saw and stops.
  • Respect terms of service and robots rules — infrastructure for sites you're authorized to operate.
  • Record-and-stop on walls, not guess past them — an unexpected auth screen or error page returns an honest UNMEASURED result, not a fabricated success.

Read the technique in detail

OCR words to coordinates, curved mouse movement, evidence per step, and what happens when a 2004-era portal just never settles.

Read: Making an API out of a 2004 web portal →