API Replay is a Chrome MV3 extension for recording and replaying network/API traffic so frontend work is deterministic, even when shared environments are unstable.
It is built for a low-overhead workflow: record once, export JSON fixtures, and replay locally in dev or tests without introducing extra infra.
- Keep working when central APIs are slow, down, or changing.
- Reproduce API-dependent bugs with versioned fixtures.
- Mock real client/network request flows without switching tools.
- Stay in your existing workflow (browser + editor + test runner).
- Download the latest
dist.zipfrom GitHub Releases. - Unzip it locally to a folder (for example
~/Downloads/apireplay-dist/).
- Open chrome://extensions/.
- Enable
Developer mode. - Click
Load unpacked. - Select the unzipped release folder.
- Open the extension popup.
- Start recording with a name + URL filter.
- Use your app normally so requests are captured.
- Stop recording.
- Start replay for that recording and refresh your app.
Tip: Use Alt+Shift+R to toggle recording quickly.
A common use case is recording on a central/staging environment where APIs are served under microservice-prefixed paths (e.g. /microservice1/api/users), then replaying locally where the same API is served at a shorter path (e.g. /api/users).
To handle this:
- Record normally on the central environment — requests are stored as-is.
- Before starting replay locally, enter a URL mapping in the URL Mappings field in the Replay tab:
/microservice1/api -> /api - During replay, incoming requests to
/api/userswill be matched against the recorded/microservice1/api/usersentry.
Multiple mappings are supported (one per line). The first matching prefix wins. Mappings are saved with the recording's replay options and restored when you select the recording again.
Capture traffic from a central/staging environment, export the recording JSON, commit it, and reuse it locally or in CI.
Use applyRecordingMocks to fulfill browser requests from an exported recording fixture:
- Guide:
docs/playwright-integration.md - Helper API:
tests/helpers/recording-mock.ts
API Replay currently documents and supports client/network request mocking flows. This repository does not position SSR recording as a currently supported feature.
- Record requests by URL filter.
- Replay captured responses with optional fallback matching.
- Edit saved response payloads and status codes.
- Manage multiple recordings (rename, duplicate, delete, import, export).
- Use presets for common filters.
- Search requests by URL/method/status.
- Enable/disable replay per request.
- Simulate replay latency (
latencyMsor range). - Map recorded URL path prefixes to different prefixes during replay (e.g.
/microservice1/api→/api). - View replay stats (matched/unmatched/hit counts).
npm run lint
npm run typecheck
npm run test
npm run buildUseful scripts:
npm run dev- Vite dev modenpm run package- builds and createsdist.zipnpm run test:e2e- Playwright extension smoke test
src/background/: modular MV3 service worker (main,recorder,replayer,messaging,state-store,logger)src/popup/: popup UI with components and storage/import-export servicessrc/shared/: typed message/storage/recording contracts- Storage model uses versioned, UUID-keyed recordings with migration support
CHANGELOG.mdCONTRIBUTING.mdSECURITY.mdPRIVACY.mddocs/playwright-integration.mddocs/workflows/central-record-local-replay.mddocs/store/
Apache 2.0 - see LICENSE.

