twitterapi.io is an independent third-party service. Not affiliated with X Corp.

Blogembed tweets on website

How to Embed Tweets on Your Website — 3 Methods, Measured

By Alex Chen•10 min read

Every guide to embedding tweets shows the same thing: click the three dots, choose Embed post, paste the snippet. That works, and for a single tweet in a blog post it is the right answer. It stops being the right answer the moment you embed twenty tweets on a landing page, care about Core Web Vitals, run a strict cookie-consent setup, or want the tweet to match your design system.

This guide covers all three ways to embed tweets on a website — the copy-paste embed, the oEmbed API, and static tweet cards rendered from API data — with numbers we measured ourselves (script payload, cache headers, endpoint latency) and runnable code for each. It finishes with a decision table so you can pick the method that fits your page instead of the one that is easiest to explain.

01 — Section

Method 1 — Copy-paste the embed code (no code, one tweet)

On x.com, open the tweet, click the share icon or the three-dot menu, and choose Embed post. That opens publish.x.com with the tweet URL pre-filled. You can also paste any tweet URL into publish.x.com directly. Adjust the options (dark theme, hide the parent tweet in a reply, language) and copy the snippet.

What you paste is a plain