Support needed? Reach out! 📧

How to Scrape Threads Keyword Search Posts

This tutorial shows how to use Threads Keyword Search Posts API to scrape and crawl structured Threads data in real-time.
Search Threads conversations by keyword through our API and extract matching posts, author handles, and engagement data to monitor emerging topics and brand mentions in real time.

Access Threads Data in 3 Steps

Start crawling Threads keyword posts data. Follow these steps to extract social media data in minutes.

1

Create Your Account

Go to our registration page and make an account. It's free, no credit card, and you get credits right away to play around with.

2

Verify Your Email Address

You'll get a verification email, click the link in it. Once that's done, you can grab your API token from the dashboard.

3

Make Your First API Call

Copy the code snippet below, swap in your API key, and run it. You'll get Threads data back as JSON within a few seconds.

Code Sample

Here's a JavaScript example to get you going. Swap out the token and you're good, works the same way in any language that can make HTTP requests. Start collecting keyword posts data via our REST API!

javascript-logo JavaScript
Threads Keyword Search
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/threads/keyword/search'
3 const params = {
4   "name""ferrari",
5   "sorting"0,
6   "token""YOUR-TOKEN-HERE"
7 }
8  
9 const queryString = new URLSearchParams(params).toString();
10 const url = `${root}${endpoint}?${queryString}`;
11  
12 await fetch(url)
13   .then(response => response.json())
14   .then(data => console.log(data))
15   .catch(error => console.error(error));
16  

Parameters

name (string) Keyword to search. REQUIRED
sorting The posts returned are TOP if sorting=0, or most RECENT if sorting=1
token (string) Private token assigned to each client to access the APIs. REQUIRED

Example Response

Explore the fields returned by this endpoint. Click a row to expand nested objects and arrays, hover a value to copy it, or use "Expand all" to see everything at once.

JSON
Threads Keyword Search
dataarray1 item · schema from #0 1 item
nodeobject2 fields
threadobject4 fields
thread_header_contextnullnull
thread_itemsarray1 item · schema from #0 1 item
postobject31 fields
pkstring"3455813358522634884"
userobject11 fields
friendship_statusnullnull
idstring"3662215"
eligible_for_text_app_activation_badgebooleanfalse
hide_text_app_activation_badge_on_text_appbooleanfalse
pkstring"3662215"
transparency_labelnullnull
transparency_productnullnull
transparency_product_enabledbooleanfalse
is_verifiedbooleantrue
usernamestring"amahnke"
profile_pic_urlstring"https://scontent-phx1-1.cdninstagram.com/v/t51.2885-19/385291048_10336…"
text_post_app_infoobject21 fields
is_post_unavailablebooleanfalse
pinned_post_infonullnull
share_infoobject9 fields
reposted_postnullnull
quoted_postnullnull
can_quote_postbooleanfalse
can_repostbooleanfalse
is_reposted_by_viewerbooleanfalse
repost_restricted_reasonstring"private"
quoted_attachment_author_attribution_allowedbooleantrue
quoted_attachment_post_unavailablebooleanfalse
quoted_attachment_postnullnull
reply_to_authornullnull
direct_reply_countnumber4
repost_countnumber5
hush_infonullnull
can_replybooleanfalse
reshare_countnullnull
__typenamestring"XDTTextPostAppMediaInfo"
delete_timestampnullnull
special_effects_enabled_strstring""
quote_countnumber1
text_fragmentsobject1 field
fragmentsarray1 item · schema from #0 1 item
fragment_typestring"plaintext"
link_fragmentnullnull
mention_fragmentnullnull
plaintextstring"Contrary to popular belief, “I’m entitled to my own opinion” is not a …"
tag_fragmentnullnull
reply_controlstring"everyone"
is_replybooleanfalse
link_preview_attachmentnullnull
linked_inline_medianullnull
private_reply_partnernullnull
fediverse_infonullnull
post_unavailable_reasonnullnull
idstring"3455813358522634884_3662215"
is_paid_partnershipnullnull
carousel_medianullnull
codestring"C_1g_CcypKE"
image_versions2object1 field
candidatesarray0 items
empty
original_heightnumber612
original_widthnumber612
video_versionsnullnull
captionobject3 fields
pkstring"18082417228506667"
has_translationnullnull
textstring"Contrary to popular belief, “I’m entitled to my own opinion” is not a …"
like_countnumber158
logging_info_tokennullnull
is_fb_onlynullnull
is_internal_onlynullnull
media_overlay_infonullnull
sharing_friction_infoobject2 fields
should_have_sharing_frictionbooleanfalse
sharing_friction_payloadnullnull
audionullnull
caption_is_editedbooleanfalse
transcription_datanullnull
accessibility_captionnullnull
has_audionullnull
media_typenumber19
has_likedbooleanfalse
caption_add_onnullnull
taken_atnumber1726185077
giphy_media_infonullnull
meta_placenullnull
organic_tracking_tokenstring"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLC…"
like_and_view_counts_disabledbooleanfalse
line_typestring"line"
should_show_ephemeral_post_timerbooleanfalse
thread_typestring"thread"
idstring"3455813358522634884"
__typenamestring"XDTSearchThread"
cursorstring""

Response Codes

Status codes this endpoint can return, so you can handle errors before they surprise you in production.

200SuccessSuccessful Response
422Client ErrorValidation Error
491Client ErrorToken not found
492Client ErrorEmail not verified
493Client ErrorSubscription expired
495Client ErrorAll daily units used
500Server ErrorSomething went wrong

API Pricing

#returned_posts units Cost per successful call to this endpoint.

Fetch Threads Data at Scale

Crawl Threads keyword search results at scale and feed them into your content monitoring or trend tracking workflows.

deco-icon

Matching Posts

Get Threads posts matching any keyword or phrase you search.

deco-icon

Author Handles

See which accounts are driving the conversation on a topic.

deco-icon

Engagement Data

Pull like and reply counts for each matching post returned.