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
- Go to console.firebase.google.com
- Create a new project
- 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"}
}
}'
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);
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']}")
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"
});
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
- Supabase Has a Free Tier — Postgres + Auth + API
- OpenAI Has a Free API Tier — Build ChatGPT Apps
- Stripe Has a Free API — Accept Payments
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
- 30+ Free APIs Every Developer Should Bookmark
- Mapbox Has a Free API
- Claude AI Has a Free API
- SendGrid Has a Free API
- Vercel Has a Free API
- Supabase Has a Free API
- OpenAI Has a Free API
- Twilio Has a Free API
- Stripe Has a Free API
- GitHub API Has a Free API
- Slack Has a Free API
Need custom data scraping? Email me or check my Apify actors.
Top comments (0)