Your First API Endpoint
Learn to create simple GET endpoints, define routes, and return basic JSON responses.
What's an API Endpoint?
An API endpoint is a specific URL your API exposes — an address that receives requests and returns a service. We start with GET, used to fetch data.
Your FastAPI Application
Every app starts from a FastAPI instance, conventionally named app. This object is the core where all your routes and logic live.
from fastapi import FastAPI
app = FastAPI()
# This 'app' object is where your API lives!All lessons in this course
- Introduction to FastAPI & Setup
- Your First API Endpoint
- Path & Query Parameters
- Interactive API Docs with Swagger UI