Threads Scraper or API: What You Get
A Threads scraper is a program that loads Threads search results, topic tags and account pages, pulls the posts out of what comes back, and repeats on a schedule. You maintain the fetching, the parsing and the fixes every time the pages change. The alternative is eight Threads endpoints that return keyword search, tag results, posts and account posts as JSON, at 1 credit per successful call. All eight are restricted, so this post compares the two for aggregate work on topics, markets and brand accounts.
What does building a Threads scraper involve?
Building a Threads scraper means writing code that loads a search, a tag or an account's posts, waits for the content to render, reads each post, and stores it without repeating yesterday's rows. Social platforms change their pages often, so the code that does this needs regular attention. There are four parts, and each one breaks for its own reasons.
Fetching
A page that builds its content with scripts usually needs a headless browser, or replayed copies of the requests the page makes. A browser per job is slow and uses memory; replayed requests are faster but depend on formats you don't control and can't see change. Any large platform has to tell people from automated traffic, so at volume expect login prompts, slow responses and blocks. When you hit them, stop: getting around a site's protections with proxies, fake accounts or CAPTCHA solvers is not a fix we'd recommend.
Parsing and de-duplication
The parser turns each post into a row: text, time, link, media and any counts you keep. When the page structure shifts, a parser tends to return blank fields rather than fail, which is worse. De-duplication keeps a key per post so a daily run stores only what's new, and it needs care when a run crashes halfway.
Monitoring and the rules
Check rows per search or tag per run and the share of empty fields, because the usual scraper failure is silent. Before you build anything, read Threads' terms and the law where you operate, and get legal advice for commercial use. Web Scraping with Python covers when a scraper is worth writing in the first place.
What do the Threads endpoints return?
The Threads API returns public Threads data as JSON, one call per lookup. It has 8 endpoints, all GET, all 1 credit per successful call. Two are for topics (search and tag), two for single posts (post and oembed), and four for accounts. Data is collected from publicly available sources and returned as found at the time of the call.
| Endpoint | Returns | Required | Optional |
|---|---|---|---|
/v1/threads/search |
Search results | query |
none |
/v1/threads/tag |
Results for a tag | name |
none |
/v1/threads/post |
One post | username, code |
none |
/v1/threads/oembed |
Embed data for a post | url |
none |
/v1/threads/user-posts |
An account's posts | username |
user_id |
/v1/threads/user-replies |
An account's replies | username |
user_id |
/v1/threads/profile |
An account's profile | username |
none |
/v1/threads/search-users |
Account search results | query |
none |
A keyword search is one request with your key in the X-API-Key header:
curl "https://api.perceptlayer.com/v1/threads/search?query=coffee" \
-H "X-API-Key: $API_KEY"
We don't have a recorded response for this API, so this post doesn't show one or name response fields. Run the call in the playground on the Threads API page to see the exact JSON before you write code that reads it.
Which parameters do the endpoints take?
query takes up to 120 characters on both search and search-users. name on tag takes up to 100 characters. username and code take up to 30 characters each, and url on oembed up to 500. user-posts and user-replies take an optional integer user_id next to the required username. None of the endpoints takes a paging parameter, and the reference doesn't document how many results a call returns, so check that in the playground.
Here is a tag lookup in Python, printing the credit headers every successful response carries:
import os
import requests
resp = requests.get(
"https://api.perceptlayer.com/v1/threads/tag",
params={"name": "coffee"},
headers={"X-API-Key": os.environ["API_KEY"]},
timeout=30,
)
print(resp.status_code)
print(resp.headers.get("X-Credits-Used"), resp.headers.get("X-Credits-Remaining"))
Which terms apply to the restricted endpoints?
All 8 Threads endpoints are restricted. They work once you accept the restricted-endpoint terms in the dashboard; the terms are at /legal/restricted-endpoints. Those terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out lead lists, outreach, and following what individual people post or reply.
What fits is aggregate work on topics, markets and brands. Count how often a product or category comes up under a tag each week. Archive what a brand's own account posts. Compare the volume of conversation around two launches. Keep profile, user-posts, user-replies and search-users to brand and organization accounts, not private individuals. If a response carries names or handles of people you don't need, drop them before you store anything. A call made before accepting the terms returns restricted_endpoint (403); the errors docs cover it with the other codes.
How do a scraper and the endpoints compare?
A scraper gives you control and no per-call bill, and costs you a browser, upkeep and block risk. The endpoints give you JSON from eight documented paths at 1 credit a call, and the restricted-endpoint terms decide what you may do with the data. The table compares them for a recurring job, such as tracking a set of topic tags and brand accounts every day.
| DIY Threads scraper | Threads endpoints | |
|---|---|---|
| Setup | Headless browser or request replay, parser, de-duplication, monitoring | API key in the X-API-Key header |
| What you get | Whatever you can parse from each page | JSON from 8 documented endpoints |
| Keyword and tag tracking | Load and parse search and tag pages | search with query, tag with name |
| Brand account posts | Load and parse each account page | user-posts with username |
| Embedding a post | Build it yourself | oembed with the post url |
| When pages change | Your parser breaks and you fix it | No parser of yours to fix |
| Blocks and errors | Yours to handle at volume | A failed call returns an error code and costs 0 |
| Speed | One browser or session per job | 1 request a second free, at least 5 a second paid |
| Terms | The platform's terms and local law | Restricted-endpoint terms; no personal data without a lawful basis |
| Cost | Hosting and engineering time | 1 credit per successful call |
What does tracking a tag cost per day?
On the endpoints, cost follows calls, not posts. One tag call per tag per day costs 1 credit, whatever the call returns. Tracking 30 topic tags once a day is 30 calls × 1 credit = 30 credits a day, or 30 × 30 = 900 credits a month.
The 100 free credits you get after verifying an email address, with no credit card, cover 3 full days of that plan. Add one user-posts call a day for 10 brand accounts in the category and you add 10 × 30 = 300 calls, for 1,200 credits a month. The Starter pack's 10,000 covers 8 months of that, at 9,600 credits; purchased credits last 12 months, with no subscription. Failed calls cost nothing and return X-Credits-Used: 0. See pricing for what credits cost and the credits docs for how each call is billed.
Which route should you choose?
Choose by what you'll do with the data and how often, because that decides whether upkeep or per-call cost dominates. The verdicts below assume aggregate work on topics, markets and brand accounts, the uses the restricted-endpoint terms allow. If your plan involves profiling, tracking or contacting individuals, neither route is the answer.
- Topic and market tracking: call
tagandsearchonce a day per term and count mentions in what you store. One credit per term per day. - Archiving a brand's own account, or competitor brands' public accounts: call
user-postswith the brand'susernameon a schedule and keep only what's new. - Seeing how a brand answers in public: call
user-repliesfor the brand's account, and drop the identities of the people it replied to before you store anything. - Quoting or embedding one post on your site: call
oembedwith the post'surl, orpostwithusernameandcode. - An AI agent answering questions about public conversation: connect the MCP server at
https://perceptlayer.com/mcp, wheresearch_endpointsandget_endpointcost nothing andcall_endpointspends credits only on success. The AI agents docs cover setup. - A one-off look at a few posts: open them in a browser and skip both routes.
For the same trade-off on other social sources, Twitter Scraper or X API and Instagram Scraper or API cover those, and the social media APIs list the rest. To check the fields first, run tag with a topic you follow in the playground on the Threads API page, then get a free API key when they fit.
APIs in this post
Frequently asked questions
Is scraping Threads legal?
It depends on where you operate, what you collect and how you use it, and Threads' own terms set out what the platform allows. Public posts about brands, products and topics are lower risk than data about individuals, which is personal data in many places. Read the terms, get legal advice for commercial use, and don't get around blocks, logins or challenges.
Can I collect data about individual Threads users?
No. All 8 Threads endpoints are restricted, and the restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. Use them for topics, markets and brand accounts in aggregate, and drop names and handles you don't need before you store results.
How many credits does a Threads call cost?
Each of the 8 Threads endpoints costs 1 credit per successful call. A failed call costs nothing and returns X-Credits-Used: 0. Every successful response carries X-Credits-Used and X-Credits-Remaining. Every account gets 100 free credits once, after verifying an email address, and prepaid packs start at 10,000 credits.
How fast can I run a daily tag sweep?
Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 30-tag daily sweep finishes in under a minute. Paying accounts run at least 5 a second. A 429 rate_limited reply carries a Retry-After header. The rate limits docs cover the headers.
Can I see a Threads response before writing code?
Yes. The Threads API page has a playground: pick an endpoint, fill in its parameters and run a real call with your key to see the JSON it returns. Do this before you write a parser, since this post doesn't include a recorded response and the fields are best read from a real call.