Everything *[NYC] 2026: see what we announced. →
Skip to content

Live Content API

Instant, real-time content delivery at scale

With just a few lines of code, your applications can respond instantly to content changes. Serve up-to-date content to all users globally. No specialized infrastructure or dedicated engineering required.


Build live experiences with minimal effort.

The Live Content API enables you to create real-time applications with just a few lines of code. It powers subscriptions to fine-grained changes, ensuring your app responds instantly to any updates in relevant documents.

Check out this code example for the minimum setup in Next.js using the next-sanity package, and explore our documentation for installation guidance in other frameworks.

import { client } from "@/sanity/client";
import { defineLive } from "next-sanity";

const { sanityFetch, SanityLive } = defineLive({ client });

export default async function Page() {
  const {data: products} = await sanityFetch({ query: PRODUCTS_QUERY });

  return (
    <section>
      {products.map((product) => (
        <article key={product._id}>
          <a href={`/product/${product.slug}`}>{product.title}</a>
        </article>
      ))}
      <SanityLive />
    </section>
  );
}

API-fresh, CDN-fast

The Live Content API sends events when fine-grained changes occur, so that the CDN is only partly invalidated. This change is propagated throughout the CDN as well as to individual end-users. Even under high-traffic scenarios with fast-moving such as Black Friday sales or limited edition releases – your application's data will be as fresh as the source from which it is consumed.

Now, it’s just live by default. Sanity has absolutely come in to crush it with this one!
Sonny Sangha

Sonny Sangha

Youtuber


Why build apps any other way?

The days of pressing refresh to get the latest products, promotions, news stories, or anything else are over.

Live content is pushed, not pulled. The content of your application should change when content at the source changes. The Live Content API makes it so.


Learn more

Explore the Next.js track on Sanity Learn

Build a functional, content-driven and dynamic web application that best serves your end-users, fellow developers and content authors.

illustration of Sanity Learn interface

Course by Sonny Sangha

Build a Real-Time E-Commerce App with the Live Content API

Learn from Sonny Sangha how to integrate Sanity's Live Content API with Next.js 15 to create a dynamic, production-ready e-commerce application


Get started in minutes

Real-time updates made easy on every plan. Start building today!