# Organizing Routes with APIRouter

APIRouter moves each resource's routes into its own file in a routers package, with a prefix that starts every path and a tag that groups them on the docs page, and app.include_router wires each one in, so main.py only puts the app together.

![Cheat sheet: Organizing Routes with APIRouter](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/918cd9facc774fb28cff1d1534f9aaaa.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: APIRouter, Endpoint (rest-api), fastapi, rest-api, Swagger UI, Tags
- Author: Gregor Dzierzon
- Updated: November 23, 2026

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