How to Get Posts from Any Bluesky Account Without an API Key (Python and No-Code)

2026-11-20来源 dev.toEnglish

Bluesky is one of the few big social networks where public posts are still easy to read programmatically. You do not need an account, an app password or an API key to read the posts of a public profile. This post shows two ways to do it: a short Python script against the public API, and a no-code option for when you need many accounts, a schedule or a clean export.

Option 1: the public Bluesky API in Python

Bluesky runs a public, read-only AppView at https://public.api.bsky.app. The endpoint you want is app.bsky.feed.getAuthorFeed. It returns up to 100 posts per request plus a cursor for the next page.

import json import urllib.parse import urllib.request API = "https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed" def author_posts(handle, limit=200): posts, cursor = [], None while len(posts) < limit: params = {"actor": handle, "limit": 100, "filter": "posts_no_replies"} if cursor: params["cursor"] = cursor with urllib.request.urlopen(API + "?" + urllib.parse.urlencode(params)) as r: page = json.load(r) for entry in page["feed"]: if entry.get("reason"): # a repost by this account, skip it continue p = entry["post"] posts.append({ "date": p["record"]["createdAt"], "text": p["record"].get("text", ""), "likes": p.get("likeCount"), "reposts": p.get("repostCount"), "replies": p.get("replyCount"), "uri": p["uri"], }) cursor = page.get("cursor") if not cursor or not page["feed"]: break return posts[:limit] for post in author_posts("bsky.app", 20): print(post["date"], post["likes"], post["text"][:70].replace("\n", " ")) 

A few things worth knowing before you build on it:

  • filter can be posts_no_replies, posts_with_replies, posts_with_media or posts_and_author_threads.
  • Reposts come in the same feed with a reason of type app.bsky.feed.defs#reasonRepost. The post inside belongs to the original author, so check reason if you only want the account's own posts.
  • The web link of a post is not in the response. Build it from the uri: at://did:plc:abc/app.bsky.feed.post/3xyz becomes https://bsky.app/profile/<handle>/post/3xyz.
  • Images, videos, link cards and quotes live in post.embed with types such as app.bsky.embed.images#view and app.bsky.embed.recordWithMedia#view. A quote with media nests the quoted post one level deeper.
  • Search is not public. app.bsky.feed.searchPosts answers 403 on the public AppView, so this approach works with accounts you name, not with keywords.
  • Privacy settings. Some people ask apps not to show their profile to logged-out visitors (the !no-unauthenticated label on the profile). It is good manners to skip those accounts.

For a one-off look at a few accounts, this script is all you need.

Option 2: a ready-made Actor for many accounts and monitoring

Once you need dozens of accounts, a daily or hourly schedule, "only new posts since the last run", or a CSV for someone who does not write Python, the plumbing grows: paging, retries on busy servers, date ranges, deduplication, remembering what you already returned, and parsing every embed type.

I packaged all of that as an Apify Actor: Bluesky Posts Scraper. You paste handles or profile links and get one clean row per post:

{ "account": "bsky.app", "url": "https://bsky.app/profile/bsky.app/post/3n2m24be4e223", "date": "2026-11-18T17:05:26Z", "text": "Encrypted DMs from your Bluesky profile—now for Android and iOS! ...", "likes": 2380, "reposts": 500, "replies": 133, "quotes": 139, "hashtags": [], "mentions": ["germnetwork.com"], "images": [{ "url": "https://cdn.bsky.app/img/feed_fullsize/plain/...", "alt": "..." }], "isRepost": false } 

What it adds on top of the script above:

  • Replies and reposts on demand, or only posts with images or video
  • A date range (dateFrom, dateTo)
  • Return only new posts: schedule it every hour and each run returns only what appeared since the last run
  • Export to JSON, CSV or Excel, or send results to Slack, Google Sheets or a webhook with Apify integrations
  • Accounts that hide from logged-out visitors are skipped and cost nothing

You can also call it from code with the Apify client:

from apify_client import ApifyClient client = ApifyClient("YOUR_APIFY_TOKEN") run = client.actor("webobsidians/bluesky-posts-scraper").call( run_input={"accounts": ["bsky.app", "atproto.com"], "maxPostsPerAccount": 50} ) for item in client.dataset(run["defaultDatasetId"]).iterate_items(): print(item["date"], item["likes"], item["url"]) 

It costs $1.00 per 1,000 posts plus $0.00005 per run start, and Apify's free plan includes monthly credit, so small jobs cost nothing to try.

Which one should you use?

  • A few accounts, once: the Python script.
  • Many accounts, on a schedule, or for a teammate who wants a spreadsheet: the Actor.

Either way, you are reading public data that Bluesky itself serves to anyone, so keep request rates reasonable and respect people's privacy settings.

原文:https://www.a8q9.cn/en/article/how-to-get-posts-from-any-bluesky-account-without-an-api-key-python-and-no-code-6b912f.html

相关文章