EDDYMENS

Published a year ago

What Is A Query Parameter?

Table of contents

Definition

A query parameter is the part of a URL that carries information and relays it back to the server [→].

Use Cases and Examples

URLs can relay information using different formats.

The query parameter structure is one of them. There is also the path parameter [→].

A query parameter takes to format: domainname.com?queryKey=queryValue.

?queryKey=queryValue is the part known as the query parameter.

Here is a more concrete example example.com?search=john.

In this last example, the server will receive the value john under the key search.

In this example, upon receiving the query parameter and its value it will perform a search and return the results to the user.

Summary

Query parameters are one of the oldest ways to pass data back to the server and it's still used by a lot of web services out there.

Here is another article you might like 😊 What is a relative URL?