DEV Community

Alex Spinov
Alex Spinov

Posted on

Firebase Has a Generous Free Tier — Build Apps with Auth, Database, Hosting, and Cloud Functions at Zero Cost

Firebase gives you a massive free tier: authentication for unlimited users, a real-time database, cloud Firestore, file storage, hosting, and even Cloud Functions. For most side projects and MVPs, you'll never pay a cent.

Get Started

  1. Go to console.firebase.google.com
  2. Create a new project
  3. Go to Project Settings → General → copy your config object

1. Firestore — NoSQL Database (REST API)

# Read documents from a collection
curl "https://firestore.googleapis.com/v1/projects/YOUR_PROJECT/databases/(default)/documents/users" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Create a document
curl -X POST "https://firestore.googleapis.com/v1/projects/YOUR_PROJECT/databases/(default)/documents/users" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "name": {"stringValue": "Alex"},
      "email": {"stringValue": "alex@example.com"},
      "plan": {"stringValue": "free"}
    }
  }'
Enter fullscreen mode Exit fullscreen mode

2. Authentication

import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword } from "firebase/auth";

const auth = getAuth();

// Sign up
await createUserWithEmailAndPassword(auth, "user@example.com", "password123");

// Sign in
const user = await signInWithEmailAndPassword(auth, "user@example.com", "password123");
console.log("Logged in:", user.user.uid);
Enter fullscreen mode Exit fullscreen mode

3. Python — Data Pipeline

import firebase_admin
from firebase_admin import credentials, firestore

cred = credentials.Certificate("service-account.json")
firebase_admin.initialize_app(cred)
db = firestore.client()

# Write data
db.collection("products").document("p001").set({
    "name": "Web Scraper Pro",
    "price": 29.99,
    "active": True
})

# Query data
products = db.collection("products") \
    .where("active", "==", True) \
    .order_by("price") \
    .limit(10) \
    .stream()

for doc in products:
    data = doc.to_dict()
    print(f"${data['price']}{data['name']}")
Enter fullscreen mode Exit fullscreen mode

4. Node.js — Real-Time Listener

import { initializeApp } from "firebase/app";
import { getFirestore, collection, onSnapshot, addDoc } from "firebase/firestore";

const app = initializeApp({ /* your config */ });
const db = getFirestore(app);

// Listen for new messages in real-time
onSnapshot(collection(db, "messages"), (snapshot) => {
  snapshot.docChanges().forEach((change) => {
    if (change.type === "added") {
      console.log("New message:", change.doc.data().text);
    }
  });
});

// Add a message
await addDoc(collection(db, "messages"), {
  text: "Hello Firebase!",
  timestamp: new Date(),
  userId: "user-123"
});
Enter fullscreen mode Exit fullscreen mode

Free Tier Limits (Spark Plan)

Service Free Limit
Authentication Unlimited users
Firestore 1 GB storage, 50K reads/day, 20K writes/day
Realtime Database 1 GB storage, 10 GB/month transfer
Cloud Storage 5 GB storage
Hosting 10 GB storage, 360 MB/day transfer
Cloud Functions 2M invocations/month

What You Can Build

  • Chat app — real-time messaging with Firestore listeners
  • Social network — user profiles, posts, likes, comments
  • E-commerce store — products, cart, orders, payments
  • Blog platform — CMS with auth and real-time updates
  • IoT dashboard — store and display sensor data in real-time
  • Mobile app backend — cross-platform with React Native or Flutter

More Free API Articles


Need Web Data? Try These Tools

If you're building apps that need web scraping or data extraction, check out my ready-made tools on Apify Store — scrapers for Reddit, YouTube, Google News, Trustpilot, and 80+ more. No coding needed, just run and get your data.

Need a custom scraping solution? Email me at spinov001@gmail.com


More Free APIs You Should Know About

Need custom data scraping? Email me or check my Apify actors.

Top comments (0)