---
title: Subscription
type: guide
summary: Real-time data subscription with SWR.
---

# Subscription



<iframe
  src="https://codesandbox.io/embed/swr-subscription-example-o0m1pg?fontsize=14&hidenavigation=1&theme=dark"
  style={{
  width: '100%',
  height: '100%',
  border: 0,
  overflow: 'hidden',
  background: 'rgb(21, 21, 21)'
}}
  title="SWR - Subscription"
  allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
  sandbox="allow-autoplay allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
/>


---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)