Query parameters are those in the URL after ?. In FastAPI, any function argument that is not in the path becomes a query parameter. A default value makes it optional, and Query lets you add constraints such as a maximum length.
Example
@app.get('/items')
def lister(limit: int = 10, q: str | None = None):
...