Setting up a database should not take longer than writing your first query.
MongoDB Atlas gives you a free cloud database — 512MB storage, shared cluster, full MongoDB API. No credit card. No expiration.
I have been using their free tier for prototypes and side projects for years. Here is everything you need to know.
What You Get for Free
- 512 MB storage on a shared M0 cluster
- Full MongoDB API — CRUD, aggregation, indexes
- Atlas Search — full-text search powered by Lucene
- Charts — visual dashboards from your data
- Realm/Device Sync — mobile offline-first sync
- Data API — REST endpoints for your collections (no driver needed)
- 3 regions — AWS, GCP, or Azure
- Automatic backups — daily snapshots
Quick Start (3 Minutes)
1. Create a Cluster
Sign up at mongodb.com/atlas, choose M0 Free Tier, pick a region.
2. Connect with Node.js
npm install mongodb
import { MongoClient } from "mongodb";
const client = new MongoClient("mongodb+srv://user:pass@cluster.mongodb.net/mydb");
await client.connect();
const db = client.db("mydb");
// Insert
await db.collection("users").insertOne({
name: "Alex",
email: "alex@example.com",
created: new Date()
});
// Find
const users = await db.collection("users").find({ name: "Alex" }).toArray();
console.log(users);
// Aggregate
const stats = await db.collection("orders").aggregate([
{ $group: { _id: "$status", count: { $sum: 1 }, total: { $sum: "$amount" } } }
]).toArray();
3. Connect with Python
from pymongo import MongoClient
client = MongoClient("mongodb+srv://user:pass@cluster.mongodb.net/mydb")
db = client["mydb"]
# Insert
db.users.insert_one({"name": "Alex", "email": "alex@example.com"})
# Find
users = list(db.users.find({"name": "Alex"}))
# Full-text search (Atlas Search)
results = db.articles.aggregate([
{"$search": {"text": {"query": "web scraping", "path": "title"}}},
{"$limit": 10}
])
4. Data API (No Driver Needed)
MongoDB Atlas offers a REST-like Data API — perfect for serverless or edge functions:
curl -X POST "https://data.mongodb-api.com/app/YOUR_APP/endpoint/data/v1/action/findOne" \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-d '{
"dataSource": "Cluster0",
"database": "mydb",
"collection": "users",
"filter": {"email": "alex@example.com"}
}'
Atlas Search (Free!)
Full-text search on the free tier. No Elasticsearch needed:
// Create a search index in Atlas UI, then query:
const results = await db.collection("products").aggregate([
{
$search: {
index: "default",
text: { query: "wireless headphones", path: ["name", "description"] }
}
},
{ $limit: 10 },
{ $project: { name: 1, price: 1, score: { $meta: "searchScore" } } }
]).toArray();
Real-World Use Case
A developer building a job board told me: "I started with SQLite, then needed search. Added Elasticsearch — now I have two databases to manage. Switched to Atlas free tier with Atlas Search. One database, one query language, zero infrastructure. My whole backend is 200 lines of code."
Free Plan Limits
| Feature | Free Tier (M0) |
|---|---|
| Storage | 512 MB |
| RAM | Shared |
| Connections | 500 |
| Atlas Search | Yes |
| Charts | Yes |
| Data API | Yes |
| Backups | Daily |
| Regions | 3 (AWS/GCP/Azure) |
| Expiration | Never |
The Bottom Line
512MB is enough for 100K+ documents in most use cases. Atlas Search removes the need for a separate search engine. Charts give you dashboards without Metabase or Grafana.
For prototypes, MVPs, and small production apps — there is no reason to run your own MongoDB.
Need to scrape data and store it in MongoDB? Check out my web scraping tools on Apify — extract data from any website and export directly to your database.
Building something custom? Email me at spinov001@gmail.com
More Free APIs You Should Know About
- 30+ Free APIs Every Developer Should Bookmark
- Auth0 Has a Free Tier
- Cloudinary Has a Free API
- OpenAI Has a Free API Tier
- Stripe Has a Free API
- Firebase Has a Free Tier
- Supabase Has a Free Tier
- NASA Has a Free API
- Twilio Has a Free Trial API
- Slack Has a Free API
- Mapbox Has a Free Tier
- Algolia Has a Free API
- PlanetScale Has a Free API
- Resend Has a Free API
- Upstash Has a Free API
- Neon Has a Free API
Top comments (0)