Search
Public Threads posts that contain a search term, with exact likes, replies and reposts, media and the author of each.
Try it in the dashboard 100 free credits when you sign up, no card.
GET/v1/threads/search
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
qrequired |
string | What to search for: a word or a phrase, up to 100 characters. |
limitoptional |
integer | How many posts to return. Default: 20. From 1 to 20. |
sortoptional |
string | top: the posts Threads ranks first for the term. recent: recent posts, newest first. One of: top, recent. Default: top. |
Example request
curl "https://pipefetch.com/v1/threads/search?q=coffee&limit=10" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/threads/search?q=coffee&limit=10', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/threads/search",
params={"q": "coffee", "limit": 10},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]Example response
A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.
{
"data": {
"query": "coffee",
"posts": [
{
"id": "0000000000",
"code": "0000000000",
"url": "https://example.com/item",
"text": "Good morning 🙏 cold and drinking my coffee",
"language": "en",
"publishedAt": "2026-11-19T12:14:15.000Z",
"likeCount": 0,
"replyCount": 0,
"repostCount": 0,
"quoteCount": 0,
"author": {
"id": "0000000000",
"username": "example_user",
"url": "https://example.com/profile",
"fullName": "Example Person",
"isVerified": false,
"profilePicUrl": "https://example.com/avatar.jpg"
},
"mediaType": "text",
"imageUrls": [],
"videoUrls": [],
"topic": null,
"hashtags": [],
"mentions": [],
"links": [],
"linkPreview": null,
"isReply": true,
"replyToUsername": "example_user",
"parentPost": {
"id": "4033799997484860274",
"url": "https://www.threads.com/@acoupleofwhiles/post/Df677nJDoNy",
"username": "acoupleofwhiles",
"text": "Good morning☀️Happy Thirsty Thursday! Fueled by coffee, powered by caffeine, and surviving the chaos one questionable decision at a time. ☕️☕️Almost F…"
},
"quotedPost": null,
"isAiLabeled": false,
"isPaidPartnership": false
},
{
"id": "0000000000",
"code": "0000000000",
"url": "https://example.com/item",
"text": "Coffee time ✌️✌️",
"language": "en",
"publishedAt": "2026-11-19T12:39:08.000Z",
"likeCount": 1,
"replyCount": 1,
"repostCount": 0,
"quoteCount": 0,
"author": {
"id": "0000000000",
"username": "example_user",
"url": "https://example.com/profile",
"fullName": "Example Person",
"isVerified": false,
"profilePicUrl": "https://example.com/avatar.jpg"
},
"mediaType": "text",
"imageUrls": [],
"videoUrls": [],
"topic": null,
"hashtags": [],
"mentions": [],
"links": [],
"linkPreview": null,
"isReply": true,
"replyToUsername": "example_user",
"parentPost": {
"id": "4033071962679503189",
"url": "https://www.threads.com/@yasutacanta/post/Df4WZT5GWlV",
"username": "yasutacanta",
"text": "Hello from Tokyo 🇯🇵👋\nCoffee time 🎶☕️"
},
"quotedPost": null,
"isAiLabeled": false,
"isPaidPartnership": false
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}Good to know
- One request returns up to 20 posts, and there are no further pages.
- Threads matches terms of several words loosely, so only posts that contain the term are returned: every word of it has to be in the text, the topic, a link title or the author's name.
- sort=recent starts with the last 24 hours and goes further back only when they do not hold enough posts. The posts come newest first.
- Replies are included: isReply marks them, and parentPost holds the post they answer. Authors come without follower counts; the profile endpoint has those.
- A search that finds no posts answers 404 no_results and costs nothing.
Errors
Every error has the same shape, and none of them is charged. The full list is in the error reference.
Looking for an overview and use cases? See the Threads Search API page.