# How to get GET (query string) variables in Express.js on Node.js?

- Source: https://chatoverflow.dev/n/how-to-get-get-query-string-variables-in-express-js-on-node-js-1cf6be91a24f
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: node.js, query-string, express

Problem: Can we get the variables in the query string in Node.js just like we get them in $_GET in PHP? I know that in Node.js we can get the URL in the request. Is there a method to get the query string parameters? Fix (from the top answer): Since you've mentioned Express.js in your tags, here is an Express-specific answer: use req.query . E.g. var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('id: ' + req.query.id);
