Bluesky Search API: Search Posts by Keyword

Search posts

Posts matching words or a quoted phrase, newest first or in Bluesky’s ranking, with filters for date range, author, mentioned account, language, linked domain and linked URL. latest continues with nextCursor further back in time; top is one page. How far back a walk can go is not promised. Up to 1000 a request. 1 credit per 100 returned, minimum 1.

POST /search-posts Search & trending
https://api.fetchlayer.dev/bluesky/search-posts
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

query string required

Words to search for. Quoted phrases are supported.

sort string optional

latest: newest first, continued with nextCursor further back in time. top: Bluesky’s ranking, one page of up to 100 (a larger limit with top is a 400). Posts near the point where one page ends and the next begins may be missed or repeated. (default: latest)

since string optional

Only posts from this date and time on (ISO 8601, such as 2026-11-01T00:00:00Z).

until string optional

Only posts before this date and time (ISO 8601).

lang string optional

Only posts in this language, a code such as en or pt-BR.

author string optional

Only posts by this account (handle or account id).

mentions string optional

Only posts mentioning this account.

domain string optional

Only posts linking to this domain.

url string optional

Only posts linking to this exact URL.

limit integer optional

How many posts to return, 1-1000. Each 100 returned is 1 credit, minimum 1. (default: 50)

cursor string optional

Continue from a previous response’s nextCursor, passed back unchanged with the same other parameters. An altered cursor, or one from another listing, is a 400.

excludeOptedOut boolean optional

Leave out entries whose account is known to be opted-out: their posts, their reposts, their place in a follower, liker or member list, and a quoted post or reply parent by them. Entries marked unknown are kept. The account or post you asked for is never left out itself. excludedCount says how many were left out, nested ones included. Mentions of such accounts inside other people’s posts are returned as written. (default: false)

format string optional

json or markdown; any other value is a 400. Over MCP the default is markdown, the result rendered as text; the REST API accepts it and returns JSON. (default: json)

timeoutMs integer optional

Time limit for the whole request, in milliseconds (1000-120000); a value outside that range is a 400. When it runs out, a listing returns what it has with nextCursor and a note, billed for what it returned; a request with nothing to return yet fails with a retryable 503. We answer at the latest about 2 seconds before timeoutMs runs out (15% of it, at least 0.75 s, for limits under 13 seconds). Send timeoutMs equal to your own client’s timeout: then we can answer in time, fast, instead of your client dropping the connection while the request is still running.

Response Fields

search-posts

Search posts

transport string

The data source: always the platform id, "bluesky".

notes string[]

Caveats you can act on, such as a listing that stopped early or entries that were left out. Empty when there are none.

excludedCount number

How many entries this response left out because of excludeOptedOut, nested ones included. 0 without the flag.

query string

The search.

sort string

The order used.

postCount number

How many posts are in this response. The price is set from it.

posts object[]

The posts.

posts[].uri string

The post’s at:// address. Every tool that takes post accepts it.

posts[].cid string

The content hash of this version of the post.

posts[].url string

Link to the post on bsky.app.

posts[].author.did string

The account id. It stays the same when the handle changes; every tool that takes user accepts it.

posts[].author.handle string

The handle, such as bsky.app.

posts[].author.displayName string | null

The display name.

posts[].author.avatarUrl string | null

The avatar image.

posts[].author.url string

Link to the profile.

posts[].author.isVerified boolean

Whether the account shows Bluesky’s verification badge.

posts[].author.labels string[]

Moderation and self-applied labels on the account, such as bot.

posts[].author.loggedOutVisibility string

public, opted-out or unknown. opted-out: the person asked to be shown only to people with a Bluesky account, so do not show it to anyone without one. unknown: the preference was not available in this answer; treat it as not public until a user-profile lookup says otherwise.

posts[].author.createdAt string | null

When the account was created (ISO 8601).

posts[].text string

The post’s text.

posts[].entities object[]

What the text holds, in order: mentions (did), links (url) and hashtags (tag).

posts[].tags string[]

Hashtags attached outside the text.

posts[].langs string[]

The languages the author declared.

posts[].createdAt string | null

When it was posted, as written by the author’s app (ISO 8601).

posts[].indexedAt string | null

When Bluesky first saw it.

posts[].replyCount number | null

Replies, as Bluesky counts them.

posts[].repostCount number | null

Reposts, as Bluesky counts them.

posts[].likeCount number | null

Likes, as Bluesky counts them.

posts[].quoteCount number | null

Quotes, as Bluesky counts them.

posts[].bookmarkCount number | null

Bookmarks, as Bluesky counts them.

posts[].media object[]

Images and video: { type (image or video), url, thumbnailUrl, videoUrl (a streaming playlist), width, height, altText }.

posts[].linkCard object | null

A link card on the post: { url, title, description, imageUrl }.

posts[].quotedPost object | null

The post this one quotes, in the same shape, one level deep.

posts[].quotedUnavailable string | null

Why a quoted post is not returned: excluded (excludeOptedOut), removed (by Bluesky), not_found, blocked, or other (a quoted feed, list or pack).

posts[].replyTo object | null

For a reply: { parentUri, rootUri }.

posts[].loggedOutVisibility string

public, opted-out or unknown. opted-out: the person asked to be shown only to people with a Bluesky account, so do not show it to anyone without one. unknown: the preference was not available in this answer; treat it as not public until a user-profile lookup says otherwise.

posts[].labels string[]

Labels on the post.

hasMore boolean

true when more posts exist. false is the end, and is reported only when Bluesky says there is nothing more. true with nextCursor null means more exists but cannot be read further, and a note says so.

nextCursor string | null

An opaque token to pass back unchanged as cursor, with the same other parameters, to continue. Up to 30,000 characters.

Request

curl -X POST "https://api.fetchlayer.dev/bluesky/search-posts" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"query":"bluesky","limit":5}'

Response

{
  "transport": "bluesky",
  "notes": [],
  "excludedCount": 0,
  "query": "bluesky",
  "sort": "latest",
  "postCount": 5,
  "posts": [
    {
      "uri": "at://did:plc:example7/app.bsky.feed.post/3lexample7",
      "cid": "bafyreiexample",
      "url": "https://bsky.app/profile/example7.bsky.social/post/3lexample7",
      "author": {
        "did": "did:plc:example7",
        "handle": "example7.bsky.social",
        "displayName": "Example account 7",
        "avatarUrl": "https://cdn.bsky.app/img/avatar/plain/did:plc:example/…@jpeg",
        "url": "https://bsky.app/profile/example7.bsky.social",
        "isVerified": false,
        "labels": [],
        "loggedOutVisibility": "public",
        "createdAt": "2024-05-01T12:00:00.000Z"
      },
      "text": "Example post text.",
      "entities": [],
      "tags": [],
      "langs": [],
      "createdAt": "2026-11-25T15:57:29Z",
      "indexedAt": "2026-11-25T15:57:30.043Z",
      "likeCount": 0,
      "replyCount": 0,
      "repostCount": 0,
      "quoteCount": 0,
      "bookmarkCount": 0,
      "media": [],
      "linkCard": {
        "url": "https://example.com/",
        "title": "Example link",
        "description": "Example description.",
        "imageUrl": null
      },
      "quotedPost": null,
      "quotedUnavailable": null,
      "replyTo": null,
      "labels": [],
      "loggedOutVisibility": "public"
    }
  ],
  "nextCursor": "eyJ2IjoxLCJrIjoic2VhcmNoLXBvc3RzIiwi…",
  "hasMore": true
}
Product overview Bluesky API: what it returns, pricing and use cases