# Linktree Profile Scraper (`devilscrapes/linktree-profile-scraper`) Actor

Scrape any public Linktree profile into a structured, link-level dataset — every link's title, URL, type, position, group, and gate status (age/passcode/password/NFT), with profile identity fields denormalized onto every row. Built for link-in-bio research, creator tooling, and affiliate audits.

- **URL**: https://apify.com/devilscrapes/linktree-profile-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Linktree Profile Scraper

**💰 $4.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*The devil's in the data — and every link on it.* 😈

Scrape any public Linktree profile (`linktr.ee/<username>`) into a structured, link-level dataset — every link's title, destination URL, type, position, group membership, and gate status, with profile identity fields denormalized onto every row.

</div>

***

### 🎯 What this scrapes

Linktree profile pages ship their real data as a `__NEXT_DATA__` JSON payload embedded in the page. This Actor reads that payload directly: give it one or more usernames or profile URLs and it returns one row per link — not one row per profile — so you get an analyzable, filterable table instead of a hand-scraped page dump.

### 🔥 Features

- 🔗 **Link-level rows, not profile-level** — filter by link type, gated status, or group membership directly in your dataset.
- 🧩 **Group linkage resolved** — child links carry `group_id` / `group_title` so you can reconstruct group membership with a simple join.
- 🔒 **Gate status surfaced** — age / passcode / password / NFT-gated links are flagged (`gated`, `gate_type`) without attempting to bypass them.
- 🏷️ **Every link type covered** — `CLASSIC`, `GROUP`, `YOUTUBE_VIDEO`, `COMMERCE_PRODUCT`, and unrecognized future types are all emitted, never dropped.
- 🛡️ **We rotate browser fingerprints** so the target sees a real browser, not a script.
- 🧊 **Clean, typed rows** — Pydantic-validated, ISO-8601 timestamps. Export JSON / CSV / Excel straight from the Apify Console.

### 💡 Use cases

- **Link-in-bio market research** — analyze what creators and brands actually link to, and how they organize it.
- **Creator tooling & influencer platforms** — pull structured profile + link data instead of screen-scraping by hand.
- **Affiliate-link auditing** — surface every outbound destination a profile publishes, at scale.
- **Brand-safety & monetization analysis** — spot commerce links, affiliate patterns, and gated content across many profiles.

### ⚙️ How to use it

1. Click **Try for free** at the top of the Store listing.
2. Add one or more **Usernames or profile URLs** — a bare username (`selenagomez`) or a full URL (`https://linktr.ee/selenagomez`) both work.
3. Click **Start**. Rows stream into the dataset as each profile is fetched.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or pull via the Apify API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `usernames` | `array` | ✅ | — | Linktree usernames or full profile URLs. Case preserved for bare usernames. |
| `includeZeroLinkProfiles` | `boolean` | no | `false` | Reserved for a future version — v1 always skips zero-link profiles. |
| `proxyConfiguration` | `object` | no | `BUYPROXIES94952` / US | Apify Proxy configuration. |

#### Example input

```json
{
  "usernames": ["selenagomez"],
  "includeZeroLinkProfiles": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["BUYPROXIES94952"],
    "apifyProxyCountry": "US"
  }
}
```

### 📤 Output

One row per link.

| Field | Type | Notes |
|---|---|---|
| `username` | `string` | Input-normalized username. |
| `profile_title` | `string \| null` | Profile display title. |
| `profile_description` | `string \| null` | Profile bio/description. |
| `profile_avatar_url` | `string \| null` | Profile avatar image URL. |
| `profile_is_verified` | `boolean` | Whether the profile is verified. |
| `profile_tier` | `string \| null` | Linktree account tier, e.g. `pro`. |
| `profile_has_password` | `boolean` | Whether the whole page is password-gated. |
| `link_id` | `string` | Stable link id. |
| `link_title` | `string` | Link title. |
| `link_url` | `string` | Destination URL (empty for `GROUP` rows). |
| `link_type` | `string` | `CLASSIC`, `GROUP`, `YOUTUBE_VIDEO`, `COMMERCE_PRODUCT`, or another open-ended value. |
| `position` | `integer` | Position within the profile. |
| `group_id` | `string \| null` | Parent `GROUP` link's id, when this link is a child. |
| `group_title` | `string \| null` | Parent `GROUP` link's title. |
| `thumbnail_url` | `string \| null` | Link thumbnail image. |
| `gated` | `boolean` | Whether any gate (age/passcode/password/NFT) is active. |
| `gate_type` | `string \| null` | Which gate is active, when `gated` is true. |
| `meta_title` | `string \| null` | Link-level metadata title. |
| `meta_description` | `string \| null` | Link-level metadata description. |
| `scraped_at` | `string` | ISO-8601 timestamp. |

#### Example output

```json
{
  "username": "selenagomez",
  "profile_title": "Selena Gomez",
  "profile_description": "Rare Beauty | Wondermind | Music",
  "profile_avatar_url": "https://example.linktr.ee/avatar.jpg",
  "profile_is_verified": true,
  "profile_tier": "pro",
  "profile_has_password": false,
  "link_id": "123456789",
  "link_title": "Rare Beauty",
  "link_url": "https://rarebeauty.com",
  "link_type": "CLASSIC",
  "position": 0,
  "group_id": null,
  "group_title": null,
  "thumbnail_url": "https://example.linktr.ee/thumb.jpg",
  "gated": false,
  "gate_type": null,
  "meta_title": null,
  "meta_description": null,
  "scraped_at": "2026-09-24T18:00:00Z"
}
```

### 💰 Pricing

Pay-per-event — you pay only for what lands in your dataset.

| Event | Price |
|---|---|
| Actor start | $0.20 (once per run) |
| Result emitted | $0.004 per link row |

At 1,000 link rows in a run, that's **$4.20 / 1,000** ($0.20 start + $4.00 for the rows) — pricing amortizes toward $4.00/1,000 on larger runs.

### 🚧 Limitations

- Public profiles only — no login-required data, analytics, or edit-mode fields.
- Gated links (age/passcode/password/NFT) are flagged, not bypassed — this Actor never attempts to fetch what's behind a gate.
- Group membership is flat (`group_id` / `group_title` join), not a nested tree — reconstruct groups with a simple join if you need hierarchy.
- Zero-link profiles emit no rows for that profile (logged, not a failure) — the run only fails if every requested profile yields zero rows.

### ❓ FAQ

**Does this need a Linktree account or API key?**
No — it reads the same public JSON payload the profile page itself serves.

**Can I pass a full profile URL instead of a bare username?**
Yes — either works. A full `https://linktr.ee/<username>` URL has its username extracted automatically.

**What happens if a profile doesn't exist or has no links?**
The run continues and reports zero rows for that profile — never a silent failure and never a crash, unless every requested profile comes back empty.

### 💬 Your feedback

Found a field that's missing, or a profile shape that doesn't behave as documented? Open an issue on the Actor's Store page or reach out via [apify.com/DevilScrapes](https://apify.com/DevilScrapes) — we ship fixes fast.

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/linktree-profile-scraper/changelog.md

# Actor input Schema

## `usernames` (type: `array`):

One or more Linktree usernames ("selenagomez") or full profile URLs ("https://linktr.ee/selenagomez") to scrape. Case is preserved for bare usernames — Linktree usernames are case-sensitive in the URL path.

## `includeZeroLinkProfiles` (type: `boolean`):

Reserved for a future version — v1 always skips a profile whose links array is empty (no row emitted for it) regardless of this flag's value.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration, pinned to the BUYPROXIES94952 US datacenter pack by default. Reach is proven with a plain GET, so this is a rotation/scale safeguard, not a reach requirement.

## Actor input object example

```json
{
  "usernames": [
    "selenagomez",
    "garyvee",
    "kyliejenner"
  ],
  "includeZeroLinkProfiles": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "usernames": [
        "selenagomez",
        "garyvee",
        "kyliejenner"
    ],
    "includeZeroLinkProfiles": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "BUYPROXIES94952"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/linktree-profile-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "usernames": [
        "selenagomez",
        "garyvee",
        "kyliejenner",
    ],
    "includeZeroLinkProfiles": False,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["BUYPROXIES94952"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/linktree-profile-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "usernames": [
    "selenagomez",
    "garyvee",
    "kyliejenner"
  ],
  "includeZeroLinkProfiles": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call devilscrapes/linktree-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/linktree-profile-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wjeItKkx80mZxw22m/builds/Ar7sftDs7bmKdegX1/openapi.json
