🌱 Bluesky.Garden

How to Screenshot a Bluesky Post (Manually or via API)

Updated

To screenshot a single Bluesky post, use your device’s screenshot shortcut on the post page, or open the post’s embed card, which shows just the post without the app around it. To capture posts automatically (for a newsletter, a report, an archive or a bot), send the post URL to a screenshot API and crop to the post with a CSS selector. The TypeScript examples below were tested on a real post.

Option 1: Take a screenshot by hand

  1. Open the post on bsky.app or in the app.
  2. Use your system shortcut: Shift + Cmd + 4 on a Mac (then drag around the post), Win + Shift + S on Windows, or the usual screenshot buttons on a phone.

This is fine for one-off posts, but the image includes whatever the app shows around the post, and the size depends on your screen.

Option 2: Screenshot the post’s embed card

Every Bluesky post has a clean embed view, the same one websites use to embed posts. In the post’s ⋯ menu, choose Embed post to get the embed code, or build the URL yourself:

https://embed.bsky.app/embed/<account DID>/app.bsky.feed.post/<post ID>

The post ID is the last part of the post URL. The DID is the account’s permanent ID; you can look it up for any handle at https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=<handle>. The embed card shows the author, text, media, the date and a Bluesky logo, with no buttons or sidebars, so it looks good in articles and slides.

Option 3: Automate it with a screenshot API

A screenshot API renders the page in a real browser on its servers and returns an image, so you don’t have to run and maintain headless browsers yourself. The examples below use ScreenshotOne. Its free plan includes 100 screenshots a month. Disclosure: ScreenshotOne is made by the maintainer of Bluesky.Garden, and it’s what this site uses for its tool screenshots.

All examples use only the built-in fetch (Node.js 18 or later), with no extra packages. To run them:

  1. Get an access key from the ScreenshotOne dashboard.
  2. Save an example as screenshot.ts in a folder with a package.json containing { "type": "module" }.
  3. Run SCREENSHOTONE_ACCESS_KEY=your-key npx tsx screenshot.ts.

Screenshot a post as it appears on bsky.app

Pass the post URL and a CSS selector, so the image is cropped to the post instead of the whole page:

import { writeFile } from "node:fs/promises";

const ACCESS_KEY = process.env.SCREENSHOTONE_ACCESS_KEY!;

async function screenshotBlueskyPost(postUrl: string): Promise<Buffer> {
  const params = new URLSearchParams({
    access_key: ACCESS_KEY,
    url: postUrl,
    // Crop to the post itself instead of the whole bsky.app page.
    selector: '[data-testid^="postThreadItem-by-"]',
    format: "png",
    device_scale_factor: "2", // retina-sharp image
    block_cookie_banners: "true",
    block_ads: "true",
  });

  const response = await fetch(`https://api.screenshotone.com/take?${params}`);
  if (!response.ok) {
    throw new Error(`ScreenshotOne error ${response.status}: ${await response.text()}`);
  }
  return Buffer.from(await response.arrayBuffer());
}

const image = await screenshotBlueskyPost(
  "https://bsky.app/profile/dmytrokrasun.com/post/3n3m6tm52gk2b"
);
await writeFile("post.png", image);
console.log(`Saved post.png (${image.length} bytes)`);

The result:

A Bluesky post by Dmytro Krasun captured with a screenshot API and cropped to the post

The selector targets the main post on a bsky.app post page. Bluesky can change its page structure, so if the crop ever stops working, switch to the embed card below, which is designed to be embedded and changes less often.

For a dark version, add dark_mode: "true" to the parameters:

The same Bluesky post captured in dark mode

Screenshot a clean embed card

This version turns the post URL into its embed URL (resolving the handle to a DID with Bluesky’s public API) and captures the card. Setting a small viewport height with full_page makes the image exactly as tall as the card:

import { writeFile } from "node:fs/promises";

const ACCESS_KEY = process.env.SCREENSHOTONE_ACCESS_KEY!;

/** Turns https://bsky.app/profile/<handle>/post/<id> into Bluesky's embed URL. */
async function toEmbedUrl(postUrl: string): Promise<string> {
  const match = postUrl.match(/bsky\.app\/profile\/([^/]+)\/post\/([^/?#]+)/);
  if (!match) throw new Error(`Not a Bluesky post URL: ${postUrl}`);
  const [, handleOrDid, postId] = match;

  // Embed URLs need the account's DID, so resolve the handle first.
  let did = handleOrDid;
  if (!did.startsWith("did:")) {
    const res = await fetch(
      `https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=${handleOrDid}`
    );
    if (!res.ok) throw new Error(`Could not resolve handle ${handleOrDid}`);
    did = ((await res.json()) as { did: string }).did;
  }

  return `https://embed.bsky.app/embed/${did}/app.bsky.feed.post/${postId}`;
}

async function screenshotPostCard(postUrl: string): Promise<Buffer> {
  const params = new URLSearchParams({
    access_key: ACCESS_KEY,
    url: await toEmbedUrl(postUrl),
    format: "png",
    viewport_width: "600",
    viewport_height: "100", // with full_page, the image shrinks to fit the card
    full_page: "true",
    device_scale_factor: "2",
  });

  const response = await fetch(`https://api.screenshotone.com/take?${params}`);
  if (!response.ok) {
    throw new Error(`ScreenshotOne error ${response.status}: ${await response.text()}`);
  }
  return Buffer.from(await response.arrayBuffer());
}

const image = await screenshotPostCard(
  "https://bsky.app/profile/dmytrokrasun.com/post/3n3m6tm52gk2b"
);
await writeFile("post-card.png", image);
console.log(`Saved post-card.png (${image.length} bytes)`);

The result:

The same Bluesky post captured as a clean embed card

Screenshot an account’s latest posts

To capture posts in bulk, for example for a weekly report, list the account’s posts with Bluesky’s public API (no login needed) and screenshot each embed card:

import { writeFile } from "node:fs/promises";

const ACCESS_KEY = process.env.SCREENSHOTONE_ACCESS_KEY!;

type FeedItem = { post: { uri: string; author: { did: string } } };

/** Latest original posts (no reposts) of an account, from Bluesky's public API. */
async function getLatestPosts(handle: string, limit: number) {
  const params = new URLSearchParams({ actor: handle, limit: String(limit), filter: "posts_no_replies" });
  const res = await fetch(`https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?${params}`);
  if (!res.ok) throw new Error(`Bluesky API error ${res.status}`);
  const { feed } = (await res.json()) as { feed: FeedItem[] };

  return feed
    .filter(({ post }) => post.author.did === post.uri.split("/")[2]) // skip reposts
    .map(({ post }) => {
      const postId = post.uri.split("/").pop()!;
      return {
        postId,
        embedUrl: `https://embed.bsky.app/embed/${post.author.did}/app.bsky.feed.post/${postId}`,
      };
    });
}

async function screenshot(url: string): Promise<Buffer> {
  const params = new URLSearchParams({
    access_key: ACCESS_KEY,
    url,
    format: "png",
    viewport_width: "600",
    viewport_height: "100",
    full_page: "true",
    device_scale_factor: "2",
  });
  const response = await fetch(`https://api.screenshotone.com/take?${params}`);
  if (!response.ok) {
    throw new Error(`ScreenshotOne error ${response.status}: ${await response.text()}`);
  }
  return Buffer.from(await response.arrayBuffer());
}

for (const { postId, embedUrl } of await getLatestPosts("dmytrokrasun.com", 3)) {
  await writeFile(`${postId}.png`, await screenshot(embedUrl));
  console.log(`Saved ${postId}.png`);
}

Running it saves one PNG per post, named after the post ID.

Tips for production

Other screenshot APIs

ScreenshotOne isn’t the only option. screenshotapis.com compares 38 screenshot and browser APIs on pricing, features and output formats, if you want to weigh alternatives before you pick one.

If you just want to read or download a post’s media without screenshots, see BskyViewer.app. For post data as JSON instead of images, see Bluesky developer tools.

FAQ

How do I screenshot a whole Bluesky post?

Open the post and use your device’s screenshot shortcut, or open its embed card from the post’s ⋯ menu (Embed post) for a clean version. To automate it, send the post URL to a screenshot API with a selector that crops to the post.

Can I screenshot a Bluesky post without the app’s buttons and sidebar?

Yes. Use the embed card at https://embed.bsky.app/embed/<DID>/app.bsky.feed.post/<post ID>. It shows only the post, its media, the date and the Bluesky logo.

Can I take screenshots of Bluesky posts automatically?

Yes. A screenshot API such as ScreenshotOne renders the post in a browser and returns an image. Combined with Bluesky’s public API, you can capture an account’s latest posts on a schedule, as in the examples above.

Do I need a Bluesky account to screenshot posts?

No, for public posts. Both bsky.app post pages and embed cards are visible without logging in, and Bluesky’s public API needs no authentication.

Can I take a dark mode screenshot of a Bluesky post?

Yes. With ScreenshotOne, add dark_mode=true; bsky.app follows the browser’s color scheme and renders the post in its dark theme.

Tools mentioned in this guide

A favicon of ScreenshotOne

ScreenshotOne

A screenshot API that turns any URL, including Bluesky posts and profiles, into an image or PDF, with ad and cookie banner blocking.

Read more
A favicon of LurkAPI

LurkAPI

An API that returns public Bluesky profiles, posts and replies as JSON, alongside other social platforms, and connects to Claude. Paid per call, with free tries.

Read more