FastAPI vs NestJS
Two sides of the backend framework decision: minimal router and structured TypeScript. When each fits, what it costs, who moves from one to the other, and what makers who chose it say.
Which fits you
- Your backend needs Python for AI or data work
Use it whenYour backend needs Python for AI or data work.
Trade-offNo built-in ORM, admin or auth; you assemble those from separate libraries.
- Your TypeScript API will grow many domains and you want enforced structure
Use it whenYour API will grow many domains and you want Angular-style structure.
Trade-offMore boilerplate and ceremony than a solo project usually needs.
At a glance
| Used by | 29 makers' products · 319 open-source projects | 21 makers' products · 62 open-source projects |
|---|---|---|
| Moved to it on GitHubpull requests since Oct 2024 | fewer than 3 | 3 from FastAPI |
| Downloads | 128.7M/wk | 14.4M/wk−29% vs npm |
| Pricing | Free (open source). | Free (open source); paid enterprise support and courses available separately. |
| Free tier | Yes | Yes |
| Open source | Yes · self-hostable | Yes · self-hostable |
Who moves from one to the other
Public pull requests on GitHub since Oct 2024 whose title says "FastAPI to NestJS" or the reverse — real code changes, by developers in general rather than makers only.
- feat: migrate backend from FastAPI to NestJSAryan-17008/Autonomous-Financial-Control-Tower · 2026-09-04
- refacto: migrate Python FastAPI microservices to NestJS monolithNoFastNoFun/m-dicail-backend · 2026-06-25
- Migrate backend from FastAPI to NestJS + TypeScriptunrealtryhard07/Ask-Circle-main-V2 · 2026-05-12
What makers say
Makers on using it for backend framework, from Product Hunt and Starter Story interviews, each linked to the source. Products with a page of their own and fuller notes first.
We use FastAPI for our API written in Python. The tool is very easy to use and we believe this is part of the best combination for SaaS development.
We love building our APIs with FastAPI. It streamlines development by handling much of the boilerplate, allowing us to focus on business logic.
FastAPI stood out over Flask with its built-in features like automatic documentation and async support. It made developing Cure AI’s backend faster and more streamlined while keeping the codebase clean and easy to manage.
NestJS powers the Exstats backend. Crawlers for Chrome, Edge, and Firefox stores, the GraphQL API behind the dashboard, and the scheduled jobs for alerts and aggregations all run on it.
NestJS provides the backend architecture behind Cockpit.run. Its modular structure and TypeScript support made it easier to build a scalable infrastructure management system.
We picked Nest.js for its modular structure and scalability, ensuring our backend is robust and future-proof. Think of it as the oven where all your pizza appreciation orders get baked to perfection! 🍕🔥
Loved and watch-outs
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.
- OpenAPI docs are generated automatically, so interactive documentation and typed client SDKs come almost for free. PHPH 2
- Type hints with Pydantic validation catch bad input and bugs during development rather than in production. PHHN
- It removes most API boilerplate, making it the fastest way to deliver a Python API or microservice. PHPH 2HN
- Its single-maintainer governance makes some teams weigh community-run alternatives like Litestar. HN
- Modules, decorators and TypeScript give the backend a clear structure that stays maintainable as features grow complex. PHPH 2
- One NestJS codebase can host the API, crawlers and scheduled jobs together. PHPH 2
- Its Swagger integration derives the OpenAPI spec from validation rules and decorators, so docs stay in sync with code. HN

