# api-anything [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/goodnight000/api-anything  
**GitHub Stars:** 4222  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/api-anything

## Description
Turn any website into an API your agent can call. Learns from the site's own frontend, heals itself when the site changes.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "api-anything": {
    "command": "npx",
    "args": ["-y","api-anything"]
  }
}
```

## Documentation

## What api-anything does

api-anything exposes learned website reads to agents through the Model Context Protocol, a command-line interface, or code. It is intended for sites that do not provide a conventional API but whose frontend makes the requests needed to retrieve data. Examples include checking book ratings, searching flights, finding project mentions, and collecting information from other supported sites.

The package includes a shared catalog of learned operations covering 114 sites and 323 read operations. Catalog entries can be used locally, while requests themselves run on the machine where api-anything is installed. A local-only option lets users avoid the shared catalog.

Writes are disabled unless explicitly allowed. When writes are enabled, they are sent once rather than repeatedly replayed through a browser workflow.

## How it works

Learning uses a headless browser with two example inputs. The system compares the resulting traffic, identifies values that behave like parameters, and retains the rest of the request structure. Cookies are represented as references rather than copied as fixed request values.

Calls use a tiered approach:

- Tier 1 sends a plain HTTP request with Node's fetch implementation.
- Tier 2 makes the request from inside a browser page when the site rejects direct HTTP.
- Tier 3 runs the page and reads its response when a read needs full page execution.

Responses include status information such as the result class, whether a write occurred, retry guidance, and the next call to make. If a learned request no longer matches the site, api-anything can relearn it, replay the result, and save the repaired operation only after the replay succeeds.

The `--fields` option limits returned objects to named fields. This is useful for reducing response size when an agent needs only selected values from a larger result.

## Setup and configuration

Node.js 22.13 or newer is required. A quick command-line read can run through `npx` without an account, API key, or browser setup:

```sh
npx -y api-anything call hacker-news search query=sqlite --fields title,url --max-tier 1
```

The `--max-tier 1` option restricts the call to plain HTTP. If the operation cannot complete at that tier, the result reports a reason and a suggested next step.

To connect an MCP client, run:

```sh
npx -y api-anything setup
```

The setup flow supports Claude Code, Codex, Cursor, Claude Desktop, Gemini CLI, and VS Code. Hermes can be selected with `--agents hermes`; `--local-only` prevents use of the shared catalog. The server can also be registered directly as a stdio MCP server:

```json
{
  "mcpServers": {
    "api-anything": {
      "command": "npx",
      "args": ["-y", "api-anything", "mcp"]
    }
  }
}
```

If a desktop application cannot locate `npx`, `--print-config` produces a configuration entry using absolute paths. Claude Code also supports installation through its plugin marketplace.

_Full upstream README: https://allmcps.com/mcp/api-anything/readme_

