# Putting an API Online

Put your API on the internet, free. You'll get a project ready for a host, learn honestly where an online API's data lives and what a free tier wipes, deploy on Render from GitHub, and share the link. Then you'll put a parks department's trail conditions API online, and the course closes with your final capstone.

Updated: November 19, 2026

## [Ready for a Host](https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-ready-for-a-host)

1. [Getting an API Ready for a Host](https://www.ask-codey.com/lessons/fastapi-deploy-getting-ready) (Journeyman): A host is a computer that's always on at an address anyone can reach, and a FastAPI project is ready for one when its requirements.txt pins every package, a .python-version file names its Python, its start command runs uvicorn with --host 0.0.0.0 and --port $PORT, its settings come from environment variables, and a /health route says it's working.
2. [Where the Data Lives When Your API Is Online](https://www.ask-codey.com/lessons/fastapi-deploy-where-data-lives) (Journeyman): Render's free web service wipes its files every time it redeploys, restarts or spins down, so a SQLite file there holds demo data that the API seeds at startup when the database is empty, and keeping data for real takes a persistent disk or a hosted database such as PostgreSQL, which cost money.

## [Your API Online](https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-your-api-online)

1. [Put Your API Online with Render](https://www.ask-codey.com/lessons/fastapi-deploy-render) (Journeyman): Render's free web service builds a FastAPI app from its GitHub repository with pip install -r requirements.txt, starts it with uvicorn main:app --host 0.0.0.0 --port $PORT, keeps its secrets in environment variables and checks /health before sending anyone to a deploy, and then every push deploys again, while a rollback puts an earlier deploy back.

## [Exercise: Trail Conditions Online](https://www.ask-codey.com/courses/python-web-apis/topics/exercise-fastapi-trail-conditions-online)

1. [Exercise: Trail Conditions Online](https://www.ask-codey.com/lessons/exercise-fastapi-trail-conditions-online) (Journeyman): Get Willow Creek Parks' finished trails API ready for a host (a .python-version file, settings read from the environment, demo trails seeded at startup on an empty database, and a /health route), then put it online with Render's free web service and hand in a repository whose README links the live API.

## [Where to Go Next](https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-next-steps)

1. [Where to Go Next](https://www.ask-codey.com/lessons/fastapi-where-to-go-next) (Journeyman): A look back at what you can now build with FastAPI, two projects to build on your own that put it all together (a tool library's API and an API of your own, online at a link), and how to choose a next step among a front end, PostgreSQL, SQLAlchemy, Docker and Django.

Source: https://www.ask-codey.com/courses/python-web-apis/chapters/fastapi-putting-an-api-online
