# Express: Access GET Parameters in Node.js

> Read query string parameters from an incoming request in an Express app using the req.query property, with a full working code example

**URL:** https://sentry.io/answers/access-get-parameters-in-express-on-node-js/

---

## The Problem

How do I access GET parameters in a URL's query string in a Node.js Express application?

## The Solution

We can access the GET parameters of the current URL using the [`req.query`](http://expressjs.com/en/api.html#req.query) property:

```javascript
const express = require("express");

const app = express();

app.get("/", (req, res) => {
  res.send(`GET parameters: ${JSON.stringify(req.query)}`);
});

app.listen(8000);
```

Given the URL `http://localhost:8000?id=1&firstname=Jane&surname=Doe`, this code will return an HTTP response with the following content:

```
GET parameters: {"id":"1","firstname":"Jane","surname":"Doe"}
```

---

*Source: [sentry.io/answers/access-get-parameters-in-express-on-node-js/](https://sentry.io/answers/access-get-parameters-in-express-on-node-js/)*
