100 free credits. No credit card required. Get a key

Bluesky post search API

Full-text search over Bluesky posts, latest or top, filtered by date, language, author, mentions, linked domain or URL, and hashtags.

GET /v1/bluesky/search/posts1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/bluesky/search/posts?q=espresso&limit=5",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"posts": [
{
"uri": "at://did:plc:owq4fzezy2nk7xehqbulzoks/app.bsky.feed.post/3n33rkjaou225",
"cid": "bafyreifynu2siem5qxpwsbkppypvkww3p7kwquds4jzmwausmx5dbokoqe",
"author": {
"did": "did:plc:owq4fzezy2nk7xehqbulzoks",
"handle": "formthehead.bsky.social",
"displayName": "formthehead",
"pronouns": "he/him",
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:owq4fzezy2nk7xehqbulzoks/bafkreigt…",
"associated": {
"…": "2 fields"
},
"labels": [],
"createdAt": "2023-10-26T15:57:10.821Z"
},
"record": {
"text": "If you ever go to a big chain cafe in China half the menu is just [normal drink]…",
"createdAt": "2026-11-24T23:14:56.776Z",
"$type": "app.bsky.feed.post",
"embed": {
"…": "2 fields"
},
"langs": [
"…"
]
},
"embed": {
"record": {
"…": "12 fields"
},
"$type": "app.bsky.embed.record#view"
},
"replyCount": 1,
"repostCount": 0,
"likeCount": 2,
"quoteCount": 0,
"bookmarkCount": 0,
"…": "2 more fields"
},
"… 4 more"
],
"cursor": "eyJzIjpbMTc5NTU2MTY5MjAwMCwiZGlkOnBsYzp2cmNzcjVoZHYzYnNpNDdqcWJ0am1zeGkiLCIzbjMz…",
"hitsTotal": 10000
}

Parameters

NameTypeDescription
qquery · requiredstringSearch terms; Lucene-style "quoted phrases" work. Example: espresso.
sortquery"latest" | "top"latest (default) or top. One of latest, top.
sincequerystringOnly posts at or after this time. Example: 2026-09-01.
untilquerystringOnly posts before this time. Example: 2026-09-01.
langquerystringLanguage code, e.g. en, ja.
authorquerystringOnly posts by this handle or DID.
mentionsquerystringOnly posts mentioning this handle or DID.
domainquerystringOnly posts linking to this domain.
urlquerystringOnly posts linking to this URL.
tagquerystringHashtags without #, comma-separated (all must match).
limitqueryintegerItems per page, 1 to 100. Default 25.
afterquerystringCursor: the previous page’s cursor.
Response fields

200 with a BlueskySearchPosts, in the AT Protocol’s own app.bsky lexicon JSON.

FieldTypeDescription
postsBlueskyPostView[]
cursorstringPass it as after for the next page; absent on the last page.
hitsTotalinteger
Status codes
StatusMeaning
200A page of matching posts.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The account, post, feed, list or starter pack does not exist, was deleted or taken down.
429Too many requests. Wait for Retry-After seconds.
503Bluesky is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

How do I get the next page?

Pass the response’s cursor back as after. Bluesky’s cursors are stateless, so they keep working.

Can I go further back in time?

Set until to the oldest createdAt you have and search again.

Bluesky is a trademark of Bluesky Social PBC. We are not affiliated with or endorsed by Bluesky.