app.bsky.feed.search Posts
GET {{baseUrl}}/xrpc/app.bsky.feed.searchPosts?q=<string>&sort=latest&since=<string>&until=<string>&mentions=<at-identifier>&author=<at-identifier>&lang=<language>&domain=<string>&url=<uri>&tag=<string>&tag=<string>&limit=25&cursor=<string>
This endpoint is part of the Bluesky application Lexicon APIs (_app.bsky.\*_
). Public endpoints which don't require authentication can be made directly against the public Bluesky AppView API: https://public.api.bsky.app. Authenticated requests are usually made to the user's PDS, with automatic service proxying. Authenticated requests can be used for both public and non-public endpoints.
To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.
Find posts matching search criteria, returning views of those posts.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
q | string | (Required) Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. | |
sort | string | Specifies the ranking order of results. | |
since | string | Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). | |
until | string | Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). | |
mentions | string | Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. | |
author | string | Filter to posts by the given account. Handles are resolved to DID before query-time. | |
lang | string | Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. | |
domain | string | Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. | |
url | string | Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. | |
tag | string | Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. | |
tag | string | Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. | |
limit | number | ||
cursor | string | Optional pagination mechanism; may not necessarily allow scrolling through entire result set. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"posts":[{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","author":{"did":"\u003cdid\u003e","handle":"\u003chandle\u003e","displayName":"\u003cstring\u003e","avatar":"\u003curi\u003e","associated":{"lists":"\u003cinteger\u003e","feedgens":"\u003cinteger\u003e","starterPacks":"\u003cinteger\u003e","labeler":"\u003cboolean\u003e","chat":{"allowIncoming":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"viewer":{"muted":"\u003cboolean\u003e","mutedByList":{"uri":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"cid":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"listItemCount":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"labels":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"blockedBy":"\u003cboolean\u003e","blocking":"\u003cat-uri\u003e","blockingByList":{"uri":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"cid":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"listItemCount":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"labels":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"following":"\u003cat-uri\u003e","followedBy":"\u003cat-uri\u003e","knownFollowers":{"count":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"followers":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"labels":[{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"},{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"}],"createdAt":"\u003cdateTime\u003e"},"record":{},"indexedAt":"\u003cdateTime\u003e","embed":{"images":[{"thumb":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"fullsize":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"alt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"aspectRatio":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},{"thumb":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"fullsize":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"alt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"aspectRatio":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}]},"replyCount":"\u003cinteger\u003e","repostCount":"\u003cinteger\u003e","likeCount":"\u003cinteger\u003e","quoteCount":"\u003cinteger\u003e","viewer":{"repost":"\u003cat-uri\u003e","like":"\u003cat-uri\u003e","threadMuted":"\u003cboolean\u003e","replyDisabled":"\u003cboolean\u003e","embeddingDisabled":"\u003cboolean\u003e","pinned":"\u003cboolean\u003e"},"labels":[{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"},{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"}],"threadgate":{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","record":{},"lists":[{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","name":"\u003cstring\u003e","purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":"\u003curi\u003e","listItemCount":"\u003cinteger\u003e","labels":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":"\u003cdateTime\u003e"},{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","name":"\u003cstring\u003e","purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":"\u003curi\u003e","listItemCount":"\u003cinteger\u003e","labels":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":"\u003cdateTime\u003e"}]}},{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","author":{"did":"\u003cdid\u003e","handle":"\u003chandle\u003e","displayName":"\u003cstring\u003e","avatar":"\u003curi\u003e","associated":{"lists":"\u003cinteger\u003e","feedgens":"\u003cinteger\u003e","starterPacks":"\u003cinteger\u003e","labeler":"\u003cboolean\u003e","chat":{"allowIncoming":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"viewer":{"muted":"\u003cboolean\u003e","mutedByList":{"uri":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"cid":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"listItemCount":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"labels":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"blockedBy":"\u003cboolean\u003e","blocking":"\u003cat-uri\u003e","blockingByList":{"uri":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"cid":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"name":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"listItemCount":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"labels":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},"following":"\u003cat-uri\u003e","followedBy":"\u003cat-uri\u003e","knownFollowers":{"count":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"followers":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"labels":[{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"},{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"}],"createdAt":"\u003cdateTime\u003e"},"record":{},"indexedAt":"\u003cdateTime\u003e","embed":{"images":[{"thumb":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"fullsize":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"alt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"aspectRatio":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}},{"thumb":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"fullsize":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"alt":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"aspectRatio":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}]},"replyCount":"\u003cinteger\u003e","repostCount":"\u003cinteger\u003e","likeCount":"\u003cinteger\u003e","quoteCount":"\u003cinteger\u003e","viewer":{"repost":"\u003cat-uri\u003e","like":"\u003cat-uri\u003e","threadMuted":"\u003cboolean\u003e","replyDisabled":"\u003cboolean\u003e","embeddingDisabled":"\u003cboolean\u003e","pinned":"\u003cboolean\u003e"},"labels":[{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"},{"src":"\u003cdid\u003e","uri":"\u003curi\u003e","val":"\u003cstring\u003e","cts":"\u003cdateTime\u003e","ver":"\u003cinteger\u003e","cid":"\u003ccid\u003e","neg":"\u003cboolean\u003e","exp":"\u003cdateTime\u003e","sig":"\u003cbyte\u003e"}],"threadgate":{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","record":{},"lists":[{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","name":"\u003cstring\u003e","purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":"\u003curi\u003e","listItemCount":"\u003cinteger\u003e","labels":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":"\u003cdateTime\u003e"},{"uri":"\u003cat-uri\u003e","cid":"\u003ccid\u003e","name":"\u003cstring\u003e","purpose":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"avatar":"\u003curi\u003e","listItemCount":"\u003cinteger\u003e","labels":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"viewer":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"indexedAt":"\u003cdateTime\u003e"}]}}],"cursor":"\u003cstring\u003e","hitsTotal":"\u003cinteger\u003e"}