In Express.js, app.query() registers handlers for the HTTP QUERY method on a path. QUERY is for searches that need a body — filters that are too large, too nested, or too sensitive for a URL query string.
Happy path. Valid body continues to the search result.
Same pattern as POST. Validation style matches other body routes.
Compatibility
Runtime Support
app.query() is an Express.js application method. The QUERY HTTP verb needs a recent Node.js. Browsers rarely send QUERY yet.
✓ Server · Express 5 · Node QUERY support
app.query()
Works wherever Express runs: Node.js is the primary target. Bun and Deno can run many Express apps with compatibility layers. Not available in the browser.
ServerNode.js runtime API
Node.js>=20.19.3 <21 or >=22.2.0 for QUERY
Supported
BunExpress-compatible server apps
Supported
DenoVia npm compatibility / adapters
Supported
app.query()Express on Node.js
Bottom line: Study and run these examples with Node.js and the express package. Copy a snippet into a local file and start the server with node.
Frequently Asked Questions
It registers handlers for the HTTP QUERY method on a path. QUERY carries search input in the request body instead of the URL.
app.get() uses URL query strings. app.query() uses a body, which is better for large, nested, or sensitive filters.
Mount express.json() or another body parser before the route. Without a parser, Express does not fill req.body.
Support is still limited in clients and proxies. Confirm your Node.js version and target environments before production use.
No. Express runs on a Node.js server. Clients must send an HTTP QUERY request to your API.