Add a live Instagram feed with an AI coding agent

Claude Code, Cursor, Lovable, Bolt and v0 can build the grid in seconds. What they can't do is create a Meta app or keep an Instagram token alive. Give them an API key instead, and one of the prompts below.

The short answer

Ask an agent to “add my Instagram feed” and it will usually write code against the Instagram API and leave you to sort out the token. That means a Meta developer app, a business portfolio, App Review and a token that has to be refreshed — and new Meta apps only get the Unified Login setup, which many older tutorials don't cover.

Feedframer does that part. You log in to Instagram once, we keep the token fresh on our side, and the agent calls one endpoint that returns your posts as JSON. It renders them with your own components, so the feed looks like the rest of your site.

Set up (about two minutes)

  1. 1. Connect the Instagram account

    Sign up, then log in to Instagram through Feedframer. It needs to be a Business or Creator account that you own or are authorised to connect. Building a site for a client? They log in to their own account, or you connect it with their permission.

  2. 2. Copy the API key

    The dashboard gives you a key for that account. Put it in your environment variables (or in Lovable or Bolt’s secrets) as FEEDFRAMER_API_KEY.

  3. 3. Paste one prompt

    Use one of the prompts below. They point the agent at our plain-text docs, so it uses the real response fields instead of guessing.

Prompt for Claude Code, Cursor or Codex

For a codebase with a server — Next.js, Nuxt, Astro, SvelteKit, Laravel. The key stays on the server.

Add a live Instagram feed to this site using Feedframer.

Before writing code, read https://feedframer.com/llms-full.txt and follow it.

- My API key is in the FEEDFRAMER_API_KEY environment variable. Never put it in client code.
- Fetch GET https://feedframer.com/api/v1/me?api_key=... on the server and cache the result for an hour.
- Render the latest 6 posts from the top-level `posts` array as a responsive grid that matches our existing styles.
- Use `mediaUrl` for images and `thumbnailUrl` for videos. Skip posts with neither.
- Each image links to `permalink` and opens in a new tab.
- If the request fails, render nothing rather than breaking the page.
- Do not add a third-party widget script or an Instagram SDK.

Want to check the agent's work? Compare it with our hand-written guides for Next.js, Nuxt and Astro.

Prompt for Lovable, Bolt or v0

Hosted builders usually fetch in the browser, so the key ends up in the page source, as it does in our plain JavaScript examples. If you'd rather it didn't, ask the builder to move the request into a server function.

Add a live Instagram feed below the reviews section using Feedframer.

Read https://feedframer.com/llms-full.txt first and use only the fields it documents.

- Fetch https://feedframer.com/api/v1/me?api_key=YOUR_API_KEY in the browser.
- Show the latest 6 posts from the top-level `posts` array in a 3-column grid (2 on mobile), using our site's spacing and rounded corners.
- Use `mediaUrl` for images and `thumbnailUrl` for videos, lazy-loaded.
- Each image links to `permalink` in a new tab.
- If the fetch fails, hide the section.

Make it stick for next time

Add this to your AGENTS.md, CLAUDE.md or Cursor rules, so the agent reaches for the same approach on every project instead of rediscovering the Instagram API each time:

## Instagram feeds
When asked for a live Instagram feed, gallery or grid, use the Feedframer API
(docs: https://feedframer.com/llms-full.txt). Key in FEEDFRAMER_API_KEY, fetched
server-side where the framework allows. No widget scripts.

Honest trade-offs

  • It's an API, not a widget builder. There's nothing to style in a dashboard; the agent (or you) owns the markup.
  • The account must be Instagram Business or Creator. Personal accounts aren't supported, and a public username alone isn't enough.
  • The free plan refreshes daily. If a client posts several times a day and wants it on the site within the hour, that's Premium.

FAQ

Why can’t the AI just connect to the Instagram API itself?

The agent can write the code, but it cannot create a Meta app, pass App Review or log in to Instagram for you. New Meta apps also only get the Unified Login setup now, so the token flow a lot of older tutorials describe no longer works for them. Feedframer already has a working Meta app: you log in once, we refresh the token on our side, and the agent only needs an API key.

Will it work in Lovable, Bolt, v0, Cursor and Claude Code?

Yes. It is one HTTP request that returns JSON, so any tool that can write a fetch call can use it. Hosted builders like Lovable and Bolt usually fetch in the browser; frameworks like Next.js, Nuxt and Astro can fetch on the server and keep the key out of the page.

Is there a plugin or widget to install?

No, and that is deliberate. There is no script tag and no npm package; the agent renders the posts with your own components, so the feed matches the rest of the site. If you want a hosted widget you style in a dashboard, a widget tool is a better fit than an API.

Is it free?

The free plan covers one Instagram account and its six latest posts, refreshed daily, with no limit on API calls or page views. That is enough for a typical single small-business site. Premium adds up to five accounts, more posts and hourly refresh, which suits anyone building sites for several clients.

Get the key, paste the prompt

Free for one account and its six latest posts, refreshed daily, with no limit on API calls or views.