How goodnight000/api-anything works
API Anything learns reusable HTTP operations from website traffic, then exposes them to agents and scripts; calls can fall back to browser execution and operations can be repaired after drift. The shared registry distributes sanitized learned operations, while local sessions retain credentials. The README documents the main workflow and product surfaces. Source excerpts and the index support several module relationships, but do not show all runtime call sites, so uncertain links are omitted or dashed.
Main entry points: execute.ts Operation executor · worker.ts Catalog service · cli.ts Command line · heal.ts Operation repair
Components 23
Learning and repair
- Learning browser
src/browser.ts - Operation learner
src/learn.ts - Operation repair
src/heal.ts
Operation runtime
- Operation specs
src/spec.ts - Operation executor
src/execute.ts - HTTP transport
src/http.ts - Response classifier
src/classify.ts - Response extraction
src/extract.ts - Site search
src/search.ts
Local state and safety
- Operation store
src/store.ts - Credential sessions
src/session.ts - Sealed data
src/seal.ts
Agent interfaces
- Command line
src/cli.ts - MCP server
src/mcp.ts - HTTP server
src/serve.ts - Python client
python/src/api_anything/client.py
Shared catalog
- Registry client
src/registry-api.ts - Catalog service
registry/src/worker.ts - Catalog database
registry/src/store.ts - Catalog rules
registry/src/rules.ts - Catalog browsing
registry/src/pages.ts
Other components
- Agent or user
- Target website
Connections 30
- Agent or user → Command line: invokes
- Agent or user → MCP server: invokes
- Agent or user → HTTP server: invokes
- Agent or user → Python client: calls through
- Command line → Site search: finds operations
- Command line → Operation executor: calls operations
src/cli.ts - MCP server → Operation executor: calls operations
- HTTP server → Operation executor: serves operations
- Python client → HTTP server: sends requests
- Operation executor → HTTP transport: sends requests
src/execute.ts - HTTP transport → Target website: requests data
- Target website → HTTP transport: returns responses
- Operation executor → Learning browser: falls back to
src/execute.ts - Learning browser → Target website: loads pages
- Operation executor → Response classifier: classifies responses
src/execute.ts - Response classifier → Response extraction: extracts data
src/classify.ts - Operation learner → Learning browser: learns from
- Operation learner → Operation specs: produces operations
src/learn.ts - Operation repair → Operation learner: re-learns
src/heal.ts - Operation repair → Operation executor: replays operation
src/heal.ts - Operation repair → Operation store: saves repair
src/heal.ts - Operation executor → Operation store: loads operations
src/execute.ts - Operation executor → Credential sessions: uses credentials
src/execute.ts - Credential sessions → Sealed data: seals session data
src/session.ts - Command line → Registry client: syncs operations
- Registry client → Catalog service: accesses catalog
registry/src/worker.ts - Catalog service → Catalog database: stores catalog data
registry/src/worker.ts - Catalog service → Catalog rules: applies rules
registry/src/worker.ts - Catalog service → Catalog browsing: serves browsing
registry/src/worker.ts - Catalog service → Agent or user: shares operations