Social media APIs throttle embeds differently than timeline requests

Social media app icons on a smartphone screen with a textured grey background

The newsletter for newsletter operators

Daily field notes on deliverability, AI tools, hosting, and monetisation. No "top 10 plugins" filler — real tools, real numbers, real failures.

Social media APIs throttle embeds differently than timeline requests
Photo by Adem AY on Unsplash

If you’ve ever built a site that pulls in social media content—testimonials from Twitter, Instagram feed widgets, YouTube video metadata—you’ve probably hit a rate limit at some point. What’s less obvious is that most platforms separate their rate limits by endpoint type, and embeds get treated very differently than timeline or profile requests.

This matters because the failure modes aren’t the same. A timeline request that hits a rate limit usually returns a 429 status and a retry-after header. An embed request might return a cached fallback, a blank card, or—on some platforms—no error at all, just stale data.

How platforms split rate limits

Twitter’s API (now X) has separate buckets for /statuses/show (single tweet lookup, used by oEmbed), /statuses/user_timeline, and /search/tweets. If you’re on the free tier in 2026, you get 500 tweet lookups per month and 1,500 timeline requests. Embed a popular tweet on your homepage that gets 10,000 visits a day? You’ll burn through your embed quota in under an hour, but your timeline widget might still work fine.

Instagram’s API treats embeds through the oEmbed endpoint separately from the Graph API used for pulling your own feed. The oEmbed endpoint is more permissive—no auth required—but it’s also cached aggressively on Instagram’s side. If you’re embedding a post that’s been deleted or made private, you might still see it rendered for hours because Instagram’s CDN hasn’t invalidated the embed yet.

YouTube separates video metadata requests (used by oEmbed and the Data API) from channel or playlist requests. The Data API has a quota system measured in units, and a single video details request costs 1 unit, while a search costs 100. Embedding a video costs almost nothing; searching for videos to embed costs a lot.

When embeds fail silently

The worst case isn’t a 429 error—it’s when the embed keeps working but shows outdated content. Facebook’s oEmbed endpoint caches post data for up to 24 hours. If someone updates a post you’ve embedded, your site won’t reflect it until Facebook’s cache expires. There’s no manual purge option for third-party embeds.

Twitter’s embed.js script fetches the rendered HTML client-side after page load. If the tweet’s been deleted, you’ll see a blank space or a “this tweet is unavailable” message—but only after the JavaScript loads and tries to hydrate the embed. Server-side rendering won’t catch this; your HTML will still contain the embed markup, and it’ll look fine until the browser tries to fetch the actual content.

LinkedIn doesn’t offer a public oEmbed API at all anymore. If you’re embedding LinkedIn posts, you’re either using an unofficial scraper (which will break when LinkedIn changes their HTML structure) or you’re embedding a static screenshot. Neither approach respects rate limits because there’s no API to rate-limit in the first place.

How to design around this

If you’re embedding social content dynamically—testimonials, recent posts, social proof—build in a fallback that doesn’t depend on the API being available. Cache the embed HTML server-side with a TTL that matches the platform’s cache duration (24 hours for Facebook, 7 days for Twitter). Serve the cached version by default, and refresh it in the background on a slower schedule than your page views.

For high-traffic pages, pre-render embeds at build time instead of fetching them on every request. If you’re using a static site generator, fetch the oEmbed data during the build step and store the HTML in your repo. You’ll avoid rate limits entirely, though you’ll need to rebuild when you want fresh content.

If you’re embedding third-party content—user-generated tweets, Instagram posts from customers—don’t rely on real-time embeds. Fetch the content once when the user submits it, store the rendered HTML or a screenshot, and display that. If the original post gets deleted or rate-limited later, your page still works.

Monitoring rate limit usage

Most platforms include rate limit headers in their API responses: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Log these when you make requests, especially for embeds that fire frequently. You’ll see when you’re close to a limit before you hit it.

Twitter’s API dashboard shows rate limit usage per endpoint, but only if you’re using OAuth. Anonymous oEmbed requests—common for public embeds—don’t show up in your dashboard. You’ll only know you’ve hit the limit when embeds stop loading.

YouTube’s quota usage appears in the Google Cloud Console under “APIs & Services.” If you’re embedding videos on multiple sites, they all share the same project quota unless you’ve set up separate API keys. One site hitting the limit will throttle all your other sites until the quota resets at midnight Pacific time.

If you’re running a content site that embeds social posts frequently, set up alerting when your rate limit remaining drops below 20%. That gives you time to switch to cached embeds or disable dynamic loading before your pages start breaking.

What are you embedding, and how often does it break? Reply and let us know what rate limits you’ve hit—or if you’ve found a workaround that works better than caching.

The newsletter for newsletter operators

Daily field notes on deliverability, AI tools, hosting, and monetisation. No "top 10 plugins" filler — real tools, real numbers, real failures.

Other newsletters you might like

Love Netherlands

Canal towns, hidden villages, Dutch stories — a slow, loving look at the Netherlands, written by the people who love it most.

Subscribe

Love Florida

Love Florida — in your inbox Sun-drenched beaches, world-famous theme parks, the Keys, springs and wildlife, and the best places to visit in Florida. One short email, every day.

Subscribe

Love Spain

Love Spain — in your inbox. Iconic cities, hidden pueblos and the best places to visit in Spain. One short email, every day.

Subscribe

Love Ireland

Everything great about the green emerald isle of Ireland.

Subscribe

Newsletters via the One Two Three Send network.  ·  Want your newsletter featured here? Click here