{"name":"upstash-ratelimit-js","url":"https://skills.sh/upstash/skills/upstash-ratelimit-js","install":"npx skills add upstash/skills --skill upstash-ratelimit-js","sdk":"upstash","key":"upstash/upstash-ratelimit-js","description":"Lightweight guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.","hasContent":true,"content":"---\nname: upstash-ratelimit-js\ndescription: Lightweight guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.\n---\n\n# Rate Limit TS SDK\n\n## Quick Start\n- Install the SDK and connect to Redis.\n- Create a rate limiter and apply it to incoming operations.\n\nExample:\n```ts\nimport { Ratelimit } from \"@upstash/ratelimit\";\nimport { Redis } from \"@upstash/redis\";\n\nconst redis = new Redis({ url: \"<url>\", token: \"<token>\" });\nconst limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, \"10s\") });\n\nconst { success } = await limiter.limit(\"user-id\");\nif (!success) {\n  // throttled\n}\n```\n\n## Other Skill Files\n- **algorithms.md**: Describes all available rate‑limiting algorithms and how they behave.\n- **pricing-cost.md**: Explains pricing, Redis cost implications, and operational considerations.\n- **features.md**: Lists SDK features such as prefixes, custom keys, and behavioral options.\n- **methods-getting-started.md**: Full method reference for the SDK's API and getting started guide.\n- **traffic-protection.md**: Guidance on applying rate limiting for traffic shaping, abuse prevention, and protection patterns.\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash-ratelimit-js/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.235Z"}