Linktree page API

A Linktree page: the creator's name, bio, avatar, every link in page order and the social accounts it points to.

GETapi.socialscrape.io/v1/linktree
Cost
1 credit
Cached repeats
0 creditssend max_age_days, results kept 30 days
Failed requests
0 credits
Status
Betashape may still gain fields

Product and group links carry their type, thumbnail and price in extra.link_details; a published email is in extra.emails and socials. Pass the page url or just the handle.

You send one of url or handle.

Request

Send your key in the x-api-key header.

curl
curl -G "https://api.socialscrape.io/v1/linktree" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode 'url=https://linktr.ee/miguelangeles'
Python
import os
import requests

params = {
    "url": "https://linktr.ee/miguelangeles",
}
res = requests.get(
    "https://api.socialscrape.io/v1/linktree",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
    timeout=60,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/linktree");
url.search = new URLSearchParams({
  url: "https://linktr.ee/miguelangeles",
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape Linktree page",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/linktree",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://linktr.ee/miguelangeles"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Parameters

NameTypeRequiredDescription
urlurlone ofLinktree page URL.
handlestringone ofLinktree username. Also accepted as username.

Every request also accepts trim, raw and max_age_days.

Response

Sample from a recorded response, shortened. Values are public data, not yours.

Status 200Sample
{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_011ac7e62beb8618876336f3",
  "data": {
    "object": "link_page",
    "platform": "linktree",
    "handle": "miguelangeles",
    "url": "https://linktr.ee/miguelangeles",
    "name": "MIGUEL ANGELES",
    "bio": "☆☆☆☆ IRL ANGEL ☆☆☆☆\nψ EMBRACE CHAOS ψ",
    "avatar_url": "https://ugc.production.linktr.ee/d3141538-f586-4f3f-bc9a-a82fbebab798_DEATHRATTLE-slowed-COVER.jpeg",
    "links": [
      {
        "title": "new project \"BEFORE THE SUN RISES & WINTERR ENDS\"",
        "url": "https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG?si=Zub7J4I3RySAaM9WVX3Okg"
      },
      {
        "title": "stream \"NOVEMBERR\"",
        "url": "https://open.spotify.com/track/62HnBMEdZjeFCd2T8g37T8?si=7bd35dd0e9f24d65"
      },
      {
        "title": "watch \"INNOCENCE\" video",
        "url": "https://www.youtube.com/watch?v=JINmh9O-sjU"
      }
    ],
    "socials": [
      {
        "title": "instagram",
        "url": "https://instagram.com/miguelangeles"
      },
      {
        "title": "spotify",
        "url": "https://open.spotify.com/artist/14xRX3JR8H4RWh8R7V3fvZ?si=EgRxWIPiRcaEHtSnqk5PAQ"
      },
      {
        "title": "soundcloud",
        "url": "https://soundcloud.com/miguelangeles"
      }
    ],
    "extra": {
      "country": "CA",
      "created_at": "2021-05-12T21:10:55Z",
      "emails": [
        {
          "email": "[email protected]",
          "found_in": "social_link",
          "source_url": "https://linktr.ee/miguelangeles"
        }
      ],
      "id": 15278008,
      "link_count": 7,
      "link_details": [
        {
          "id": "463416775",
          "position": 0,
          "thumbnail": "https://ugc.production.linktr.ee/8ed131c7-6d74-47fc-bceb-8be7f6bae4c8_ab67616d0000b2739bd93cc6e406b820dfff691f.jpeg",
          "title": "new project \"BEFORE THE SUN RISES & WINTERR ENDS\"",
          "type": "spotify_album",
          "url": "https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG?si=Zub7J4I3RySAaM9WVX3Okg"
        },
        {
          "id": "460281204",
          "position": 1,
          "thumbnail": "https://ugc.production.linktr.ee/3bd59146-cd44-4187-9601-4341b21070d2_ab67616d0000b2739ad10104c60fb9deff5b7f34.jpeg",
          "title": "stream \"NOVEMBERR\"",
          "type": "spotify_song",
          "url": "https://open.spotify.com/track/62HnBMEdZjeFCd2T8g37T8?si=7bd35dd0e9f24d65"
        },
        {
          "id": "460285424",
          "position": 2,
          "thumbnail": "https://ugc.production.linktr.ee/49049fb3-97fb-4947-b847-46c9c2f84384_maxresdefault.jpeg",
          "title": "watch \"INNOCENCE\" video",
          "type": "youtube_video",
          "url": "https://www.youtube.com/watch?v=JINmh9O-sjU"
        }
      ]
    }
  },
  "cursor": null,
  "has_more": null
}

Fields

One LinkPage in data.

A field the platform does not give is null, never made up. Extra platform details are in extra.

FieldTypeAlwaysNotes
object"link_page"
platformPlatformyes
handlestring or null
urlstring or null
namestring or null
biostring or null
avatar_urlstring or null
linksLink[] or null
socialsLink[] or nulltitle = platform name
extraobject or null

Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.

Questions

Which errors can it return?

invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.

Is there an SDK call for it?

The preview Python client has client.linktree.get(...) and the TypeScript client client.linktree.get(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.

Can an AI agent call it?

Yes. The MCP server reaches every built endpoint, with the same prices.

Build on social data early.

Developers and agent builders get the first keys.

Get early access