goodnight000/api-anything
Turn any website into an API your agent can call. Learns from the site's own frontend, heals itself when the site changes.
What it solves
API Anything allows AI agents to interact with websites as if they were APIs, eliminating the need for agents to manually drive a browser (like using Playwright or Puppeteer). This reduces the time, token usage, and cost associated with browser-based automation while improving reliability and speed.
How it works
- Learning Phase: The tool uses headless Chrome to record network requests made by a website when provided with two example inputs. It identifies the parts of the request that change based on the input and creates a template with slots for those parameters.
- Execution: When an agent calls an operation, the tool fills the slots and sends the request using Node's
fetch. If plain HTTP is blocked, it falls back to fetching from within a Chrome page or running the page itself to read the response. - Session Management: It imports cookies and tokens from existing browser profiles (Chrome, Arc, Brave, Edge, Chromium, Firefox) to handle authentication without requiring passwords to be typed manually.
- Repair: If a request fails due to rotated IDs or moved fields, the tool can re-learn the operation to update the template.
Who it’s for
Developers and AI agent creators who want their agents to perform web-based tasks (like searching flights or books) more efficiently and cheaply than traditional browser automation.
Highlights
- Performance Gains: Benchmarks show agents using API Anything answer tasks 1.5x to 2x faster and use roughly half the tokens compared to browser-driving agents.
- MCP Support: Integrates with the Model Context Protocol (MCP) for easy connection to agents like Claude Code or Codex.
- Automated Mapping: Includes a "skill" that allows an agent to autonomously scout a site and build new operations based on a user's intent.
- Pre-built Operations: Comes with 22 read operations for popular sites including Google Flights, Hacker News, X, Instagram, YouTube, Airbnb, Amazon, and LinkedIn.
Related
- Project
- Project
- Project
- Project