[Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/Threads

Profiles · posts · replies

# // Threads Scraper API

Get Threads profiles, their latest posts, posts and replies as clean JSON. Threads serves public profiles and posts without a login, with the data inside the page HTML, so you send a URL and read the data, no account needed.

- **Clone it and run it.** An open-source Threads scraper for profiles with their latest posts and for posts with their replies, tested against live Threads every night.
- **Likes, replies and media in one request.** Read the post data Threads embeds in each post page: text, publish time, like and reply counts, images, videos and author, plus the first screen of replies.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/threads-scraper) [Read Unblocker docs](https://scrapfly.io/docs/scrape-api/unblocker) 

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 Threads pages · illustration

 

 

 Post JSON**Output**

```
{
  <span class="c-str">"published_on"</span>: <span class="c-num">1718024404</span>,
  <span class="c-str">"code"</span>: <span class="c-str">"C8CTu0iswgv"</span>,
  <span class="c-str">"username"</span>: <span class="c-str">"natgeo"</span>,
  <span class="c-str">"user_verified"</span>: true,
  <span class="c-str">"user_pk"</span>: <span class="c-str">"63269174602"</span>,
  <span class="c-str">"reply_count"</span>: <span class="c-num">33</span>,
  <span class="c-str">"like_count"</span>: <span class="c-num">1680</span>
}
```

The scraper's sample output[See the request ↓](#implementation)

  

What you can scrape from Threads

Four kinds of Threads data you can scrape with Scrapfly, no Threads or Instagram account required.

 

## // Scrape Threads profiles

A profile page gives the username, display name, bio, bio links, follower count, verified badge, private-account flag and profile picture.

- username
- full\_name
- bio
- bio\_links
- followers
- is\_verified
- is\_private

  

## // Scrape a profile's latest posts

The same profile request returns the latest posts the page shows, each with its full post data. The open-source scraper's sample run on @natgeo returned the profile and 4 posts.

- threads
- text
- published\_on
- like\_count
- reply\_count
- url

  

## // Scrape Threads posts

Each post comes with its text, publish time, like and reply counts, image and video URLs, and the author's username, picture and verified badge. A post's URL carries its short code, such as `/@natgeo/post/C8CTu0iswgv`.

- text
- published\_on
- like\_count
- reply\_count
- images
- videos
- user\_verified

  

## // Scrape Threads replies

A post page carries the first screen of replies, each with the same fields as a post, and a cursor to the next screen. The open-source scraper follows that cursor through Threads' GraphQL endpoint, for up to three screens of replies in all.

- replies
- username
- text
- like\_count
- published\_on
- end\_cursor

  



Reliability

## // Read public Threads pages without an account

Threads serves public profiles and posts without a login and puts their data in the HTML, as JSON inside `script type="application/json"` tags. The open-source scraper reads it there, and three things keep its requests working.

`unblocker=true`

Every request of the scraper turns on Scrapfly's [Unblocker](https://scrapfly.io/products/unblocker) (formerly ASP), with `country=US`. A page that is not blocked costs nothing extra.



`/login/`

Threads sends some visitors to its login page instead of the profile or post. Read the final URL of each response and retry when it is the login page.



`end_cursor`

A post page holds its first replies. Send `direct_replies.page_info.end_cursor` to Threads' GraphQL endpoint, in the same Scrapfly `session`, for the next screen.



 



Choose your tools

## // Scrapfly products for Threads scraping

Start with the Web Scraping API and Unblocker. Add a social media post extraction model, screenshots, a browser session or a URL-list crawl as your workflow needs them. One API key covers all five products.

 

### Web Scraping API for Threads

Fetch Threads profile and post URLs with Unblocker on. The data is in the HTML Threads sends, so there is no browser rendering to pay for.

Parse the JSON in the page for the fields you need, or point the open-source scraper at your own profile and post URLs.

```
GET /scrape?url=https://www.threads.net/t/C8CTu0iswgv&unblocker=true&country=US
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for Threads posts

Add `extraction_model=social_media_post` to get a post page back as a standard social media post record, with no parser to write.

The record holds the post's text, author, media, link, publish time, engagement counts and comments, in one schema for every social platform you scrape.

```
GET /scrape?url=https://www.threads.net/t/C8CTu0iswgv&unblocker=true&country=US&extraction_model=social_media_post
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for Threads posts

A full-page capture of a public Threads post or profile.

Keep a dated visual record of how a post looked alongside your JSON.

```
GET /screenshot?url=https://www.threads.net/t/C8CTu0iswgv&country=us&capture=fullpage&format=png
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for Threads sessions

Connect Playwright or Puppeteer to a hosted Chromium and open a public profile or post as a visitor would.

The browser runs on Scrapfly's proxies, so your script never reaches Threads from your own IP.

```
chromium.connect_over_cdp("wss://browser.scrapfly.io?api_key=KEY&country=us")
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Crawler API for lists of Threads URLs

Submit profile and post URLs as one bounded job, with [Unblocker](https://scrapfly.io/products/unblocker) applied to every URL.

Ask for HTML output and parse each page's embedded JSON after the job finishes.

- url\_list
- unblocker
- country
- content\_formats

 [Explore Crawler API →](https://scrapfly.io/products/crawler-api)  



One request

## // Fetch a Threads post and read its counts

The JSON at the top is cut from the open-source scraper's sample output for a National Geographic post, `results/thread.json`, which also holds 28 of its replies. This code sends the scraper's request and reads the same fields from the post data Threads embeds in the page. The counts it prints are the post's when you run it.

Install `scrapfly-sdk` and `parsel`, which `result.selector` uses, and replace the key below.

**Prefer the full scraper?** The open-source [Threads scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/threads-scraper) collects a profile with its latest posts, and a post with up to three screens of replies, in Python 3.12. It runs against live Threads every night. Clone it, set `SCRAPFLY_KEY`, and run `poetry run python run.py`.

 

  Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
code = <span class="c-str">"C8CTu0iswgv"</span>
result = client.scrape(ScrapeConfig(
    <span class="c-str">f"https://www.threads.net/t/{code}"</span>,
    unblocker=<span class="c-key">True</span>,  <span class="c-com"># previously asp</span>
    country=<span class="c-str">"US"</span>,
))
<span class="c-key">if</span> <span class="c-str">"/login"</span> <span class="c-key">in</span> result.context[<span class="c-str">"url"</span>]:
    <span class="c-key">raise</span> RuntimeError(<span class="c-str">"Threads sent its login page: retry"</span>)

<span class="c-key">def</span> find(node, key):
    <span class="c-str">"""Yield every value stored under key, at any depth."""</span>
    <span class="c-key">if</span> isinstance(node, dict):
        <span class="c-key">for</span> k, v <span class="c-key">in</span> node.items():
            <span class="c-key">if</span> k == key:
                <span class="c-key">yield</span> v
            <span class="c-key">yield</span> <span class="c-key">from</span> find(v, key)
    <span class="c-key">elif</span> isinstance(node, list):
        <span class="c-key">for</span> v <span class="c-key">in</span> node:
            <span class="c-key">yield</span> <span class="c-key">from</span> find(v, key)

scripts = result.selector.css(
    <span class="c-str">'script[type="application/json"][data-sjs]::text'</span>).getall()
post = next(m <span class="c-key">for</span> s <span class="c-key">in</span> scripts <span class="c-key">if</span> code <span class="c-key">in</span> s
            <span class="c-key">for</span> m <span class="c-key">in</span> find(json.loads(s), <span class="c-str">"media"</span>)
            <span class="c-key">if</span> isinstance(m, dict) <span class="c-key">and</span> m.get(<span class="c-str">"code"</span>) == code)
print(json.dumps({
    <span class="c-str">"published_on"</span>: post[<span class="c-str">"taken_at"</span>],
    <span class="c-str">"code"</span>: post[<span class="c-str">"code"</span>],
    <span class="c-str">"username"</span>: post[<span class="c-str">"user"</span>][<span class="c-str">"username"</span>],
    <span class="c-str">"user_verified"</span>: post[<span class="c-str">"user"</span>][<span class="c-str">"is_verified"</span>],
    <span class="c-str">"user_pk"</span>: str(post[<span class="c-str">"user"</span>][<span class="c-str">"pk"</span>]),
    <span class="c-str">"reply_count"</span>: post[<span class="c-str">"text_post_app_info"</span>][<span class="c-str">"direct_reply_count"</span>],
    <span class="c-str">"like_count"</span>: post[<span class="c-str">"like_count"</span>],
}, indent=<span class="c-num">2</span>))
```

 

 



What the data is used for

## // Common Threads scraping use cases

### Creator research

Compare follower counts, verified status and engagement across accounts.



### Engagement benchmarks

Measure likes and replies on the posts of competing accounts.



### Reply analysis

Collect the replies under a post to read how an audience reacted to it.



### Account monitoring

Track the latest posts and follower counts of the accounts that matter to you.



### Content research

See which posts get traction for an account, by likes and replies.



### Partner vetting

Check an account's followers, verified badge and bio links before you work with it.



 



Common questions

## // Threads scraping FAQ

 Is scraping Threads legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public pages, avoid signed-in content, treat usernames, profile details and post text as personal data, review the Threads terms of use, and get legal advice for commercial use.

 Does Threads have an API?

Yes. Meta's Threads API lets an app create and publish posts, retrieve media and profiles, moderate replies and access insights. It needs a Meta app set up with the Threads use case and a Threads user access token, and each user grants the app its permissions before it can read their data. These requests read public Threads pages signed out, so you need a Scrapfly API key, not a Meta app or access token.

 Do I need a Threads or Instagram account?

No. The open-source scraper reads public Threads data that needs no login: profiles with their latest posts, and posts with their replies. You only need a Scrapfly API key.

 Why do I get the Threads login page instead of a profile?

Threads sends some visitors to its login page, now at `/login/`, instead of the profile or post they asked for. Read the final URL of each response in `result.context["url"]` and retry the request when it is the login page. The open-source scraper makes up to three attempts.

 How many replies can I get from a Threads post?

A post page carries the first screen of replies and a cursor to the next one, `direct_replies.page_info.end_cursor`. The open-source scraper sends that cursor to Threads' GraphQL endpoint with the query the page itself uses, asking for 10 replies a call, for up to three screens of replies in all. Its sample run collected 28 replies to one National Geographic post.

 Can I scrape the posts of a Threads profile?

Yes. A profile page carries the profile and the latest posts it shows, each with the same fields as a post page: text, publish time, like and reply counts, media and author. The open-source scraper's sample run on @natgeo returned the profile and 4 posts.

 How much does scraping Threads cost?

A Threads profile or post page costs 1 credit. The open-source scraper sends its requests with Unblocker on the default datacenter proxies and renders no JavaScript, and Unblocker adds nothing to a page that is not blocked. When a page needs residential proxies, Unblocker can switch the request to them, at 25 credits, and the scrape log shows the pool and the cost. The social media post extraction model adds 5 credits for a page up to 500 KB. The Free plan includes 1,000 credits a month.

 What are the rate limits when scraping Threads?

Scrapfly sets no Threads-specific limit. Your maximum parallelism is the concurrency quota on your plan, or a lower cap configured for the project. Each in-flight request uses one slot until it finishes.

 



Start with one request

## Fetch the URL. Read the JSON.

Web Scraping API with Unblocker on, one call per Threads URL.

Proxies across 75+ countries

 [Threads scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/threads-scraper) [How to scrape Threads](https://scrapfly.io/blog/posts/how-to-scrape-threads) [All scraper pages](https://scrapfly.io/scrapers) 

 

 [Get free API key](https://scrapfly.io/register) [Read the docs](https://scrapfly.io/docs/scrape-api/unblocker)