@upstash/redis
Serverless Redis client for edge and Node.js using REST, with pipeline, Lua scripting, and automatic JSON serialization.
Official Documentation ↗v1.34. Check the official docs for the latest API surface.Installation
npm install @upstash/redisMethods
No methods match this filter.
@upstash/redis is serverless redis client for edge and node.js using rest, with pipeline, lua scripting, and automatic json serialization. This page documents the core methods, installation, and common usage patterns for the current stable release.
Installation
Install @upstash/redis with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.
Core methods
The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v1.34 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.
Frequently asked questions
The faq section in the frontmatter answers the most common questions about @upstash/redis, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.
API reference evidence
Fetched from official sources on 2026-11-08T20:12:00+08:00 via WebFetch https://upstash.com/docs/redis/sdks/ts/getstarted;WebFetch https://cdn.jsdelivr.net/npm/@upstash/redis@latest/index.d.ts(404);WebFetch https://cdn.jsdelivr.net/npm/@upstash/[email protected]/dist/index.d.ts(404).
redis.get→ signature from https://upstash.com/docs/redis/sdks/ts/getstarted; official text: “// string await redis.set(‘key’, ‘value’); let data = await redis.get(‘key’); console.log(data)”redis.set→ signature from https://upstash.com/docs/redis/sdks/ts/getstarted; official text: “await redis.set(‘key2’, ‘value2’, {ex: 1});”
FAQ
- Why REST instead of RESP?
- Edge runtimes lack raw TCP sockets; Upstash exposes a REST API so the client works in Cloudflare Workers and Vercel Edge.
- Is it compatible with ioredis commands?
- Most string, hash, list, and sorted-set commands are supported; check the docs for unsupported commands.
- Does it support Lua scripting?
- Yes. Use redis.eval(script, keys, args) to run Lua scripts server-side.
Report a problem with this API docOpens a pre-filled issue on GitHub.