What Are Query Parameters?
How query parameters work
A query parameter is written as a key and a value joined by an equals sign, added to the end of a URL after a question mark, like ?category=shoes. To pass more than one, you join them with an ampersand: ?category=shoes&size=10. The server reads these pairs and adjusts what it sends back, so the same base address can return filtered, sorted, or searched results depending on the parameters attached. Because they sit in the URL itself, they are also easy to share and bookmark, and they are best kept to non-sensitive values since the whole address is often logged.
Query parameters examples
Imagine an app with a page that lists products. Instead of building a separate page for every category, you use one page and change the query parameters: /products?category=shoes shows shoes, and /products?category=shoes&sort=price shows shoes ordered by price. The page stays the same; the parameters tell the server which slice of data to return, so one address quietly powers dozens of views.
Frequently Asked Questions
Your Questions, Answered
Don't change this element unless you know what you are doing
on Emergent today


