Social Media Scraping 2 min read

How to Scrape Linktree (and Find Emails or Social Links)

Learn how to scrape Linktree pages to find emails and social links using Node.js. A step-by-step guide with real-world examples and bonus tips.

by
Image of mock linktree page on left and the json representation on the right

Why Scrape Linktree?

Linktree is a popular tool used by creators to display all their important links, emails, social media accounts, websites, and more. That makes it a goldmine for anyone looking to extract useful contact info like:

  • Emails
  • Social media links (Instagram, YouTube, TikTok, etc.)
  • Websites or personal blogs

Step-by-Step: How Linktree Works Under the Hood

Let’s walk through scraping a Linktree page using this example: https://linktr.ee/miguelangeles

  1. Open Dev Tools Right-click → Inspect → Go to the Network tab.
  2. Refresh the Page The very first request is for the HTML document.
  3. **Click on the first request **It should be miguelangeles
  4. Go to the response tab
  5. **Search for **__NEXT_DATA__ In the HTML response, search for __NEXT_DATA__. This is where Linktree stores a full JSON blob of the page’s data (thanks Next.js for making this super easy to scrape). This includes things like:
  • EMAIL_ADDRESS
  • Social links
  • URLs
  • Profile Data

Scrape Linktree with Node.js

Here’s how to do it in code using got-scraping and cheerio:

import { gotScraping } from 'got-scraping'
import * as cheerio from 'cheerio'

async function scrapeLinktree(username) {
  const url = `https://linktr.ee/${username}`
  const response = await gotScraping({
    url,
    proxyUrl: "PROXY_URL_HERE"
  })

  const $ = cheerio.load(body)
  const nextScript = $('#__NEXT_DATA__').html()

  const data = JSON.parse(nextScript)

  return data;
}

scrapeLinktree('miguelangeles').then(console.log)

Use a Proxy for Scale

If you’re scraping lots of Linktree pages, use a proxy to avoid rate limits or bans. Good options include:

Bonus: Scrape Linktree’s Public Directory

You can discover thousands of profiles using their discover API:

https://linktr.ee/discover/_next/data/zd5lRJ4hQhc2caWwdfD1Z/profile-directory/c/all/page-1.json?category=all&page=page-1

Just change the page number to increment. ⚠️ If Linktree updates their site, that zd5lRJ4hQhc2caWwdfD1Z hash will change. To get the latest:

  1. Visit https://linktr.ee/discover/profile-directory/c/all/page-1/
  2. Open Dev Tools → Network → Watch for requests when you paginate

Or Use our Prebuilt Linktree Scraper!

Don’t want to code this yourself?

Use my Linktree Scraper, quick, easy, and real-time.

Need more? Scrape Creators also supports:

  • Instagram
  • TikTok
  • YouTube
  • Truth Social
  • Ad libraries for Meta, LinkedIn, Google, and Reddit

Sign up for 100 free requests, no credit card required!

FAQ

Frequently asked
questions

Can't find what you're looking for? Email me.

Adrian Horning

Written by

Adrian Horning

Founder of ScrapeCreators. I write about social data APIs, scraper reliability, and turning public creator data into useful products.

Connect

ScrapeCreatorsScrapeCreators

Social Media Scraping API
for Developers

Real-time data from TikTok, Instagram, YouTube, X, Facebook, Reddit, and more.

Real-time Data

Fresh, accurate, always up-to-date.

No Proxies

We handle the infrastructure.

Developer First

Simple API. Powerful results.

TikTok logoInstagram logoYouTube logoX logoFacebook logoReddit logo
{200 OK
"platform": "youtube",
"type": "video",
"title": "Never Gonna Give You Up",
"views": 12504321,
"transcript": "We're no strangers to love...",
}
Success124ms
Purple gift box representing 100 free ScrapeCreators credits

Get 100 credits on us - instantly.

No credit card required. Start building for free.

Try the API, on us.

New developers get 100 free credits automatically when they sign up. No credit card required.

Get started free
Trusted by 10,000+ developers
99.9% uptime
Secure API access