How to use Fetch
Leverage the power of APIs to add dynamic data to your site.
FAQ
How do I use Fetch to load dynamic data in my Framer site?
Fetch lets you dynamically load data into your Framer site without writing code. You’ll find the “Add Fetch” option under the “+” icon in the Content property of Text layers, Component Properties, and most layers inside Components. Within Components, you can also configure Loading and Error Variants to visually represent data-fetching states or errors.
When should I use Fetch instead of Framer’s CMS Collections?
Fetch is ideal for dynamic or personalized data, such as user-specific data (e.g., login status), location-based information, live inventory counts, or real-time stock prices. If your content can be manually entered or managed via a CMS, that’s a better option since Framer optimizes static content for SEO. Fetch doesn’t support lists or large data collections; for list-based data like blog posts or products, use Framer’s CMS Collections with the Sync API.
How does caching work with Fetch, and what should I know about credentials?
Fetch responses can be cached for a specified duration, stored in the visitor’s browser, and retrieved without new network requests until the cache expires. Caching is per URL and occurs at page load, reducing server load and improving performance. For highly dynamic data, you can set a short cache duration. The Credentials option controls whether browser credentials (e.g., cookies) are sent with Fetch requests: 'Same Origin' (default) sends credentials only for requests to the same domain, while 'Include' sends credentials even for cross-domain requests. Note that using 'Include' may not work as expected in the Canvas, and you should avoid including sensitive data as it will be bundled into your JavaScript.
Updated
