DEV Community

Jay
Jay

Posted on Edited on AI-assisted

How to Scrape Threads Posts by Keyword (No Login, Export to CSV or Python)

Threads has a search box, but nothing to export what it finds. If you want every post that mentions your brand, a competitor or a topic in a spreadsheet, or a daily list of new mentions, you have to copy them by hand.

This tutorial shows how to scrape Threads posts by keyword with a ready-made scraper on Apify, first with clicks only, then from Python. In the test run below, 100 posts took 29 seconds.

Disclosure: I built the scraper used here (Threads Search Scraper). It costs $2 per 1,000 posts, and Apify's free plan includes $5 of usage a month, so you can follow along without paying.

Why not the official Threads API?

Meta's Threads API does have a keyword search endpoint (/keyword_search). To search other people's posts with it you need a Meta developer app with the Threads use case, a Threads account that authorizes the app, and the threads_keyword_search permission approved through App Review. Until it is approved, the search only covers your own posts.

Once approved it's a solid option: up to 2,200 queries per 24 hours, up to 100 posts per request, and date filters back to July 2023. Its documented fields are the post's text, media type, link, timestamp and username, without like or reply counts. If you don't want to go through App Review, or you need engagement numbers, a scraper gets you there today.

What you get

For every post that matches your keyword:

  • text, link, date, and author (username, display name, verified badge)
  • likes, replies, reposts, quotes and shares
  • images, videos and links in the post
  • language, the post it replies to (for replies) and the post it quotes (for quote posts)
  • poll options with vote counts, when the post is a poll
  • optionally, the author's follower count and bio, the post's view count, and contact details the author published in their public bio

It works without logging in to Threads: it reads the same public search the Threads website shows to logged-out visitors, so it never touches your account and only sees public posts.

Option 1: scrape Threads without code (3 minutes)

1. Open the brand-monitoring example. Go to Monitor Brand Mentions on Threads and click Try for free. Sign up for Apify if you haven't (free, no credit card). Apify copies the example into your account as a task, so you get a ready-filled form.

The brand-monitoring example task on Apify

2. Enter your keywords. Under Search keywords the example comes filled with notion. Replace it with your own keyword and click Add for more (or Bulk edit to paste a list, one per line): a brand (shopify), a product, a hashtag (#booktok) or a short phrase. Each keyword is searched separately. Keep these settings:

  • Posted after: 24 hours (only posts from the last day; also accepts a date like 2026-11-01)
  • Maximum results: a cap on the run, which is also a cap on what you pay
  • Monitoring name: change notion-mentions to a name for your own watch, such as acme-mentions

3. Click Save & start. When the run finishes, the Output tab shows a table of posts. Click Export to download CSV, Excel or JSON.

Run output table with Threads posts

The run in the screenshot searched duolingo and shopify for the last 24 hours and returned posts in English, Japanese, Chinese and many other languages.

4. Make it daily. The task from step 1 is already saved in your account. Go to Schedules in Apify Console and click Create schedule. Set the time under Schedule setup (for example every day at 9:00), add your task under Actors and tasks > Add new, and check that the schedule is Enabled. Because the task has a monitoring name, each run returns only posts that earlier runs with the same name have not delivered; skipped posts are not charged. To get the results somewhere else automatically, connect the task to Make, Zapier, n8n or Google Drive from its Integrations tab.

Option 2: scrape Threads with Python

Install the client and pandas, and create an API token in Apify Console > Settings > API & Integrations (Create a new token; Apify shows it only once, so copy it right away):

pip install apify-client pandas
export APIFY_TOKEN=your_token
Enter fullscreen mode Exit fullscreen mode

This script searches two brands for the last 24 hours. The languages filter keeps only posts Threads tagged as English before they are saved, so filtered posts are not charged:

import os
import pandas as pd
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("nexuscortex/threads-search-scraper").call(run_input={
    "searchQueries": ["duolingo", "shopify"],
    "sort": "recent",
    "dateFrom": "24 hours",
    "languages": ["en"],
    "maxPostsPerQuery": 50,
    "maxItems": 100,
})
posts = pd.DataFrame(client.dataset(run.default_dataset_id).list_items().items)

if posts.empty:
    print("No English posts found in the last 24 hours")
else:
    top = posts.sort_values(["replyCount", "likeCount"], ascending=False)
    top[["searchQuery", "createdAt", "username", "likeCount", "replyCount", "text", "url"]].to_csv("mentions.csv", index=False)
    print(f"{len(posts)} English posts saved to mentions.csv")
Enter fullscreen mode Exit fullscreen mode

In my test on 25 November 2026, this input returned 100 posts (50 per brand), all tagged as English, in 29 seconds. Sorting by replies put real conversations near the top: a post about learning Korean on Duolingo (8 replies) and a creator looking for a Shopify collaborator (5 replies). Threads leaves the language empty on some posts, and those are filtered out; remove languages if you need every language.
The script above is one of five runnable examples in the threads-scraper-examples repo on GitHub — keyword search, daily monitoring, lead finding, profile contacts and reply export, each verified against the live scraper.

Tips for better results

Know how phrases are matched. Keywords of several words are searched as exact phrases, so artificial intelligence does not match every post that merely contains "artificial" or "intelligence". A long sentence naturally finds fewer posts than one or two common words. If an exact phrase finds nothing, the scraper retries its words one by one and keeps only posts that contain most of them; those rows are marked matchedVia: "broadened" and broadenedSearch shows which word found them. Set broadenEmptyQueries to false if you only want exact phrase matches.

Filter in the input, not afterwards. Use languages for language, includeKeywords to require one of several words or tags, excludeKeywords to drop words such as giveaway or #ad, minLikes for engagement, onlyWithLinks for posts linking out, and onlyRequests for people asking for a service. These filters run before saving, so filtered posts are not charged. Use pandas for analysis, not for throwing away rows you already paid for.

Use strict matching for very short phrases. Threads' exact match can be loose for phrases made of very short words. strictKeywordMatch additionally checks each post's text and topic tag literally before saving it.

Search older periods. Set both Posted after and Posted before (2025-11-25 to 2025-11-30) to collect posts from a past campaign or event. The scraper pages back through time, so it isn't limited to the 10 to 20 posts Threads shows logged-out visitors.

Top instead of Recent. "sort": "top" with "topPeriod": "day" returns the most relevant posts of each day, which is a quick way to see what got attention about a topic this week.

Profiles and contact details. "searchProfiles": true adds the accounts that match each keyword, up to 100 per keyword (maxProfilesPerQuery, default 20), with follower count and bio, which is useful for finding creators in a niche. In a 25 November test, coffee returned 97 accounts. With "extractContacts": true, profile rows also include emails and phone numbers the account owner published in their public bio. Those details are personal data: use them only with a lawful basis and never for unsolicited bulk messages. To scrape a specific account's posts instead of a keyword, use Threads Scraper.

What it costs

You pay per post or profile saved: $2 per 1,000 on Apify's free plan, less on paid plans. The price includes the compute the run uses, so there is no separate usage charge. Duplicates, posts outside your date range and posts removed by your filters are not charged, and maxItems caps every run. Apify's free plan includes $5 of usage each month, which covers about 2,500 results. A daily brand check that finds 50 new posts costs about $3 a month.

Limits

  • Public posts only; private accounts are never accessed.
  • Very busy keywords (hundreds of posts an hour) are sampled hour by hour in Recent mode, not collected in full.
  • includeViewCounts costs one extra request per post. In a 20-post sample on 23 November 2026, Threads generally showed counts only once posts were about two hours old.
  • Image and video links expire after a few days, so download the files you need.
  • The data is public, but it is still personal data: follow Meta's terms and privacy laws such as GDPR when you store or use it.

If something breaks or you need a field that isn't there, open an issue on the Actor page and I'll take a look.

Updated 25 November 2026: covers exact-phrase search and broadening, built-in filters, monitoring without duplicates, view counts, public bio contact extraction, up to 100 profiles per keyword, polls and quoted posts.

Top comments (0)