<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu" -->

---
title: How NestJS Reads Request Data | daily.dev
description: A brief introduction to NestJS parameter decorators for reading request data. Covers how to use the @Query() decorator to extract query string parameters from...
canonical: https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How NestJS Reads Request Data | daily.dev
og:description: A brief introduction to NestJS parameter decorators for reading request data. Covers how to use the @Query() decorator to extract query string parameters from...
og:url: https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu
og:image: https://api.daily.dev/og/posts/ulsy1SdcU.png
og:image:alt: How NestJS Reads Request Data
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How NestJS Reads Request Data

**[JavaScript Mastery](https://daily.dev/sources/javascriptmastery)** · 1 min read · 1 upvotes · 0 comments

## Summary

A brief introduction to NestJS parameter decorators for reading request data. Covers how to use the @Query() decorator to extract query string parameters from incoming HTTP requests, with a simple example of filtering users by name in a type-safe manner using TypeScript.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=K7CPjEBJuFo>

## Questions this post answers

### How do I read a query string parameter in NestJS?

Use the @Query decorator imported from NestJS on a route handler parameter, specifying the query key name and optionally a TypeScript type like string for type safety. For example, adding @Query('name') name: string to a GET users handler lets you access ?name=Adrian from the URL as the name variable inside the handler.

_Developers wiring up NestJS routes can revisit decorator patterns like this via daily.dev._

## Similar posts on daily.dev

- [NestJS Dependency Injection: Source Code, Type Erasure Hacks, and Building Your Own IoC Container from Scratch](https://daily.dev/posts/nestjs-dependency-injection-source-code-type-erasure-hacks-and-building-your-own-ioc-container-fr-74fnlhzd6) · Medium · 0 upvotes · 0 comments
- [Intro to Nest.js: Server-side JavaScript development on Node](https://daily.dev/posts/intro-to-nest-js-server-side-javascript-development-on-node-2bm9sgdhw) · InfoWorld · 10 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#rest-api](https://daily.dev/tags/rest-api), [#nestjs](https://daily.dev/tags/nestjs)

[View this post on daily.dev](https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How NestJS Reads Request Data","url":"https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu"},"datePublished":"2026-07-08T10:58:51.740Z","dateModified":"2026-09-14T09:07:52.585Z","description":"A brief introduction to NestJS parameter decorators for reading request data. Covers how to use the @Query() decorator to extract query string parameters from...","image":"https://i.ytimg.com/vi/K7CPjEBJuFo/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/K7CPjEBJuFo/sddefault.jpg","isAccessibleForFree":true,"articleSection":"JavaScript Mastery","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"JavaScript Mastery","logo":"https://media.daily.dev/image/upload/s--i6Ls5Q5_--/f_auto/v1724338715/logos/javascriptmastery","url":"https://daily.dev/sources/javascriptmastery"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,rest-api,nestjs","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"How NestJS Reads Request Data","description":"A brief introduction to NestJS parameter decorators for reading request data. Covers how to use the @Query() decorator to extract query string parameters from...","thumbnailUrl":"https://i.ytimg.com/vi/K7CPjEBJuFo/sddefault.jpg","uploadDate":"2026-07-08T10:58:51.740Z","duration":"PT1M","url":"https://api.daily.dev/r/ulsy1SdcU","embedUrl":"https://www.youtube.com/embed/K7CPjEBJuFo"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JavaScript Mastery","item":"https://daily.dev/sources/javascriptmastery"},{"@type":"ListItem","position":3,"name":"How NestJS Reads Request Data"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-nestjs-reads-request-data-ulsy1sdcu#faq","mainEntity":[{"@type":"Question","name":"How do I read a query string parameter in NestJS?","acceptedAnswer":{"@type":"Answer","text":"Use the @Query decorator imported from NestJS on a route handler parameter, specifying the query key name and optionally a TypeScript type like string for type safety. For example, adding @Query('name') name: string to a GET users handler lets you access ?name=Adrian from the URL as the name variable inside the handler. Developers wiring up NestJS routes can revisit decorator patterns like this via daily.dev."}}]}
```

