Skip to main content

app.bsky.feed.searchPosts

GET 

/xrpc/app.bsky.feed.searchPosts

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

Query Parameters

    q stringrequired

    Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.

    sort string

    Possible values: [top, latest]

    Default value: latest

    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 at-identifier

    Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.

    author at-identifier

    Filter to posts by the given account. Handles are resolved to DID before query-time.

    lang language

    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 uri

    Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.

    tag string[]

    Possible values: <= 640 characters

    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 integer

    Possible values: >= 1 and <= 100

    Default value: 25

    cursor string

    Optional pagination mechanism; may not necessarily allow scrolling through entire result set.

Responses

OK

Schema

    cursor string
    hitsTotal integer

    posts

    object[]

    required

  • Array [

  • uri at-urirequired
    cid cidrequired

    author

    object

    required

    did didrequired
    handle handlerequired
    displayName string

    Possible values: <= 640 characters

    avatar uri

    associated

    object

    lists integer
    feedgens integer
    starterPacks integer
    labeler boolean

    chat

    object

    allowIncoming stringrequired

    Possible values: [all, none, following]

    viewer

    object

    Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.

    muted boolean

    mutedByList

    object

    uri at-urirequired
    cid cidrequired
    name stringrequired

    Possible values: non-empty and <= 64 characters

    purpose

    object

    required

    oneOf

    string

    avatar uri
    listItemCount integer

    labels

    object[]

  • Array [

  • ver integer
    src didrequired

    DID of the actor who created this label.

    uri urirequired

    AT URI of the record, repository (account), or other resource that this label applies to.

    cid cid

    Optionally, CID specifying the specific version of 'uri' resource this label applies to.

    val stringrequired

    Possible values: <= 128 characters

    The short string name of the value or type of this label.

    neg boolean

    If true, this is a negation label, overwriting a previous label.

    cts date-timerequired

    Timestamp when this label was created.

    exp date-time

    Timestamp at which this label expires (no longer applies).

    sig byte

    Signature of dag-cbor encoded label.

  • ]

  • viewer

    object

    muted boolean
    blocked at-uri
    indexedAt date-time
    blockedBy boolean
    blocking at-uri

    blockingByList

    object

    uri at-urirequired
    cid cidrequired
    name stringrequired

    Possible values: non-empty and <= 64 characters

    purpose

    object

    required

    oneOf

    string

    avatar uri
    listItemCount integer

    labels

    object[]

  • Array [

  • ver integer
    src didrequired

    DID of the actor who created this label.

    uri urirequired

    AT URI of the record, repository (account), or other resource that this label applies to.

    cid cid

    Optionally, CID specifying the specific version of 'uri' resource this label applies to.

    val stringrequired

    Possible values: <= 128 characters

    The short string name of the value or type of this label.

    neg boolean

    If true, this is a negation label, overwriting a previous label.

    cts date-timerequired

    Timestamp when this label was created.

    exp date-time

    Timestamp at which this label expires (no longer applies).

    sig byte

    Signature of dag-cbor encoded label.

  • ]

  • viewer

    object

    muted boolean
    blocked at-uri
    indexedAt date-time
    following at-uri
    followedBy at-uri

    knownFollowers

    object

    The subject's followers whom you also follow

    count integerrequired
    followers undefined[]required

    Possible values: <= 5

    labels

    object[]

  • Array [

  • ver integer
    src didrequired

    DID of the actor who created this label.

    uri urirequired

    AT URI of the record, repository (account), or other resource that this label applies to.

    cid cid

    Optionally, CID specifying the specific version of 'uri' resource this label applies to.

    val stringrequired

    Possible values: <= 128 characters

    The short string name of the value or type of this label.

    neg boolean

    If true, this is a negation label, overwriting a previous label.

    cts date-timerequired

    Timestamp when this label was created.

    exp date-time

    Timestamp at which this label expires (no longer applies).

    sig byte

    Signature of dag-cbor encoded label.

  • ]

  • createdAt date-time
    record required

    embed

    object

    oneOf

    images

    object[]

    required

    Possible values: &lt; 4

  • Array [

  • thumb urirequired

    Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.

    fullsize urirequired

    Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.

    alt stringrequired

    Alt text description of the image, for accessibility.

    aspectRatio

    object

    width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.

    width integerrequired

    Possible values: >= 1

    height integerrequired

    Possible values: >= 1

  • ]

  • replyCount integer
    repostCount integer
    likeCount integer
    quoteCount integer
    indexedAt date-timerequired

    viewer

    object

    Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.

    repost at-uri
    like at-uri
    threadMuted boolean
    replyDisabled boolean
    embeddingDisabled boolean
    pinned boolean

    labels

    object[]

  • Array [

  • ver integer
    src didrequired

    DID of the actor who created this label.

    uri urirequired

    AT URI of the record, repository (account), or other resource that this label applies to.

    cid cid

    Optionally, CID specifying the specific version of 'uri' resource this label applies to.

    val stringrequired

    Possible values: <= 128 characters

    The short string name of the value or type of this label.

    neg boolean

    If true, this is a negation label, overwriting a previous label.

    cts date-timerequired

    Timestamp when this label was created.

    exp date-time

    Timestamp at which this label expires (no longer applies).

    sig byte

    Signature of dag-cbor encoded label.

  • ]

  • threadgate

    object

    uri at-uri
    cid cid
    record

    lists

    object[]

  • Array [

  • uri at-urirequired
    cid cidrequired
    name stringrequired

    Possible values: non-empty and <= 64 characters

    purpose

    object

    required

    oneOf

    string

    avatar uri
    listItemCount integer

    labels

    object[]

  • Array [

  • ver integer
    src didrequired

    DID of the actor who created this label.

    uri urirequired

    AT URI of the record, repository (account), or other resource that this label applies to.

    cid cid

    Optionally, CID specifying the specific version of 'uri' resource this label applies to.

    val stringrequired

    Possible values: <= 128 characters

    The short string name of the value or type of this label.

    neg boolean

    If true, this is a negation label, overwriting a previous label.

    cts date-timerequired

    Timestamp when this label was created.

    exp date-time

    Timestamp at which this label expires (no longer applies).

    sig byte

    Signature of dag-cbor encoded label.

  • ]

  • viewer

    object

    muted boolean
    blocked at-uri
    indexedAt date-time
  • ]

  • ]

Loading...