Where to host an API with a database
An API usually needs two services: the app and the database. They rarely share one price.
The database can cost more than the app. The estimates below cover the app process, so check each provider page for database prices.
Why an API and database create two bills
Recommended hosts
Laravel Cloud
≈$12/mo Starter + always-on Flex 1GB
One always-on Flex 1GB app instance reaches a $12 monthly compute cap; the $5 usage credit offsets the $5 Starter fee.
- Free option
- New Starter subscriptions get their first month free; after that, Starter costs $5/month and includes $5 in monthly usage credit.
- Why it fits
- Laravel teams that want the framework, database, queues, scheduler, cache, and deploy workflow managed as one platform.
- How deploys work
- Connect a Git repository or run cloud ship; Laravel Cloud builds the supported runtime and deploys every push with zero downtime.
- The tradeoff
- The excellent Laravel experience comes from an opinionated runtime, so arbitrary containers and server-level access are out.
- The managed database bills on top of this estimate.
Render
≈$7/mo Starter
Move to Standard ($25, 1 CPU / 2 GB) if 512 MB gets tight; a managed database adds more.
- Free option
- Hobby workspace: $0 — static sites, free web services (0.1 CPU, 512 MB), a 30-day free Postgres, a 25 MB free key-value store, 5 GB bandwidth, 500 build minutes, 1 seat.
- Why it fits
- Apps and APIs that want git-push deploys with a fixed, understandable instance price.
- How deploys work
- Connect the Git repo; Render builds and deploys on push, with Docker support and instant rollbacks.
- The tradeoff
- The workspace-plus-services model means several line items, and bandwidth overage is pricey.
- The managed database bills on top of this estimate.
Railway
≈$10/mo Hobby + usage
Roughly a quarter vCPU and 512 MB always on; a small database adds a few dollars.
- Free option
- Free: $1 of monthly usage credits, capped at 1 vCPU / 0.5 GB per service, one replica, and 3-day log history.
- Why it fits
- Full-stack apps and APIs where you want the app and its database running in minutes.
- How deploys work
- Connect a repo or image; Railway detects the build, deploys it, and adds databases with one click.
- The tradeoff
- Pure usage billing means the bill moves with your traffic — predictable only while the app is small.
- The managed database bills on top of this estimate.
We rank providers by deployment ease first, then monthly cost. Commission payments don't affect the rank. If your project is different, answer four questions and get a specific recommendation.