DEV Community

Alex Spinov
Alex Spinov

Posted on

MongoDB Atlas Has a Free Tier — 512MB Cloud Database With Full API, Search, and Charts

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
Enter fullscreen mode Exit fullscreen mode
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();
Enter fullscreen mode Exit fullscreen mode

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}
])
Enter fullscreen mode Exit fullscreen mode

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"}
  }'
Enter fullscreen mode Exit fullscreen mode

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();
Enter fullscreen mode Exit fullscreen mode

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

Top comments (0)