Threads Search API. Public posts matching your search.
Public posts by keyword, best match or newest. We handle the proxies, blocks and platform changes.
Threads Search API at a glance
Returns the public Threads posts that match a keyword, by best match or newest first, as Threads shows them to a signed-out visitor. Each post has its link, text, publish time, language, topic tag, mentions, photos and videos, author, the post it quotes, its link card, and exact like, reply, repost, quote and share counts.
GET /v1/threads/search_posts
- 1 credit per page, $0.75–$1.97 per 1,000 pages
- 22 typed fields null when unknown
- 20 public posts per page, Threads' best matches (its search ranking)
queryis all it needs, e.g.coffee
Send one request. Get up to 20 public posts back.
Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.
$ npm install socialtapquery = coffeeconst params = new URLSearchParams({
query: "coffee",
sort: "newest",
});
const res = await fetch(`https://socialtap.dev/v1/threads/search_posts?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, page, meta } = body;
console.log(data, meta.credits_charged);import os
import requests
res = requests.get(
"https://socialtap.dev/v1/threads/search_posts",
params={"query": "coffee", "sort": "newest"},
headers={"x-api-key": os.environ["SOCIALTAP_API_KEY"]},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
data, page, meta = body["data"], body["page"], body["meta"]
print(data, meta["credits_charged"])require "json"
require "net/http"
uri = URI("https://socialtap.dev/v1/threads/search_posts")
uri.query = URI.encode_www_form('query' => 'coffee', 'sort' => 'newest')
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = ENV.fetch("SOCIALTAP_API_KEY")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
body = JSON.parse(res.body)
raise "#{body["error"]["code"]}: #{body["error"]["message"]}" unless res.is_a?(Net::HTTPSuccess)
pp body["data"]
puts body["meta"]["credits_charged"]<?php
$query = http_build_query([
'query' => 'coffee',
'sort' => 'newest',
]);
$ch = curl_init('https://socialtap.dev/v1/threads/search_posts?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['x-api-key: ' . getenv('SOCIALTAP_API_KEY')],
]);
$body = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
echo $body['meta']['credits_charged'], PHP_EOL;package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"
)
func main() {
q := url.Values{}
q.Set("query", "coffee")
q.Set("sort", "newest")
req, err := http.NewRequest("GET", "https://socialtap.dev/v1/threads/search_posts?"+q.Encode(), nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("x-api-key", os.Getenv("SOCIALTAP_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
var body struct {
Data json.RawMessage `json:"data"`
Page json.RawMessage `json:"page"`
Meta map[string]any `json:"meta"`
Error *struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"error"`
}
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
log.Fatal(err)
}
if body.Error != nil {
log.Fatalf("%s: %s", body.Error.Code, body.Error.Message)
}
fmt.Println(string(body.Data), body.Meta["credits_charged"])
}curl 'https://socialtap.dev/v1/threads/search_posts?query=coffee&sort=newest' \
-H "x-api-key: $SOCIALTAP_API_KEY"{
"data": [
{
"approximate_fields": [],
"author": {
"avatar_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-19/759477793_18059621363541028_3789541923716749008_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=111&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=24&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_gid…",
"display_name": "Mr. A",
"id": "46261141027",
"is_verified": false,
"url": "https://www.threads.com/@i.mr.a",
"username": "i.mr.a"
},
"coauthors": [],
"duration_ms": null,
"hashtags": [],
"id": "DdmPjz5kZrr",
"is_nsfw": null,
"is_pinned": false,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": null,
"expires_at": "2026-10-25T18:00:00Z",
"height": 2000,
"thumbnail_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/819629597_18073309220541028_6188555530352921490_n.webp?_nc_cat=104&ig_cache_key=Mzk5MTk0NjU1MTMxNjU1MjQyNw%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=23&_nc_ht=scontent-…",
"type": "image",
"url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/819629597_18073309220541028_6188555530352921490_n.webp?_nc_cat=104&ig_cache_key=Mzk5MTk0NjU1MTMxNjU1MjQyNw%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=23&_nc_ht=scontent-…",
"width": 1500
}
],
"mentions": [],
"metrics": {
"comment_count": 6,
"like_count": 52,
"quote_count": 0,
"repost_count": 0,
"save_count": null,
"share_count": null,
"view_count": null
},
"platform": "threads",
"platform_specific": {
"threads": {
"is_edited": false,
"is_reply": false,
"is_spoiler": false,
"link": null,
"numeric_id": "3991946551316552427",
"quoted_post": null,
"reply_control": "everyone",
"reply_to_author": null,
"topic_tag": null
}
},
"platform_type": "thread",
"published_at": "2026-09-22T17:12:14Z",
"text": "Coffee?! 🇶🇦",
"thumbnail_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/819629597_18073309220541028_6188555530352921490_n.webp?_nc_cat=104&ig_cache_key=Mzk5MTk0NjU1MTMxNjU1MjQyNw%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=23&_nc_ht=scontent-…",
"title": null,
"type": "image",
"unknown_fields": [],
"url": "https://www.threads.com/@i.mr.a/post/DdmPjz5kZrr"
},
{
"approximate_fields": [],
"author": {
"avatar_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-19/651753094_17890020600440175_7122009252380664590_n.jpg?stp=dst-jpg_s206x206_tt6&_nc_cat=102&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=24&_nc_ht=scontent-atl3-2.cdninstagram.com&_nc_gid…",
"display_name": "Jewel Cortez",
"id": "73411528174",
"is_verified": false,
"url": "https://www.threads.com/@_ja.crtz",
"username": "_ja.crtz"
},
"coauthors": [],
"duration_ms": null,
"hashtags": [],
"id": "DTfqY4mkhjk",
"is_nsfw": null,
"is_pinned": false,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": null,
"expires_at": "2026-10-25T18:00:00Z",
"height": 2160,
"thumbnail_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/613172382_17882560644440175_7420895248994580899_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=101&ig_cache_key=MzgwOTk1MDIzMjM0ODkwMjAwNg%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"type": "image",
"url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/613172382_17882560644440175_7420895248994580899_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=101&ig_cache_key=MzgwOTk1MDIzMjM0ODkwMjAwNg%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"width": 1215
},
{
"alt_text": null,
"duration_ms": null,
"expires_at": "2026-10-25T18:00:00Z",
"height": 1920,
"thumbnail_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/613275726_17882560653440175_5790363634609809674_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=111&ig_cache_key=MzgwOTk1MDIzMjAwNDk0ODU5MQ%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"type": "image",
"url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/613275726_17882560653440175_5790363634609809674_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=111&ig_cache_key=MzgwOTk1MDIzMjAwNDk0ODU5MQ%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"width": 1440
},
{
"alt_text": null,
"duration_ms": null,
"expires_at": "2026-10-25T18:00:00Z",
"height": 1920,
"thumbnail_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/615864589_17882560662440175_5736983707363680729_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=106&ig_cache_key=MzgwOTk1MDIzMTg3OTEyMDU1Mw%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"type": "image",
"url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/615864589_17882560662440175_5736983707363680729_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=106&ig_cache_key=MzgwOTk1MDIzMTg3OTEyMDU1Mw%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"width": 1440
}
],
"mentions": [],
"metrics": {
"comment_count": 3,
"like_count": 285,
"quote_count": 0,
"repost_count": 0,
"save_count": null,
"share_count": 4,
"view_count": null
},
"platform": "threads",
"platform_specific": {
"threads": {
"is_edited": false,
"is_reply": false,
"is_spoiler": false,
"link": null,
"numeric_id": "3809950237776287972",
"quoted_post": null,
"reply_control": "everyone",
"reply_to_author": null,
"topic_tag": null
}
},
"platform_type": "thread",
"published_at": "2026-01-14T14:38:02Z",
"text": "Coffeeee",
"thumbnail_url": "https://scontent-atl3-2.cdninstagram.com/v/t51.82787-15/613172382_17882560644440175_7420895248994580899_n.jpg?stp=cp6_dst-jpg_e35_tt6&_nc_cat=101&ig_cache_key=MzgwOTk1MDIzMjM0ODkwMjAwNg%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc…",
"title": null,
"type": "carousel",
"unknown_fields": [],
"url": "https://www.threads.com/@_ja.crtz/post/DTfqY4mkhjk"
},
{
"approximate_fields": [],
"author": {
"avatar_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-19/805923376_17945684919327569_1298320812472703449_n.jpg?stp=dst-jpg_s206x206_tt6&_nc_cat=103&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=24&_nc_ht=scontent-atl3-1.cdninstagram.com&_nc_gid…",
"display_name": "Primo",
"id": "69615071568",
"is_verified": false,
"url": "https://www.threads.com/@papiprimooo",
"username": "papiprimooo"
},
"coauthors": [],
"duration_ms": null,
"hashtags": [],
"id": "DTapuNaklWl",
"is_nsfw": null,
"is_pinned": false,
"is_sponsored": null,
"language": "en",
"media": [
{
"alt_text": null,
"duration_ms": null,
"expires_at": "2026-10-25T18:00:00Z",
"height": 1472,
"thumbnail_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/615432282_17906614950327569_7606212469784013454_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=110&ig_cache_key=MzgwODUzOTkzMDMwMjUwMjMwOQ%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=…",
"type": "image",
"url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/615432282_17906614950327569_7606212469784013454_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=110&ig_cache_key=MzgwODUzOTkzMDMwMjUwMjMwOQ%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=…",
"width": 828
}
],
"mentions": [],
"metrics": {
"comment_count": 2,
"like_count": 363,
"quote_count": 0,
"repost_count": 1,
"save_count": null,
"share_count": 1,
"view_count": null
},
"platform": "threads",
"platform_specific": {
"threads": {
"is_edited": false,
"is_reply": false,
"is_spoiler": false,
"link": null,
"numeric_id": "3808539930302502309",
"quoted_post": null,
"reply_control": "everyone",
"reply_to_author": null,
"topic_tag": null
}
},
"platform_type": "thread",
"published_at": "2026-01-12T15:56:01Z",
"text": "Coffee timeee",
"thumbnail_url": "https://scontent-atl3-1.cdninstagram.com/v/t51.82787-15/615432282_17906614950327569_7606212469784013454_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=110&ig_cache_key=MzgwODUzOTkzMDMwMjUwMjMwOQ%3D%3D.3-ccb7-5&ccb=SCRUBBED&_nc_sid=SCRUBBED&efg=SCRUBBED&_nc_ohc=SCRUBBED&_nc_oc=SCRUBBED&_nc_zt=…",
"title": null,
"type": "image",
"unknown_fields": [],
"url": "https://www.threads.com/@papiprimooo/post/DTapuNaklWl"
}
],
"page": {
"has_more": false,
"next_cursor": null,
"next_cursor_expires_at": null,
"end_reason": "platform_limit"
},
"meta": {
"request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
"platform": "threads",
"source": "api",
"is_cached": false,
"credits_charged": 1,
"latency_ms": 2066,
"fetched_at": "2026-10-25T12:00:00Z",
"input": null,
"credits_remaining": 9999,
"client_request_id": null,
"warnings": []
}
}import { SocialTap } from "socialtap";
const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY
const res = await client.threads.searchPosts.list({ query: "coffee", sort: "newest" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws Exception {
String query = "query=" + encode("coffee")
+ "&sort=" + encode("newest");
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://socialtap.dev/v1/threads/search_posts?" + query))
.header("x-api-key", System.getenv("SOCIALTAP_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
// An error is {"error": {"code", "message", ...}}; success is {data, meta}, meta.credits_charged its price.
if (response.statusCode() >= 400) throw new RuntimeException(response.body());
System.out.println(response.body());
}
static String encode(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8);
}
}using System.Text.Json;
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", Environment.GetEnvironmentVariable("SOCIALTAP_API_KEY"));
var query = string.Join("&",
"query=" + Uri.EscapeDataString("coffee"),
"sort=" + Uri.EscapeDataString("newest"));
var res = await http.GetAsync("https://socialtap.dev/v1/threads/search_posts?" + query);
using var body = JsonDocument.Parse(await res.Content.ReadAsStringAsync());
if (!res.IsSuccessStatusCode)
{
var error = body.RootElement.GetProperty("error");
throw new Exception($"{error.GetProperty("code")}: {error.GetProperty("message")}");
}
Console.WriteLine(body.RootElement.GetProperty("data"));
Console.WriteLine(body.RootElement.GetProperty("meta").GetProperty("credits_charged"));// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }, serde_json = "1"
use std::env;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let res = reqwest::blocking::Client::new()
.get("https://socialtap.dev/v1/threads/search_posts")
.query(&[("query", "coffee"), ("sort", "newest")])
.header("x-api-key", env::var("SOCIALTAP_API_KEY")?)
.send()?;
let ok = res.status().is_success();
let body: serde_json::Value = res.json()?;
if !ok {
return Err(format!("{}: {}", body["error"]["code"], body["error"]["message"]).into());
}
println!("{} {}", body["data"], body["meta"]["credits_charged"]);
Ok(())
}200 OK · GET https://socialtap.dev/v1/threads/search_postsLong arrays and strings are shortened here. Real responses are complete.Docs One schema on 21 platforms.
The response reference lists every field, its type and when it is null. See the full schema.
Null means unknown
A field Threads doesn't show is null, never zero or an empty string, so a real zero always means zero.
What it accepts
Keywords, matched by Threads' own search against post text, topic tags and authors.
Write one parser
Threads, TikTok, Instagram and 18 more platforms answer in these fields, so the code that reads one reads them all.
platformstring- Platform ID (tiktok, youtube, …).
idstring- Platform-native post ID (string; Instagram shortcode, Reddit with its t3_ prefix).
urlstring- Canonical post URL.
typestring- Normalized content shape. New values may be added; treat unknown values as other.
platform_typestring- The platform's own product label, lowercase (reel, short, story, live, tweet, …).
titlestring- Headline (YouTube title, Reddit title); null on caption-only platforms.
textstring- Caption, description or body as plain text.
languagestring- BCP-47 language of text, when the platform states it.
Live data from 33 platforms.
What teams build with the Threads Search API.
Monitor mentions of a brand, product or person
Find the most engaging posts on a topic
Collect posts for social listening and research
Good to know before you build.
- Threads serves one page of results to a signed-out visitor, so the list ends with end_reason platform_limit, or end when nothing matches.
- sort=newest is Threads' fresh results, newest first. Threads has no Recent tab or date filter signed out, so since and until filter that one page.
- view_count is null because Threads shows view counts only to a post's author.
- The post's topic tag is in hashtags and in platform_specific.threads.topic_tag.
- A matching reply comes back as a post, and platform_specific.threads.reply_to_author names the account it replies to.
1 credit per page. Failed requests are free.
Buy credits once and spend them on any endpoint, on any platform.
| Source | Price per successful page | Per 1,000 pages |
|---|---|---|
Platform API api | 1 credit | $0.75–$1.97 |
Public page page | 1 credit | $0.75–$1.97 |
- Cache hits are free.
- Credits from packs and top-ups never expire.
- A monthly plan's credits are spent first, and what is left of them ends at each renewal.
- Prices exclude tax: sales tax is added at checkout where it applies.
- Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.
Questions about the Threads Search API.
More in the API reference.
Can I search an exact phrase?
How much does the Threads Search API cost?
How do I get the next page?
Try it with your own search.
Type it in the playground, or copy the request into your code.
- No credit card
- Failed requests are free
- Works on all 218 endpoints