Threads Search API — Search Posts by Keyword

Search posts

Search Threads posts for words: one page only, with no further pages. About 20 posts for sort top, about 6 for sort recent. Each post carries exact counts. 1 credit.

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

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

query string required

Words to search posts for.

sort string optional

top: the site’s own ranking, about 20 posts. recent: newest first, about 6 posts. (default: top)

limit integer optional

Maximum posts returned, 1-30. Threads shows one page, so fewer can come back. (default: 20)

format string optional

json or markdown; any other value is a 400. Over MCP, markdown returns 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 paged 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, "threads".

notes string[]

Caveats you can act on, such as "one page of results" or a listing that stopped early. Empty when there are none. An empty result always comes with a note explaining it.

query string

The search words.

sort string

The order used.

postCount number

How many posts are in this response.

posts object[]

The posts, in the post shape. There is no further page: a notes entry says so.

posts[].id string

The post’s numeric id.

posts[].code string

The post’s short code, as in its link. post-detail and post-replies accept it.

posts[].url string

Link to the post.

posts[].author.id string

The account’s numeric id.

posts[].author.username string

The username, without @. Every tool that takes user accepts it.

posts[].author.fullName string | null

The display name.

posts[].author.isVerified boolean

Whether the account shows a verification badge.

posts[].author.isPrivate boolean | null

Whether the account is private. A private account’s posts are not returned.

posts[].author.profilePicUrl string | null

Profile picture. Expires after a few days like every media link.

posts[].author.url string

Link to the profile.

posts[].text string | null

The post’s text. null for a post that is only media.

posts[].entities object[]

What the text mentions, in order: { type: "mention", text, username }, { type: "link", text, url } and { type: "tag", text, topic }.

posts[].createdAt string | null

When it was posted (ISO 8601, UTC).

posts[].likeCount number | null

Likes. An exact count.

posts[].replyCount number | null

Replies. An exact count.

posts[].repostCount number | null

Reposts. An exact count; the accounts that reposted are not available.

posts[].quoteCount number | null

Quotes. An exact count; the quotes themselves are not available.

posts[].shareCount number | null

Shares. An exact count.

posts[].mediaType string

text, image, video, carousel, audio or other.

posts[].media object[]

Images and videos, in order: { type (image or video), url (the image, or a video’s poster), videoUrl, width, height, altText }. The links expire after a few days; read the post again for fresh ones, or download through /media.

posts[].linkPreview object | null

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

posts[].topic object | null

The topic tag shown above the post: { name, id, url }. Pass id as topicId to topic-posts.

posts[].isReply boolean

Whether the post is a reply.

posts[].replyToUsername string | null

For a reply, the account it answers.

posts[].isPinned boolean

Whether the author pinned it to their profile.

posts[].quotedPost object | null

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

posts[].repostedPost object | null

On a repost, the original post, in the same shape, one level deep.

Request

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

Response

{
  "transport": "threads",
  "notes": [
    "Search returns one page of results: up to about 20 posts for top, fewer for recent."
  ],
  "query": "openai",
  "sort": "top",
  "postCount": 3,
  "posts": [
    {
      "id": "4019628605428007691",
      "code": "DfIlutziQML",
      "url": "https://www.threads.com/@darren_fm/post/DfIlutziQML",
      "author": {
        "id": "63060094583",
        "username": "darren_fm",
        "fullName": "Darren Worts™",
        "isVerified": false,
        "isPrivate": false,
        "profilePicUrl": "https://scontent-sea5-1.cdninstagram.com/v/t51.2885-19/462764088_3569869276637314_568486819098625667…",
        "url": "https://www.threads.com/@darren_fm"
      },
      "text": "Sam Altman (OpenAI) thinks people having RAM in their personal computers is a waste when it could just be serving Data Centers instead.\n\nWeird, I was just thinking that all those billions of dollar…",
      "entities": [],
      "createdAt": "2026-10-30T21:51:32.000Z",
      "likeCount": 16052,
      "replyCount": 129,
      "repostCount": 1346,
      "quoteCount": 57,
      "shareCount": 108,
      "mediaType": "text",
      "media": [],
      "linkPreview": null,
      "topic": null,
      "isReply": false,
      "replyToUsername": null,
      "isPinned": false,
      "quotedPost": null,
      "repostedPost": null
    }
  ]
}
Product overview Threads API: what it returns, pricing and use cases