Skip to content

HTTP API

Under /_profiler, answering only localhost, only in development: on the dev server for React Router, and on the profiler’s own port (http://localhost:4983) for a Node server. /_profiler, /_profiler/:token and /_profiler/stats are the page; the rest is JSON.

Route Returns
GET /api/profiles?url=&kind=&parent=&limit= Profiles, newest first, without their records (50 by default)
GET /api/profiles/:token One profile, whole
GET /api/stream Server-sent events: one profile per finished request, clear when the storage is emptied, a ping every 15 s
GET /api/stats Stats across the stored profiles
GET /api/meta The project root, to show short paths and open your editor
POST /api/profiles Takes another process’s finished profile, as JSON; refuses a request with an Origin
DELETE /api/profiles Empties the storage

createHandler() from query-profiler is a plain Fetch handler (Request → Response), so any framework can mount it.

Header Where What
X-Debug-Token Every profiled response The profile’s token, to open it at /_profiler/:token
X-Debug-Parent Requests a page makes The token of the page that made the call, so its profile hangs under it