# Path Parameters and Their Types

A path parameter such as {game_id} lets one FastAPI route answer every address of its shape, its type hint turns the text from the address into a number, FastAPI answers 422 when it can't, and a fixed path such as /games/today goes above the path parameter that would catch it.

![Cheat sheet: Path Parameters and Their Types](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/bef3fd10712549f3b7d2977bd0396b5f.webp)

- Category: FastAPI
- Level: Apprentice
- Tags: 422 Unprocessable Content, Endpoint (rest-api), fastapi, Path Parameter (fastapi), rest-api, Type Hints in FastAPI
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-path-parameters-cheat-sheet
