PART III · HTTP & APIs

Query Parameter

A value added to a URL to filter, search, sort, or control a request.

01

What is it?

A query parameter is information added to the end of a URL.

It helps control what data the request asks for.

Simple Definition:
A query parameter changes or filters a request.

02

Think of it like...

Think of a search form.

The endpoint identifies what type of data you want.

The query parameters describe how you want that data filtered.

Orders→Filter by Status→Completed Orders
03

What does it do?

Query parameters commonly help with:

Filtering
Searching
Sorting
Pagination
Optional Settings
04

Where is it used?

Query parameters are commonly used in:

Search APIs
List APIs
Reports
Dashboards
Filtering
Pagination
05

Example

GET /api/orders?status=completed

Break down:

/api/ordersEndpoint
statusParameter Name
completedParameter Value
GET /api/orders?status=completed&page=2

Multiple query parameters are usually separated with &.

06

How it connects

Endpoint
→
?
→
Query Parameter
→
Filtered Request

Example:

/api/orders→?status=completed→Completed Orders
07

Do Not Confuse

Query Parameter

Usually controls filtering or optional request behavior.

Example:
/api/orders?status=completed

Path Parameter

Usually identifies a specific resource inside the URL path.

Example:
/api/orders/1001

08

Topic Glossary

ENGLISH TERM中文SIMPLE ENGLISH中文小白理解
Query Parameter查询参数A value added to a URL to control or filter a request.加在 URL 后面用来筛选或控制请求的参数。
Parameter参数A value passed into a request.发送给系统、用来影响请求处理方式的数据。
Query String查询字符串The part of a URL after ?.URL 中 ? 后面的一整段查询参数。
Filter筛选Limiting results based on a condition.根据某个条件只返回符合要求的数据。
Search搜索Finding data that matches a value.根据输入内容查找符合条件的数据。
Sort排序Changing the order of returned data.改变返回数据的排列顺序。
Pagination分页Returning data in smaller pages.把大量数据分成多页返回。
Endpoint接口地址The API address before the query parameters.查询参数前面的 API 访问地址。
?查询开始符The character that starts the query string.URL 中表示查询参数开始的符号。
&参数分隔符The character used to separate multiple query parameters.URL 中用来分隔多个查询参数的符号。
09

What to Remember

Query parameters are added after the URL path.

They commonly filter, search, sort, or control results.

Query parameters are usually optional.

Endpoint + Query Parameter = Controlled Request
↑