---
title: "Discussion on \"Get URL Query Params in Next.js using getInitialProps()\" | Hashnode"
description: "Discussion on \"Get URL Query Params in Next.js using getInitialProps()\". As the title says, this is a simple code snippet to get URL Query params in Next.js using getInitialProps() method. \nIn Next.js, getInitialProps() have context property where URL query can be fetched using query. See example code below. \nURL: http://..."
url: "https://hashnode.com/posts/get-url-query-params-in-nextjs-using-getinitialprops/5fc60b45bc24037614dfa627"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Get URL Query Params in Next.js using getInitialProps()](https://blog.surjithctly.in/get-url-query-params-in-nextjs-using-getinitialprops?utm_source=hashnode&utm_medium=feed)

As the title says, this is a simple code snippet to get URL Query params in Next.js using getInitialProps() method. In Next.js, getInitialProps() have context property where URL query can be fetched using query. See example code below. URL: http://...

Dec 1, 2020 · 1 min read · blog.surjithctly.in  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Surjith S M](https://hashnode.com/@surjithctly)

@surjithctly · Kerala, India

  
[View profile](https://hashnode.com/@surjithctly)

Freelance Web & UX Designer

Freelance Web &amp; UX Designer from Incredible India. I design and develop creative websites, landing pages and applications for startups and e

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
