---
title: "Vercel Edge Middleware Rate Limit"
description: "Add rate limiting to your application with any frontend framework."
url: "https://vercel.com/templates/other/middleware-rate-limit"
links:
  repository: "https://github.com/vercel/examples/tree/main/edge-middleware/rate-limit-any-framework"
  demo: "https://vercel-rate-limit.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=Vercel+Edge+Middleware+Rate+Limit&demo-description=Add+rate+limiting+to+your+application+with+any+frontend+framework.&demo-url=https%3A%2F%2Fvercel-rate-limit.vercel.app%2F&project-name=ratelimit&repository-name=middleware-rate-limit&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Frate-limit-any-framework&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22upstash%22%2C%22productSlug%22%3A%22upstash-kv%22%7D%5D&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2Ftp0LgZSGIZKn6WUjhUoko%2Fc359e2f212272756622d7a82d408a020%2FCleanShot_2023-07-19_at_15.51.48_2x.png"
---

# Vercel Edge Middleware Rate Limit

Add rate limiting to your application with any frontend framework.

# Vercel Edge Middleware + Vercel KV Rate Limit

This template shows how to add rate limiting to any application with [Vercel KV](https://vercel.com/docs/storage/vercel-kv) and [Vercel Edge Middleware](https://vercel.com/docs/concepts/functions/edge-middleware).

> **Note:** If you are using Next.js, you can use the built in Middleware support rather than needing `@vercel/edge` used in this package. Please refer to the [Next.js example](https://vercel.com/templates/next.js/ratelimit-with-upstash-redis).

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/rate-limit-any-framework&project-name=ratelimit&stores=%5B%7B"type"%3A"kv"%7D%5D)

## Related Templates

### [Next.js Boilerplate](https://vercel.com/templates/next.js/nextjs-boilerplate)

Get started with Next.js and React in seconds.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
