# fastapi.exceptions.RequestValidationError: 1 validation error for Request
query -> q
  field required (type=value_error.missing)

- **ID:** `python/fastapi-422-missing-query-param`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A function parameter declared without a default is treated as a required query parameter and the client omitted it.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   from fastapi import Query
@app.get('/search')
async def search(q: str = Query(default='')):
    ...
   ```
2. **** (92% success)
   ```
   async def search(q: str | None = None):
    ...
   ```

## Dead Ends

- **** — Still required; Query(...) means required. (85% fail)
- **** — Hides the contract mismatch from the client. (70% fail)
