Tools: Upstash Has a Free Redis API — Serverless Key-Value Store With 10K Commands/Day and Global Replication (2026)

Tools: Upstash Has a Free Redis API — Serverless Key-Value Store With 10K Commands/Day and Global Replication (2026)

What You Get for Free

Quick Start

1. Create a Database

2. Use the REST API (No SDK Needed)

3. Node.js SDK

4. Python

5. Works in Edge Functions

Common Use Cases

Real-World Use Case

Free Plan Limits

The Bottom Line

More Free APIs You Should Know About Self-hosting Redis means managing memory, persistence, replication, and hoping your server does not run out of RAM at 3 AM. Upstash gives you serverless Redis — pay per request, scale to zero, and connect from edge functions. The free tier includes 10,000 commands/day and 256MB storage. Sign up at upstash.com, create a Redis database, grab your REST URL and token. No connection pooling, no TCP, no cold start issues. Pure HTTP. Session storage: Store user sessions with TTL — no database queries on every request. Rate limiting: Simple incr + expire pattern — protect your API in 5 lines of code. Caching: Cache expensive database queries or API responses with automatic expiration. Feature flags: Store flags in Redis, read in milliseconds, update without deployment. A developer running a Next.js app on Vercel told me: "I needed rate limiting for my API. Self-hosted Redis meant spinning up a server just for 10 keys. Upstash free tier handles it perfectly — 10K commands/day is way more than I need, and it works natively with edge functions." If you need Redis but do not want to manage infrastructure — Upstash is Redis done right for the serverless era. HTTP API means it works everywhere, even where TCP connections are not allowed. Need to cache scraped data or build a data pipeline? Check out my web scraping tools on Apify — extract data and pipe it wherever you need. Building something custom? Email me at [email protected] Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

# SET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/set/user:1/alex" \ -H "Authorization: Bearer YOUR_TOKEN" # GET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/get/user:1" \ -H "Authorization: Bearer YOUR_TOKEN" # SET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/set/user:1/alex" \ -H "Authorization: Bearer YOUR_TOKEN" # GET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/get/user:1" \ -H "Authorization: Bearer YOUR_TOKEN" # SET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/set/user:1/alex" \ -H "Authorization: Bearer YOUR_TOKEN" # GET a key -weight: 500;">curl "https://YOUR_ENDPOINT.upstash.io/get/user:1" \ -H "Authorization: Bearer YOUR_TOKEN" -weight: 500;">npm -weight: 500;">install @upstash/redis -weight: 500;">npm -weight: 500;">install @upstash/redis -weight: 500;">npm -weight: 500;">install @upstash/redis import { Redis } from "@upstash/redis"; const redis = new Redis({ url: "https://YOUR_ENDPOINT.upstash.io", token: "YOUR_TOKEN", }); // Basic operations await redis.set("session:abc", { userId: 1, role: "admin" }, { ex: 3600 }); const session = await redis.get("session:abc"); // Rate limiting const key = `ratelimit:${userId}`; const count = await redis.incr(key); if (count === 1) await redis.expire(key, 60); if (count > 100) throw new Error("Rate limited"); // Sorted set for leaderboard await redis.zadd("leaderboard", { score: 1500, member: "player1" }); const top10 = await redis.zrange("leaderboard", 0, 9, { rev: true }); import { Redis } from "@upstash/redis"; const redis = new Redis({ url: "https://YOUR_ENDPOINT.upstash.io", token: "YOUR_TOKEN", }); // Basic operations await redis.set("session:abc", { userId: 1, role: "admin" }, { ex: 3600 }); const session = await redis.get("session:abc"); // Rate limiting const key = `ratelimit:${userId}`; const count = await redis.incr(key); if (count === 1) await redis.expire(key, 60); if (count > 100) throw new Error("Rate limited"); // Sorted set for leaderboard await redis.zadd("leaderboard", { score: 1500, member: "player1" }); const top10 = await redis.zrange("leaderboard", 0, 9, { rev: true }); import { Redis } from "@upstash/redis"; const redis = new Redis({ url: "https://YOUR_ENDPOINT.upstash.io", token: "YOUR_TOKEN", }); // Basic operations await redis.set("session:abc", { userId: 1, role: "admin" }, { ex: 3600 }); const session = await redis.get("session:abc"); // Rate limiting const key = `ratelimit:${userId}`; const count = await redis.incr(key); if (count === 1) await redis.expire(key, 60); if (count > 100) throw new Error("Rate limited"); // Sorted set for leaderboard await redis.zadd("leaderboard", { score: 1500, member: "player1" }); const top10 = await redis.zrange("leaderboard", 0, 9, { rev: true }); from upstash_redis import Redis redis = Redis(url="https://YOUR_ENDPOINT.upstash.io", token="YOUR_TOKEN") redis.set("key", "value", ex=3600) value = redis.get("key") # Hash redis.hset("user:1", {"name": "Alex", "email": "[email protected]"}) user = redis.hgetall("user:1") from upstash_redis import Redis redis = Redis(url="https://YOUR_ENDPOINT.upstash.io", token="YOUR_TOKEN") redis.set("key", "value", ex=3600) value = redis.get("key") # Hash redis.hset("user:1", {"name": "Alex", "email": "[email protected]"}) user = redis.hgetall("user:1") from upstash_redis import Redis redis = Redis(url="https://YOUR_ENDPOINT.upstash.io", token="YOUR_TOKEN") redis.set("key", "value", ex=3600) value = redis.get("key") # Hash redis.hset("user:1", {"name": "Alex", "email": "[email protected]"}) user = redis.hgetall("user:1") // Vercel Edge Function / Cloudflare Worker export default async function handler(req) { const redis = new Redis({ url: process.env.UPSTASH_REDIS_REST_URL, token: process.env.UPSTASH_REDIS_REST_TOKEN, }); const visits = await redis.incr("page:visits"); return new Response(`Visits: ${visits}`); } // Vercel Edge Function / Cloudflare Worker export default async function handler(req) { const redis = new Redis({ url: process.env.UPSTASH_REDIS_REST_URL, token: process.env.UPSTASH_REDIS_REST_TOKEN, }); const visits = await redis.incr("page:visits"); return new Response(`Visits: ${visits}`); } // Vercel Edge Function / Cloudflare Worker export default async function handler(req) { const redis = new Redis({ url: process.env.UPSTASH_REDIS_REST_URL, token: process.env.UPSTASH_REDIS_REST_TOKEN, }); const visits = await redis.incr("page:visits"); return new Response(`Visits: ${visits}`); } - 10,000 commands/day — reads and writes combined - 256 MB storage — enough for sessions, cache, rate limiting - REST API — HTTP-based, works from edge/serverless (no TCP needed) - Global replication — read replicas in multiple regions - Durable storage — data persists (not just in-memory) - TLS encryption — secure by default - QStash — free message queue (500 messages/day) - 30+ Free APIs Every Developer Should Bookmark - Resend Has a Free API - Algolia Has a Free Tier - MongoDB Atlas Has a Free Tier - Auth0 Has a Free Tier - Cloudinary Has a Free API - Firebase Has a Free Tier - Supabase Has a Free Tier - Stripe Has a Free API - GitHub Has a Free API - Notion Has a Free API - PlanetScale Has a Free API - Neon Has a Free API