{"id":"3ef736a5-5c4b-4e24-9afb-2c3bc1c080a0","slug":"api-anything","kind":"mcp","name":"api-anything","summary":"Turn any website into an API your agent can call. Learns from the site's own frontend, heals itself when the site changes.","owner":"goodnight000","repoUrl":"https://github.com/goodnight000/api-anything","license":"MIT","licenseTier":"permissive","trust":"community","stars":2807,"match":null,"fewStars":false,"format":"mcp","createdAt":"2026-09-27T11:44:26.000Z","addedAt":"2026-11-08T04:47:33.448Z","logoUrl":"https://avatars.githubusercontent.com/u/243619051?u=a19d0eac26748ff791fd0bb26b7acc2f92ffb237&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["utilities"],"tags":[],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-11-08T04:49:44.754Z","sample":false,"url":"https://conduits.dev/tools/api-anything","language":"TypeScript","transports":["stdio"],"install":{"npm":"api-anything"},"requirements":{"env":[{"name":"API_ANYTHING_HOME","secret":false,"required":false,"description":"Directory for learned sites, sessions and settings. Defaults to ~/.api-anything."},{"name":"API_ANYTHING_BROWSER","secret":false,"required":false,"description":"Chromium browser used to learn sites and for the browser tier, by name (brave) or path. Defaults to Google Chrome."}],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/media/hero-dark.svg\">\n  <img alt=\"API Anything. The web, as an API for agents. One agent learns a site's API; every other agent gets it for free.\" src=\"docs/media/hero-light.svg\" width=\"100%\">\n</picture>\n\n**When an agent needs a website that has no API, it learns one. Every other agent gets it for free.**<br>\nLearned from the site's own requests, called over plain HTTP, verified and repaired by the agents that use it.\n\n[![npm](https://img.shields.io/npm/v/api-anything?color=cb3837&logo=npm&logoColor=white)](https://www.npmjs.com/package/api-anything)\n[![Shared catalog: live](https://img.shields.io/badge/shared%20catalog-live-2a78d6)](https://api-anything-registry.forth-site.workers.dev)\n[![CI](https://github.com/goodnight000/api-anything/actions/workflows/ci.yml/badge.svg)](https://github.com/goodnight000/api-anything/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-3987e5)](LICENSE)\n[![Node ≥ 22.13](https://img.shields.io/badge/node-%E2%89%A5%2022.13-3c873a?logo=nodedotjs&logoColor=white)](INSTALL.md)\n\n[Quick&nbsp;start](#quick-start) · [Example](#whos-talking-about-your-project) · [The&nbsp;race](#the-race) · [How&nbsp;it&nbsp;works](#how-it-works) · [Use&nbsp;it&nbsp;anywhere](#use-it-anywhere) · [Catalog](#the-shared-catalog) · [Safety](#safety-and-what-leaves-your-machine) · [Docs](#docs)\n\n</div>\n\nGoodreads stopped giving out API keys in 2020. Google Flights never had a public API. An agent that\nneeds either one drives a browser: it clicks, waits, reads the screen, and pays for every step in\ntime and tokens. API Anything learns the request the site's own page sends, once, and then calls it\nover plain HTTP. It shares what it learned, with every cookie and token stripped out, so the next\nagent gets JSON from one request.\n\n## Quick start\n\n```sh\nnpx -y api-anything setup\n```\n\nSetup lists the agents it finds (Claude Code, Codex, Cursor, Claude Desktop, Gemini CLI, VS Code)\nand asks which to connect the MCP server and the skill to; `--agents` names them instead, and the\nalways-on Hermes gateway is added only by name. Then it asks whether to help build the shared\ncatalog. `setup --local-only` keeps everything on this machine. Node 22.13 or newer; no account, no API key. Or tell your coding agent: *Set up API\nAnything for me: https://github.com/goodnight000/api-anything/blob/main/INSTALL.md*.\n[What setup changes, and every client](docs/QUICKSTART.md)\n\nRestart the agent and ask it something like *\"What does Goodreads rate Piranesi?\"*, or call an\noperation yourself:\n\n```sh\nnpx -y api-anything call hacker-news search query=sqlite\n```\n\n```text\n{\"ok\":true,\"class\":\"ok\",\"tier\":1,\"data\":[\n  {\"title\":\"Hosting SQLite databases on GitHub Pages or any static file hoster\", ...}, ...],\n \"ms\":185}\n```\n\n`tier: 1` means one plain HTTP request, with no browser and no account. A failure says what\nhappened (`class`), why (`reason`) and what to do next (`next`).\n\n## Who's talking about your project\n\nYou shipped something. Is anyone talking about it? Finding out means five search pages, or five\ndifferent APIs with their own keys, OAuth apps and client libraries.\n[`examples/mentions.mjs`](examples/mentions.mjs) asks Hacker News, Reddit, YouTube, GitHub and\nMastodon at once, from an empty home, with no account:\n\n[![Demo: 66 mentions of duckdb from Hacker News, YouTube, GitHub and Mastodon in 1.9 s, with Reddit reported as blocked](docs/demos/mentions.gif)](docs/demos/README.md#6-whos-talking-about-a-project)\n\nThe core of it is six reads in parallel, each capped at plain HTTP:\n\n```js\nimport { call } from \"api-anything\";\n\nconst sources = [\n  [\"hacker-news\", \"searchByDate\", { query: project }],\n  [\"hacker-news\", \"searchByDate\", { query: project, type: \"comment\" }],\n  [\"reddit\", \"search\", { query: project }],\n  [\"youtube\", \"search\", { q: project, filter: uploaded }],\n  [\"github\", \"searchRepos\", { q: `${project} created:>${sinceDay}` }],\n  [\"mastodon\", \"tagTimeline\", { tag: project }],\n];\nconst results = await Promise.all(sources.map(([site, op, args]) => call(site, op, args, { maxTier: 1 })));\n```\n\nRun it from a checkout after `npm ci`: `node examples/mentions.mjs <project>`, with `--days 30`\nfor a wider window or `--json` for every link, for a script or a cron job.\n\nOn 2026-11-06, five runs from empty homes took 1.8 to 2.0 s each, Node's start included. Every run\nfound the same 65 mentions. YouTube, GitHub, Mastodon and both Hacker News searches answered over\nplain HTTP. Reddit served a JavaScript challenge every time, and the script reported it as `blocked`\nand kept the rest. [Transcript and details](docs/demos/README.md#6-whos-talking-about-a-project)\n\n## The race\n\nSame agent, same prompt, started together. Left: it drives headless Chrome. Right: it calls API\nAnything's Google Flights operation.\n\n[![Two agents race on the same Google Flights task: one drives Chrome, one calls API Anything](docs/media/agent-race.gif)](docs/media/agent-race.mp4)\n\n<p align=\"center\"><b>1.5 to 2× sooner · about half the tokens · the same cost or less · 20 of 20 answers correct</b></p>\n\n<sub>Claude Opus 5.5 in Claude Code, 2026-09-28. Shown at 3× speed with no cuts; the timers show\nreal elapsed time. [MP4](docs/media/agent-race.mp4) · [how it was recorded](bench/README.md#the-recorded-race)</sub>\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/media/benchmark-dark.svg\">\n  <img alt=\"Median of 5 runs. 1 date: browser 12.9 s and $0.166, API Anything 8.4 s and $0.074. 5 dates: browser 41.6 s and $0.154, API Anything 21.1 s and $0.152. 1.5 to 2 times sooner, about half the tokens, 20 of 20 answers correct. Goodreads, 5 books: browser 182.5 s, API Anything 30.5 s.\" src=\"docs/media/benchmark-light.svg\" width=\"100%\">\n</picture>\n\nOn 2026-10-31 the same comparison on two more sites gave medians of 22.3 s against 9.6 s (Netflix\nepisodes) and 31.4 s against 18.1 s (IKEA store addresses), 20 of 20 answers correct. Each is one\nsite, one model and a few runs. [Method, raw numbers and limits](bench/README.md)\n\n## How it works\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/media/how-it-works-dark.svg\">\n  <img alt=\"How API Anything works. 1, Learn: the browser loads the page for two example inputs; what changed becomes a slot, and cookies become references. 2, Call: tier 1 sends plain HTTP with Node fetch; if the site blocks that, tier 2 fetches from inside a browser page; as a last resort for reads, tier 3 runs the page and reads its response. Every result carries class, write, retry and nextCall. 3, Repair: when a request drifts, re-learn it, replay it, and save it only if the replay succeeds.\" src=\"docs/media/how-it-works-light.svg\" width=\"100%\">\n</picture>\n\n- **Learn.** A headless browser loads the page for two example inputs. What changed becomes a\n  parameter, the rest is kept byte for byte, and cookies become references. No LLM is involved.\n- **Call.** Send the request with Node's `fetch`. If the site blocks that, fetch from inside a\n  browser page; as a last resort for a read, run the page and read its answer.\n- **Repair.** When the answer stops fitting, take the version another install repaired, or re-learn\n  and save only after a replay works. A call that can't be repaired returns an error, never someone\n  else's data.\n\n[The whole idea in 49 seconds](docs/media/explainer.mp4) · [replay, fallback and repair](docs/REFERENCE.md#replay-fallback-and-repair) · [design](docs/DESIGN.md)\n\n## Use it anywhere\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/media/surfaces-dark.svg\">\n  <img alt=\"Use it anywhere. MCP over stdio for Claude Code, Codex, Cursor, Gemini CLI, VS Code and Hermes; an HTTP server with REST, an OpenAPI document and MCP; a Python package; the TypeScript library; the CLI. All of them call the same operations on your machine, learned once or pulled from the shared catalog, which reach websites such as Hacker News, YouTube, GitHub, Google Flights and Goodreads over plain HTTP. Calls never go through the catalog.\" src=\"docs/media/surfaces-light.svg\" width=\"100%\">\n</picture>\n\n- **MCP over stdio**, for any agent: `find_sites`, `call_operation`, `learn_site` and\n  [the other tools](docs/QUICKSTART.md#the-tools-an-agent-gets), which declare output schemas for\n  clients that check results. [Frameworks](docs/INTEGRATIONS.md): Vercel AI SDK, LangChain.js, OpenAI Agents SDK.\n- **HTTP**: `api-anything serve` answers REST, publishes an OpenAPI document at `/openapi.json`,\n  and serves MCP at `/mcp`. It listens on loopback only and needs a token. [docs/SERVE.md](docs/SERVE.md)\n- **Python**: `pip install \"git+https://github.com/goodnight000/api-anything#subdirectory=python\"`\n  gives a `Client` that starts the server for you, tools for agent frameworks, and typed code\n  generated from an operation's schema. [docs/PYTHON.md](docs/PYTHON.md)\n- **TypeScript**: `import { call } from \"api-anything\"`, or [`api-anything/host`](docs/HOST.md) for\n  an agent host that only calls installed operations. [CLI and library at a glance](docs/REFERENCE.md#the-cli-and-the-library-at-a-glance)\n- **Watching**: `--changes` reports what was added, removed or changed since the last call (name a\n  watcher with `--watch`), `--max-age` answers from a recent result instead of asking the site\n  again, and a site's request budget keeps a cron job at human volume.\n  [`examples/watch.mjs`](examples/watch.mjs)\n- **No install**: the [catalog](https://api-anything-registry.forth-site.workers.dev) lets you try a\n  few public operations (Wikipedia, Open Library, USGS earthquakes, NASA images) from their pages, or\n  with curl: `curl 'https://api-anything-registry.forth-site.workers.dev/v1/try/wikipedia/getSummary?title=SQLite'`.\n\n## Teach it a new site\n\nOver MCP, an agent calls `learn_site` with a page URL and three values: two to learn from, one to\ncheck with. The operation is replayed with no cookies, then shared. From a shell:\n\n```sh\napi-anything learn 'https://lobste.rs/domains/{domain}' \\\n  --args domain=github.com --args2 domain=arxiv.org --args3 domain=youtube.com\n```\n\nFor pages that need clicks or typing, an agent with the [skill](skills/api-anything/SKILL.md)\nproposes operations, waits for your approval, and builds them. One run built Goodreads search, book\ndetails, an author's books and reviews in 6.3 minutes for $1.19.\n[Learning, step by step](docs/QUICKSTART.md#learning-an-operation) · [the Goodreads run](bench/explore/README.md) · [25 s recording](docs/demos/README.md#2-teach-once-call-with-new-inputs)\n\n## The shared catalog\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/media/flywheel-dark.svg\">\n  <img alt=\"The agent internet loop. 1 Ask: an agent needs a website. 2 Find: search the shared catalog. 3 Learn: from the site's own requests, if nobody shared it. 4 Share: cookies and tokens stripped. 5 Verify: other installs' calls vote. 6 Repair: one fix reaches everyone. Like reCAPTCHA, which digitized books from words people typed anyway, API Anything turns the web into APIs from calls agents make anyway.\" src=\"docs/media/flywheel-light.svg\" width=\"100%\">\n</picture>\n\nreCAPTCHA digitized millions of books from words people typed anyway. The\n[catalog](https://api-anything-registry.forth-site.workers.dev) does the same for the web with\ncalls agents make anyway. A new operation goes live after installs on 2 other networks call it\nsuccessfully, and a live one is replaced only when 3 or more networks see it fail. When a site\nchanges, the first agent to repair the operation repairs it for everyone. A site's own MCP server\nor OpenAPI document shows up in search beside what agents learned.\n\n114 sites and 323 read operations ship with the package, from Hacker News, Reddit, YouTube and\nGitHub to Google Flights, Goodreads, Airbnb, Amazon and Steam. They cover selected features, not\nwhole sites. [Every bundled site](docs/REFERENCE.md#bundled-sites) · [how the catalog works](docs/REGISTRY.md)\n\n## Safety and what leaves your machine\n\n- **Calls run here**, on your machine, network and sessions. The catalog never proxies your calls;\n  a few public operations can be tried from the catalog page.\n- **Secrets stay home.** A spec holds `cookie:name`, never the cookie, and a spec carrying a live\n  credential can't be saved. Sessions are encrypted at rest with the OS keychain. `login` imports a\n  site's cookies from the browser you already use, so there is usually no password to type.\n- **Writes are off** unless allowed, sent once, refused as `duplicate` if repeated, and reported\n  `applied` only when a read finds the result. No write operation is bundled.\n  [Every write guard](docs/REFERENCE.md#write-guards-in-short)\n\n### What leaves your machine\n\nA search sends its words, domain or URL to the catalog, which keeps no search words. With sharing on,\noperations learned from public pages are shared, and so are repairs and reports (the version, the\noutcome, the tier and the time; never your arguments or data). An operation learned signed in goes\nonly after you say yes, or once 3 installs on 3 networks learned the identical thing. Background\nverification of new operations is a separate question, and its default is no. With sharing off,\nor with `--local-only`, nothing is shared or reported.\n[In full, with what the gate checks](docs/REFERENCE.md#what-leaves-your-machine)\n\n## Limits\n\nIt knows only the operations someone taught it, and the catalog is young. An operation that works\nfor others can still fail for you (another region, a block on your network: Reddit challenges plain\nHTTP from many). There's no CAPTCHA solving; a challenge that doesn't clear is reported as\n`blocked`. Read each site's terms: you're responsible for how you use it.\n[All limits](docs/REFERENCE.md#status-and-known-limits)\n\n## Help build it\n\nInstall it and leave sharing on: your agent's ordinary calls verify and repair operations for\neveryone. Learn a site from the list of domains agents asked for on the\n[catalog's home page](https://api-anything-registry.forth-site.workers.dev). Or add a spec to\n`sites/` by pull request: [Contributing](CONTRIBUTING.md) has the rules and the dev commands.\n\n## Docs\n\n| doc | what's in it |\n|---|---|\n| [Setup for agents](docs/QUICKSTART.md) | install, connect each client, learning, timeouts, troubleshooting |\n| [Reference](docs/REFERENCE.md) | the CLI and library, results, creating operations, repair, logging in, safety, sites, limits |\n| [HTTP server](docs/SERVE.md) · [Python](docs/PYTHON.md) | `api-anything serve`; the Python package |\n| [Frameworks](docs/INTEGRATIONS.md) · [Agent hosts](docs/HOST.md) | MCP from agent frameworks; the call-only host API |\n| [Design](docs/DESIGN.md) · [Catalog](docs/REGISTRY.md) | the authoritative spec and its reasons; how the catalog promotes, stores and trusts |\n| [Benchmark](bench/README.md) · [Demos](docs/demos/README.md) | how every number here was measured; recorded runs with transcripts and tapes |\n| [Contributing](CONTRIBUTING.md) · [MIT license](LICENSE) | add a site spec, run the checks |\n\n## Star History\n\n<a href=\"https://www.star-history.com/?repos=goodnight000/api-anything&type=date&legend=bottom-right\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=goodnight000/api-anything&type=date&theme=dark&legend=bottom-right\" />\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=goodnight000/api-anything&type=date&legend=bottom-right\" />\n   <img alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=goodnight000/api-anything&type=date&legend=bottom-right\" />\n </picture>\n</a>\n"}