Threads
Threads Post Comments API
Read the replies under a Threads post as JSON - reply text, author, like / reply / repost counts, publish time and any attached media - with cursor pagination. Costs 2 credits per page, flat: this endpoint is keyed by post_id only, so the Threads username surcharge never applies. Note that row one of the array is the parent post itself, not a reply.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonpost_idstringrequiredNumeric Threads post id, non-empty. This endpoint takes the id only - there is no url form and no username form here, unlike the Threads Post endpoint. Get an id from Threads Post, User Posts or User Replies, where it comes back as post_id.
Example: 3959219802799869824
cursorstringOpaque pagination cursor. Omit it for the first page, then pass back the next_cursor value from the previous response. Stop when next_cursor is null - see the note on has_more below.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
POST_ID = "3959219802799869824"
cursor = None
while True:
page = client.threads.post_comments(POST_ID, cursor=cursor)
for c in page["data"]["comments"]:
if c["post_id"] == POST_ID:
continue # row one is the parent post
print(c["user"]["username"], c["text"], c["like_count"])
cursor = page["data"]["next_cursor"]
if not cursor: # null means no further page exists
breakResponse