J
jatinag22/site-to-api
Browse a website once
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Official descriptionBrowse a website once; get OpenAPI/AsyncAPI specs, request flows, a typed TypeScript client and an MCP server for its internal API.
Install & config
Client config (built from the install command this repo gives)
{
"mcpServers": {
"jatinag22-site-to-api": {
"command": "npx",
"args": ["site-to-api"]
}
}
}Parsed from the README we fetched on 2026-11-02; we have not executed it.
command/args come from the install command the repository states. When it is ambiguous, the project README wins.
VS Code (.vscode/mcp.json - the key is servers)
{
"servers": {
"jatinag22-site-to-api": {
"command": "npx",
"args": ["site-to-api"]
}
}
}Same server, but VS Code keeps it under <code>servers</code>.
Claude Code (command line)
claude mcp add --transport stdio jatinag22-site-to-api -- npx site-to-api
Claude Code does not read a config file; add the server with this command.
Key names differ by client: Clients & CLI
- Star count
- 0 ★ · jatinag22/site-to-api · read from the GitHub search API · (checked 2026-11-13 20:00:50)
- Source
- read directly from its GitHub page · type: open-source project
- Harvest history
- first seen 2026-11-03 · last seen 2026-11-14 · seen 12× · listed by 1 sources
- Score
- score 103 · 1 sources · repo
- Install
npx site-to-api
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
npx site-to-api. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: 开源项目. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository
jatinag22/site-to-api;first catalogued 2026-11-03;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.# site-to-api
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Record one browsing session of a website. Get the OpenAPI specs, request flows and typed client
a coding agent needs to build a wrapper for its internal API.
site-to-api is for developers who need to integrate with a website that has no public API,
usually with a coding agent writing the code. Use it only on sites you are allowed to use; it never
bypasses bot protection, captchas or access controls.
It records what a site's own pages do while you use it (or reads a HAR you already have), then
works out the endpoints, their schemas, the order requests happen in, which value feeds which
request, and what a session needs. It writes one folder: OpenAPI 3.1 and AsyncAPI 3.0 specs,
request flows, a short AGENT.md for your coding agent, excerpts of the site's own code, and a
typed TypeScript client with Zod validation.
No LLM runs inside the tool: the same capture gives byte-identical output, and your coding agent
does the reasoning on top of it. Each request input is traced to its origin, such as a CSRF token
in a meta tag, an ID from an earlier response, or a password encrypted in the browser by
encryptPassword() in the site's own src/auth/crypto.ts, recovered from its sourcemaps. Raw
captures stay in a gitignored folder; the handoff folder is redacted, and a leak check fails the
build if a secret learnt from the capture slipped through. Bot protection is recorded as "needs a
real browser"; probe measures what plain HTTP needs, and check reports when the API drifts.
## Quick start
Requires Node 22.12 or later.
sh
npm init -y # if this folder has no package.json yet
npm install -D site-to-api # the CLI, a development dependency
npx site-to-api init # config file, and a gitignore for raw captures
npx site-to-api capture https://example.com
# a browser window opens: use the site the way your wrapper will (log in, search, open pages),
# then close the window (or press Ctrl+C here) to finish
npx site-to-api build # writes api-handoff/
npx site-to-api probe # optional: what plain HTTP needs (read-only requests, 1 per second)
Then give your coding agent a task such as:
> Read api-handoff/AGENT.md and write src/shop.ts: a function that logs in and returns my
> orders, using the generated client in api-handoff/client/.
Commit api-handoff/. Never commit .site-to-api/: it holds the raw captures, with your real
cookies and tokens.
capture opens Google Chrome. Where Chrome is not installed it uses Playwright's bundled
Chromium instead and says so; download that once with npx playwright install chromium. Pass
--channel chrome (or msedge, or bundled) to require one browser. A second capture of the same
pages (--session second-pass) gives the build two samples to compare.
The generated client runs in your app with two runtime dependencies:
sh
npm install site-to-api-runtime zod
## What you get
api-handoff/
AGENT.md start here: hosts, what each session needs, key flows, top gaps
hosts/ .md everything about one host: cookies, bot protection, operations, channels
APIMAP.md one row per operation: inputs and where each value comes from
flows.json request flows and value origins (flows.md is the readable copy)
specs/ .yaml OpenAPI 3.1; .asyncapi.yaml for WebSocket and event-stream channels
a coding agent needs to build a wrapper for its internal API.
site-to-api is for developers who need to integrate with a website that has no public API,
usually with a coding agent writing the code. Use it only on sites you are allowed to use; it never
bypasses bot protection, captchas or access controls.
It records what a site's own pages do while you use it (or reads a HAR you already have), then
works out the endpoints, their schemas, the order requests happen in, which value feeds which
request, and what a session needs. It writes one folder: OpenAPI 3.1 and AsyncAPI 3.0 specs,
request flows, a short AGENT.md for your coding agent, excerpts of the site's own code, and a
typed TypeScript client with Zod validation.
No LLM runs inside the tool: the same capture gives byte-identical output, and your coding agent
does the reasoning on top of it. Each request input is traced to its origin, such as a CSRF token
in a meta tag, an ID from an earlier response, or a password encrypted in the browser by
encryptPassword() in the site's own src/auth/crypto.ts, recovered from its sourcemaps. Raw
captures stay in a gitignored folder; the handoff folder is redacted, and a leak check fails the
build if a secret learnt from the capture slipped through. Bot protection is recorded as "needs a
real browser"; probe measures what plain HTTP needs, and check reports when the API drifts.
## Quick start
Requires Node 22.12 or later.
sh
npm init -y # if this folder has no package.json yet
npm install -D site-to-api # the CLI, a development dependency
npx site-to-api init # config file, and a gitignore for raw captures
npx site-to-api capture https://example.com
# a browser window opens: use the site the way your wrapper will (log in, search, open pages),
# then close the window (or press Ctrl+C here) to finish
npx site-to-api build # writes api-handoff/
npx site-to-api probe # optional: what plain HTTP needs (read-only requests, 1 per second)
Then give your coding agent a task such as:
> Read api-handoff/AGENT.md and write src/shop.ts: a function that logs in and returns my
> orders, using the generated client in api-handoff/client/.
Commit api-handoff/. Never commit .site-to-api/: it holds the raw captures, with your real
cookies and tokens.
capture opens Google Chrome. Where Chrome is not installed it uses Playwright's bundled
Chromium instead and says so; download that once with npx playwright install chromium. Pass
--channel chrome (or msedge, or bundled) to require one browser. A second capture of the same
pages (--session second-pass) gives the build two samples to compare.
The generated client runs in your app with two runtime dependencies:
sh
npm install site-to-api-runtime zod
## What you get
api-handoff/
AGENT.md start here: hosts, what each session needs, key flows, top gaps
hosts/ .md everything about one host: cookies, bot protection, operations, channels
APIMAP.md one row per operation: inputs and where each value comes from
flows.json request flows and value origins (flows.md is the readable copy)
specs/ .yaml OpenAPI 3.1; .asyncapi.yaml for WebSocket and event-stream channels
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/jatinag22-site-to-api/)
- Source
- github · https://github.com/jatinag22/site-to-api
- Browse by field
- Open source
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.