独立运营 · 不出售排名位置  · 我们怎么评估工具 →
Anclum 提交收录
J

jatinag22/site-to-api

Browse a website once

装之前:没有可直接复制的命令 · 许可证 MIT · 链接可访问

第一步:npm init -y # if this folder has no package.json yet

在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
官方说明Browse a website once; get OpenAPI/AsyncAPI specs, request flows, a typed TypeScript client and an MCP server for its internal API.
安装与配置
客户端配置(取自该仓库的安装命令)
{
  "mcpServers": {
    "jatinag22-site-to-api": {
      "command": "npx",
      "args": ["site-to-api"]
    }
  }
}

解析自我们于 2026-11-02 抓取的该仓库 README;我们未执行过。

command/args 来自仓库写明的安装命令;不确定时请以该项目 README 为准。
VS Code(.vscode/mcp.json —— 键名是 servers)
{
  "servers": {
    "jatinag22-site-to-api": {
      "command": "npx",
      "args": ["site-to-api"]
    }
  }
}
VS Code 顶层键是 <code>servers</code>,其余与上面那份相同。
Claude Code(命令行)
claude mcp add --transport stdio jatinag22-site-to-api -- npx site-to-api
Claude Code 不收 JSON 文件,用这条命令直接加。
配置项的键名以你的客户端为准:客户端与 CLI
★ 数取值
0 ★ · jatinag22/site-to-api · 取自 GitHub 搜索 API · (2026-11-13 20:00:50 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-11-03 · 最近见到 2026-11-14 · 共见到 12 次 · 被 1 个来源列出
评分构成
综合分 103 · 1 个来源 · repo
安装
npx site-to-api
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 npx site-to-api。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 jatinag22/site-to-api;我们收录于 2026-11-03;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。

# 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
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[![Listed on Anclum](https://anclum.com/badge/listed.svg)](https://anclum.com/zh/s/jatinag22-site-to-api/)
来源
github · https://github.com/jatinag22/site-to-api
按领域浏览
开源项目
收录于
今天

同类推荐

全部 1,671 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引