$git clone https://github.com/kalil0321/reverse-api-engineer> Turn websites into APIs. Browse (or let an agent browse), and get a clean, typed client for the endpoints the site actually uses.
| 1 | <div align="center"> |
| 2 | <img src="https://raw.githubusercontent.com/kalil0321/reverse-api-engineer/main/assets/reverse-api-banner.png" alt="Reverse API Engineer Banner"> |
| 3 | <br><br> |
| 4 | <a href="https://pypi.org/project/reverse-api-engineer/"><img src="https://img.shields.io/pypi/v/reverse-api-engineer?style=flat&color=e50d75&labelColor=1f1f1f" alt="PyPI"></a> |
| 5 | <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11+-e50d75?style=flat&labelColor=1f1f1f" alt="Python"></a> |
| 6 | <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-e50d75?style=flat&labelColor=1f1f1f" alt="License"></a> |
| 7 | <br> |
| 8 | |
| 9 | [](https://www.greptile.com/?utm_source=oss_badge&utm_medium=readme&utm_campaign=greptile_for_open_source) |
| 10 | |
| 11 | </div> |
| 12 | |
| 13 | # Reverse API Engineer |
| 14 | |
| 15 | > **Turn websites into APIs.** Browse (or let an agent browse), and get a clean, typed client for the endpoints the site actually uses. |
| 16 | |
| 17 | <p align="center"> |
| 18 | <img src="https://raw.githubusercontent.com/kalil0321/reverse-api-engineer/main/assets/rae-autoscout.gif" alt="Agent Mode Demo"> |
| 19 | <br> |
| 20 | <em>Agent mode</em> |
| 21 | </p> |
| 22 | |
| 23 | <p align="center"> |
| 24 | <img src="https://raw.githubusercontent.com/kalil0321/reverse-api-engineer/main/assets/reverse-api-engineer.gif" alt="Manual Mode Demo"> |
| 25 | <br> |
| 26 | <em>Manual mode</em> |
| 27 | </p> |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## How it works |
| 32 | |
| 33 | 1. You give it a website and a goal ("fetch all Apple jobs"). |
| 34 | 2. A browser visits the site, either driven by you or by an AI agent. |
| 35 | 3. Network traffic is captured to a HAR file. |
| 36 | 4. Your configured model reads the traffic and writes a working API client in Python, JavaScript, TypeScript, Go, Java, C#, PHP, Ruby, or C. |
| 37 | |
| 38 | No more manually opening DevTools, copying cURL commands, and gluing together a client. |
| 39 | |
| 40 | ## Install |
| 41 | |
| 42 | ```bash |
| 43 | uv tool install reverse-api-engineer # or: pip install reverse-api-engineer |
| 44 | playwright install chromium |
| 45 | ``` |
| 46 | |
| 47 | ## Quick start |
| 48 | |
| 49 | ```bash |
| 50 | reverse-api-engineer |
| 51 | > fetch all apple jobs from their careers page |
| 52 | |
| 53 | # Browser opens. Navigate, interact, close when done. |
| 54 | # → ./scripts/apple_jobs_api/ (api_client.py, README.md, example_usage.py) |
| 55 | ``` |
| 56 | |
| 57 | Cycle modes with **Shift+Tab**: |
| 58 | |
| 59 | | Mode | What it does | |
| 60 | |------|--------------| |
| 61 | | `manual` | You drive the browser; AI generates the client from captured traffic. | |
| 62 | | `agent` | An AI agent drives capture autonomously (Playwright or Chrome MCP, or Vercel agent-browser CLI). | |
| 63 | | `engineer` | Re-run generation on a previous capture (`engineer <run_id>`). | |
| 64 | | `collector` | Agent collects structured data (JSON/CSV) using web search + fetch. | |
| 65 | |
| 66 | Agent mode providers: |
| 67 | - **auto** (default): Playwright MCP, single workflow for browsing + reverse engineering. |
| 68 | - **chrome-mcp**: drives your real Chrome so you keep existing sessions/cookies. Requires Chrome 146+ and Node.js 20.19+. |
| 69 | - **agent-browser**: [Vercel agent-browser](https://github.com/vercel-labs/agent-browser) **CLI** (not a Reverse API Engineer browser MCP server). At session start RAE uses whatever `agent-browser` is already on `PATH`, otherwise runs **`npm install -g <pin>`** (same pin as config / `RAE_AGENT_BROWSER_PACKAGE`), prints a yellow notice, validates with **`--help`**, and only then falls back to **`npx -y <pin>`** if npm cannot install. Prompts embed the resolved shell prefix alongside **`skills get core --full`**, **`skills list`**, HAR phases, cloud notes from `agent_browser_notes`. Tune with `agent_browser_npx_package` (optional), env `RAE_AGENT_BROWSER_*`. First Chromium fetch: **`agent-browser install`** (add `--with-deps` on trimmed Linux). |
| 70 | |
| 71 | |
| 72 | Optional sanity checks: |
| 73 | |
| 74 | ```bash |
| 75 | agent-browser doctor --offline --quick || true |
| 76 | agent-browser skills list >/dev/null |
| 77 | ``` |
| 78 | |
| 79 | ## Configuration |
| 80 | |
| 81 | Settings live in `~/.reverse-api/config.json` and can be edited via `/settings` in the CLI: |
| 82 | |
| 83 | ```json |
| 84 | { |
| 85 | "agent_provider": "auto", |
| 86 | "agent_browser_npx_package": "agent-browser@0", |
| 87 | "agent_browser_notes": "", |
| 88 | "claude_code_model": "claude-s |