Repository avatar
Search & Data Extraction
v0.1.33
active

threads-search-scraper

io.github.nexuscortex-dev/threads-search-scraper

Search public Threads posts by keyword, phrase or hashtag, no login. Lead filter, profiles (Apify)

Documentation

Threads Scraper Examples

Ready-to-run Python examples, n8n workflows and MCP setup for scraping Threads posts, replies and profiles — no Threads login, no Meta developer app, no App Review.

The examples use the Threads Search Scraper and Threads Replies Scraper actors on Apify, which read the same public pages Threads shows to logged-out visitors. They are pay-per-result ($1–2 per 1,000 rows, filtered and duplicate rows are free), and Apify's free plan includes $5 of usage every month, so every example here runs within the free tier.

What you can do

ExampleWhat it doesCost per run
search_posts_to_csv.pySearch posts by keyword, export to CSV with likes, replies and author~$0.20 (100 posts)
daily_brand_monitoring.pyBrand monitoring: every run returns only new mentions, appends to a CSV log~$0.02–0.10/day
find_client_leads.pyLead generation for freelancers: keep only posts where someone is asking for a service ("looking for a photographer")~$0.10 (50 leads)
extract_profile_contacts.pyFind accounts in a niche, with emails/phone numbers owners publish in their own public bio~$0.10 (50 profiles)
export_post_replies.pyExport the replies (comments) of any Threads post to CSV~$0.03 (30 replies)

Every script caps its own cost with maxItems: the number of saved results is the number you pay for, and nothing else is charged — not duplicates, not posts outside your date range, not rows removed by filters.

Quick start (2 minutes)

git clone https://github.com/nexuscortex-dev/threads-scraper-examples.git
cd threads-scraper-examples
pip install -r requirements.txt
export APIFY_TOKEN=your_token   # Apify Console > Settings > API & Integrations
python examples/search_posts_to_csv.py

You need a free Apify account (no credit card). Create the token under Settings > API & Integrations > Create a new token — Apify shows it only once.

Each script has an edit-me block at the top for keywords, limits and output files. A run typically takes 15–60 seconds and writes a CSV you can open in Excel or Google Sheets.

No code? Use the examples in Apify Console instead

Every use case also exists as a ready-filled task you run with clicks — same scrapers, same price, no Python:

Open one, click Try for free, adjust the keywords, Save & start. Apify's Schedules run them daily, and integrations deliver rows to Google Sheets, Slack, Make or Zapier without code.

n8n workflows (1-click import)

Ready-to-import JSON workflows live in n8n/. They use n8n's built-in HTTP Request node so they work on both n8n Cloud and self-hosted n8n without installing community packages (you can also swap it for the official @apify/n8n-nodes-apify node):

WorkflowWhat it doesFile
Daily AI Lead FinderReads queries from Google Sheets Config, fetches new buyer requests (onlyRequests: true, monitorName), scores intent 1–10 and drafts replies with OpenAI, upserts to Google Sheets, sends Slack hot-lead alerts & daily digestn8n/threads-daily-lead-finder.json
Daily Brand MonitorTracks new brand/competitor mentions every 24h without duplicates, appends to Google Sheetsn8n/threads-brand-monitor.json
Niche Accounts & Bio ContactsFinds up to 50–100 accounts for a niche with follower counts and public bio emails/phonesn8n/threads-niche-bio-contacts.json

Import in n8n via Workflows > Import from File, attach a Header Auth credential (Authorization: Bearer YOUR_APIFY_TOKEN), connect Google Sheets (plus OpenAI and Slack for the AI Lead Finder), and configure your keywords.

Use with AI agents (MCP)

Connect Claude, Cursor, VS Code or any MCP client directly to the Apify MCP server:

https://mcp.apify.com?tools=nexuscortex/threads-search-scraper

In Claude Code:

claude mcp add --transport http apify "https://mcp.apify.com?tools=nexuscortex/threads-search-scraper"

Example prompts:

  • "Find Threads posts from the last 3 days where someone is looking for a freelance video editor, excluding seller ads."
  • "Monitor mentions of Notion on Threads from the last 24 hours and group the main complaints."
  • "Rank the top 20 Threads accounts posting about specialty coffee this week with their follower counts."

Why not the official Threads API?

Meta's Threads API has a keyword search endpoint, but searching other people's posts requires a Meta developer app approved through App Review, and its fields don't include like or reply counts. These scrapers work today, without approval, and return engagement numbers, media, polls and quoted posts. If you only need your own account's data, the official API is free and worth a look.

What you get per row

Posts: text, link, date, author (username, display name, verified badge), likes, replies, reposts, quotes, shares, images, videos, links, language, poll options with votes, quoted and replied-to posts. Optional extras: author follower count and bio, view counts, contact details from public bios.

Replies: the same post fields plus depth, parentPostUrl and isLikedByAuthor — whether the post's author liked that reply.

Limits, honestly

  • Public data only. Nothing behind a login is ever accessed; private accounts are skipped.
  • Reply coverage is partial on busy posts. Threads shows logged-out visitors only about 40 direct replies per post (~20 top + ~20 newest). Daily monitoring covers the gap over time; the run tells you when a thread was cut short.
  • Very busy keywords are sampled hour by hour in Recent mode rather than collected in full.
  • Contact details are often absent — most people don't publish them. In one test 13 of 50 wedding-photographer profiles had a public phone number, 2 an email.
  • Image and video URLs expire after a few days — download the files you need.

Legal and fair use

The data is public, but it is still personal data. When you store or use it, follow Meta's terms and privacy laws such as GDPR and CCPA. Contact details extracted from public bios may be used only with a lawful basis and never for unsolicited bulk messages — replying to someone's Threads post is normally the appropriate first contact.

Tutorials

Step-by-step versions of these examples, with measured timings and output samples:

Links

Something not working, or a field missing? Open an issue here or on the actor's page.

License

MIT — the examples, that is. The actors themselves are paid services on Apify; this repository only shows how to call them.