- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
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.
1curl -G "https://api.socialscrape.dev/v1/linktree" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'url=https://linktr.ee/miguelangeles'1import os2import requests34params = {5 "url": "https://linktr.ee/miguelangeles",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/linktree",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11 timeout=60,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/linktree");2url.search = new URLSearchParams({3 url: "https://linktr.ee/miguelangeles",4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape Linktree page",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/linktree",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "url",19 "value": "https://linktr.ee/miguelangeles"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | one of | Linktree page URL. |
handle | string | one of | Linktree username. Also accepted as username. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_011ac7e62beb8618876336f3",8 "data": {9 "object": "link_page",10 "platform": "linktree",11 "handle": "miguelangeles",12 "url": "https://linktr.ee/miguelangeles",13 "name": "MIGUEL ANGELES",14 "bio": "☆☆☆☆ IRL ANGEL ☆☆☆☆\nψ EMBRACE CHAOS ψ",15 "avatar_url": "https://ugc.production.linktr.ee/d3141538-f586-4f3f-bc9a-a82fbebab798_DEATHRATTLE-slowed-COVER.jpeg",16 "links": [17 {18 "title": "new project \"BEFORE THE SUN RISES & WINTERR ENDS\"",19 "url": "https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG?si=Zub7J4I3RySAaM9WVX3Okg"20 },21 {22 "title": "stream \"NOVEMBERR\"",23 "url": "https://open.spotify.com/track/62HnBMEdZjeFCd2T8g37T8?si=7bd35dd0e9f24d65"24 },25 {26 "title": "watch \"INNOCENCE\" video",27 "url": "https://www.youtube.com/watch?v=JINmh9O-sjU"28 }29 ],30 "socials": [31 {32 "title": "instagram",33 "url": "https://instagram.com/miguelangeles"34 },35 {36 "title": "spotify",37 "url": "https://open.spotify.com/artist/14xRX3JR8H4RWh8R7V3fvZ?si=EgRxWIPiRcaEHtSnqk5PAQ"38 },39 {40 "title": "soundcloud",41 "url": "https://soundcloud.com/miguelangeles"42 }43 ],44 "extra": {45 "country": "CA",46 "created_at": "2021-05-12T21:10:55Z",47 "emails": [48 {49 "email": "[email protected]",50 "found_in": "social_link",51 "source_url": "https://linktr.ee/miguelangeles"52 }53 ],54 "id": 15278008,55 "link_count": 7,56 "link_details": [57 {58 "id": "463416775",59 "position": 0,60 "thumbnail": "https://ugc.production.linktr.ee/8ed131c7-6d74-47fc-bceb-8be7f6bae4c8_ab67616d0000b2739bd93cc6e406b820dfff691f.jpeg",61 "title": "new project \"BEFORE THE SUN RISES & WINTERR ENDS\"",62 "type": "spotify_album",63 "url": "https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG?si=Zub7J4I3RySAaM9WVX3Okg"64 },65 {66 "id": "460281204",67 "position": 1,68 "thumbnail": "https://ugc.production.linktr.ee/3bd59146-cd44-4187-9601-4341b21070d2_ab67616d0000b2739ad10104c60fb9deff5b7f34.jpeg",69 "title": "stream \"NOVEMBERR\"",70 "type": "spotify_song",71 "url": "https://open.spotify.com/track/62HnBMEdZjeFCd2T8g37T8?si=7bd35dd0e9f24d65"72 },73 {74 "id": "460285424",75 "position": 2,76 "thumbnail": "https://ugc.production.linktr.ee/49049fb3-97fb-4947-b847-46c9c2f84384_maxresdefault.jpeg",77 "title": "watch \"INNOCENCE\" video",78 "type": "youtube_video",79 "url": "https://www.youtube.com/watch?v=JINmh9O-sjU"80 }81 ]82 }83 },84 "cursor": null,85 "has_more": null86}Fields
One LinkPage in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "link_page" | ||
platform | Platform | yes | |
handle | string or null | ||
url | string or null | ||
name | string or null | ||
bio | string or null | ||
avatar_url | string or null | ||
links | Link[] or null | ||
socials | Link[] or null | title = platform name | |
extra | object 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 Python client has client.linktree.get(...) and the TypeScript client client.linktree.get(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.