# Linktree Profile (`linktree.profile`)

Public Linktree page by URL: title, bio, avatar, contact e-mail, linked social accounts and every link with its destination.

Docs: https://primaryapi.com/docs/api-reference/linktree/profile

- Endpoint: `POST https://api.primaryapi.com/v1/run/linktree.profile`
- Category: Web Scraping · Platform: `linktree` · Kind: lookup · Status: live
- Price: 1 credit per call; up to 7 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=linktree.profile`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `url` | string | yes |  | max 2048 chars; format: uri | Linktree profile URL, e.g. https://linktr.ee/mkbhd. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `id` | string \| null | Linktree account id |
| `username` | string |  |
| `url` | string | https://linktr.ee/<username> |
| `title` | string \| null | Page title |
| `description` | string \| null | Bio |
| `avatarUrl` | string \| null |  |
| `thumbnailUrl` | string \| null | Custom avatar image, when set |
| `verticals` | string[] |  |
| `timezone` | string \| null |  |
| `email` | string \| null | Public contact e-mail shown on the page |
| `instagram` | string \| null |  |
| `tiktok` | string \| null |  |
| `youtube` | string \| null |  |
| `spotify` | string \| null |  |
| `soundcloud` | string \| null |  |
| `appleMusic` | string \| null |  |
| `applePodcast` | string \| null |  |
| `facebook` | string \| null |  |
| `linkedin` | string \| null |  |
| `x` | string \| null |  |
| `twitch` | string \| null |  |
| `links` | object[] |  |
| `links[].id` | string \| null |  |
| `links[].type` | string \| null | Linktree link type, e.g. CLASSIC, YOUTUBE_CHANNEL, SPOTIFY_ALBUM |
| `links[].title` | string \| null |  |
| `links[].url` | string \| null | Destination URL (null when the link is gated) |
| `links[].thumbnailUrl` | string \| null |  |
| `links[].locked` | boolean \| null | Link sits behind an age / passcode / sensitive-content gate |
| `locked` | boolean \| null | Page sits behind a password / age / sensitive-content gate (links withheld) |
| `verified` | boolean \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/linktree.profile" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://linktr.ee/mkbhd"}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "id": "12430309",
      "username": "MKBHD",
      "url": "https://linktr.ee/MKBHD",
      "title": "Waveform",
      "description": null,
      "avatarUrl": "https://ugc.production.linktr.ee/USl9Uq9GR8y5K2Gdj0UL_74v07R9H8U7Iayn4",
      "thumbnailUrl": "https://ugc.production.linktr.ee/USl9Uq9GR8y5K2Gdj0UL_74v07R9H8U7Iayn4",
      "verticals": [
        "Creator"
      ],
      "timezone": "America/New_York",
      "email": "podcast@mkbhd.com",
      "instagram": "https://instagram.com/wvfrmpodcast",
      "tiktok": null,
      "youtube": "https://www.youtube.com/channel/UCEcrRXW3oEYfUctetZTAWLw",
      "spotify": "https://open.spotify.com/show/6o81QuW22s5m2nfcXWjucc",
      "soundcloud": null,
      "appleMusic": null,
      "applePodcast": "https://podcasts.apple.com/us/podcast/waveform-the-mkbhd-podcast/id1474429475",
      "facebook": "https://facebook.com/WVFRM",
      "linkedin": null,
      "x": "https://x.com/WVFRM",
      "twitch": null,
      "links": [
        {
          "id": "64107392",
          "type": "YOUTUBE_CHANNEL",
          "title": "YouTube",
          "url": "https://www.youtube.com/channel/UCEcrRXW3oEYfUctetZTAWLw",
          "thumbnailUrl": null,
          "locked": false
        }
      ],
      "locked": false,
      "verified": true
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z"
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: up to 7 credits if a call is retried elsewhere. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=linktree.profile`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Public contact e-mails and social links of creators are personal data: callers need a lawful basis. Gated pages return locked:true with identity fields only.

