Search Public Threads Posts by Keyword

View all Threads Public Data API endpoints →

Pass a required query string to find public Threads posts matching a keyword or phrase. The response includes status, request_id and data.results; to read individual posts, iterate data.results[], follow node.thread, then iterate thread_items[] and read each post. Observed post fields include string pk and id, code, user.username, caption.text when available, taken_at as Unix seconds and like_count. One result wrapper can contain more than one post, so flatten all thread_items before counting or exporting matches. Use returned text and author metadata to assess relevance rather than treating a match as a verified brand mention. Results can change between requests and do not represent every matching post. data.cursor may be returned, but this operation accepts only query: no cursor, page, date-range or sort input is supported. Deduplication, polling schedules, alerts and sentiment classification are application logic, not built-in API features.

API Features

Keyword-led conversation discovery Submit a text query such as coffee to retrieve matching public thread entries for relevance review.
Explicit search-result nesting Iterate data.results[], follow node.thread, then read post from every thread_items[] entry instead of counting the outer result wrappers as individual posts.
Search-hit text and attribution Use caption.text, user.username, code, taken_at and string post identifiers to build attributable keyword-match records.
Sampled mention collection Combine repeated query observations in your application, with deduplication and retrieval times; no exhaustive coverage or usable cursor pagination is promised.

Live API Demo

GET /api/project/threads-scraper/search-posts

Request cost is temporarily unavailable. No price is assumed.

View pricing

API Response (JSON)

{}
curl -X GET 'https://api.opendata-api.com/api/project/threads-scraper/search-posts?key=<API_KEY>&query=coffee'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

Frequently asked questions

Where is the text of a keyword-matched post?

Iterate data.results, then node.thread.thread_items, and read each item's post. Text was observed in post.caption.text, alongside post.user.username, code, pk, id and taken_at. A single result may contain multiple posts; optional text or metadata can be unavailable.

Can I send the returned cursor to fetch more search results?

No pagination input is defined for this operation. Although data.cursor was returned, only query is accepted. Do not add an undocumented cursor, page, date-range or sort parameter, or interpret one response as an exhaustive archive.

Does this endpoint provide real-time brand alerts or sentiment scores?

No. It returns query-matched public content. Your application controls polling, deduplication, relevance review, alerts and any sentiment analysis. A repeated search is sampled monitoring, not a guaranteed real-time feed.

How should I avoid counting the same keyword match twice?

Preserve the returned string identifiers, keep a consistent identifier field for this collection and record retrieval times. Deduplicate repeated observations before counting posts, and do not treat a thread wrapper as one post.

Related operations

Guides

View Subscription Plans →