Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Captapi Linktree API
version: 0.1.0
summary: Structured public data from social platforms through one REST API.
description: 'Captapi returns public data (profiles, posts, comments, transcripts, search, ads, commerce) from social platforms as JSON.
Auth: send your key as `Authorization: Bearer capt_live_...` or `X-API-Key: capt_live_...`. Keys are created by a human at https://captapi.com/dashboard/api-keys.
Billing: each operation states its cost in `x-credit-cost`. The `X-Captapi-Credits` response header shows what was charged. Failed requests (4xx/5xx) are not billed. `cache=true` serves from the 24h cache, free on a hit where `billedOnCacheHit` is false. Where the price depends on which path served the call, `x-credit-cost.note` gives the full rule and the range we have observed.
Empty results: on many list and search endpoints a call that ran but found nothing is charged 0 credits (for example an ad-library or profile search with no matches). Where an empty result is still billed, the endpoint description says so; Google Maps business search, for instance, bills its one page because the lookup ran. The `X-Captapi-Credits` header always shows the actual charge.
Errors: every non-2xx response uses the same envelope, `{ success: false, error: { code, message, retryable } }`. Retry only when `retryable` is true, honouring `Retry-After`.
Timing: every response carries `Server-Timing: total;dur=`, the total time the request took. Deprecated: the `timings` object some endpoints still return in `data` will be removed from response bodies on 2026-12-17; use the header instead. It is not part of the response schemas below.
Response schemas are inferred from real captured responses and list the fields seen there plus documented top-level fields. Fields can be null when a platform does not expose them.
Endpoint list: https://captapi.com/llms-endpoints.txt · Guide for agents: https://captapi.com/llms.txt · MCP: https://captapi.com/mcp.json'
contact:
name: Captapi support
email: support@captapi.com
url: https://captapi.com
termsOfService: https://captapi.com/legal/terms
license:
name: Captapi Terms of Service
url: https://captapi.com/legal/terms
servers:
- url: https://api.captapi.com
security:
- bearerAuth: []
- apiKeyHeader: []
tags:
- name: Linktree
description: Public data from Linktree.
paths:
/v1/linktree/page:
get:
operationId: linktree_page
tags:
- Linktree
summary: Linktree Page API
description: 'Link-in-bio → creator graph: typed links, socialAccounts{} that feed TikTok/Instagram/Spotify/SoundCloud, email, verticals.
Paste a Linktree URL or username and get the public page as clean JSON. Canonical profile fields: platform, id (string), handle/username, url, displayName (name is a deprecated alias), description, avatar, verified. Also verticals[] (Linktree niche labels, e.g. music_artist), linkPlatforms[] (platforms Linktree detected on the page), timezone, and email when the creator publishes a mailto social. links[] are typed (CLASSIC, PRODUCT, SPOTIFY_*, YOUTUBE_VIDEO, GROUP, …) with id/url/thumbnail; PRODUCT rows resolve shopUrl when Linktree leaves url empty (url is always present — null only when no destination exists); GROUP children nest under links with parentId. socials[] is the icon list (incl. EMAIL_ADDRESS). socialAccounts{} is the camelCase HTTP map for catalog joins (instagram/tiktok/spotify/soundcloud/appleMusic/youtube/…) — email is not duplicated there (use top-level email). YouTube watch URLs in socialAccounts are resolved to the channel via oEmbed so they pipe into youtube/channel-details. Accepts cache / cacheMaxAge. Flat 1 credit. This is the fan-out point for a creator graph: one Linktree call feeds the rest of the catalog.
Docs: https://captapi.com/apis/linktree-page'
security:
- bearerAuth: []
- apiKeyHeader: []
parameters:
- name: url
in: query
required: true
description: Linktree profile URL or username. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble.
schema:
type: string
example: https://linktr.ee/miguelangeles
- name: cache
in: query
required: false
description: Set true to serve from the response cache (default TTL). Default false — always fetch fresh. Prefer cacheMaxAge when you need 1d–30d freshness control.
schema:
type: boolean
default: false
example: false
- name: cacheMaxAge
in: query
required: false
description: 'Max age of a cached response: 1d, 3d, 7d, 14d, or 30d. When set, enables caching with that TTL.'
schema:
enum:
- 1d
- 3d
- 7d
- 14d
- 30d
type: string
x-credit-cost:
credits: 1
label: 1 credit
billedOnCacheHit: false
x-one-liner: 'Link-in-bio → creator graph: typed links, socialAccounts{} that feed TikTok/Instagram/Spotify/SoundCloud, email, verticals.'
responses:
'200':
description: Success. The data object for this endpoint.
headers:
X-Captapi-Credits:
$ref: '#/components/headers/Credits'
X-Captapi-Cache:
$ref: '#/components/headers/Cache'
X-Captapi-Request-Id:
$ref: '#/components/headers/RequestId'
Server-Timing:
$ref: '#/components/headers/ServerTiming'
content:
application/json:
schema:
type: object
required:
- success
- data
properties:
success:
const: true
data:
type: object
properties:
platform:
type: string
description: Platform identifier for this response (matches the endpoint's platform).
url:
type: string
description: 'On the page: Linktree profile URL. On a link row: outbound destination (PRODUCT may use shopUrl when Linktree leaves url empty).'
id:
type: integer
description: Linktree account id as a string (catalog-wide id convention).
username:
type: string
description: Account username / handle.
name:
type: string
description: Deprecated alias of displayName — prefer displayName.
description:
type: string
description: Description text.
avatar:
type: string
description: Avatar / profile picture URL. Canonical across profile endpoints.
verified:
type: boolean
description: Whether the account is verified on this platform.
verticals:
type: array
items:
type: string
description: Linktree niche/vertical labels for the page (e.g. music_artist, musician_band). Empty when Linktree exposes none.
linkPlatforms:
type: array
items:
type: string
description: Platforms Linktree detected among the page's links/socials (e.g. Spotify, Instagram). Distinct from socialAccounts URLs.
timezone:
type: string
description: 'Timezone. Example: "America/New_York".'
email:
type: string
description: Public email when the creator adds an EMAIL_ADDRESS mailto social on Linktree. Null/omitted when not published.
linkCount:
type: integer
description: Total link rows including GROUP children.
links:
type: array
items:
type: object
properties:
title:
type: string
description: Title of this links item.
type:
type: string
description: 'On links[]: Linktree link type (CLASSIC, PRODUCT, SPOTIFY_ALBUM, SPOTIFY_SONG, YOUTUBE_VIDEO, SOUNDCLOUD_PLAYLIST, GROUP, …). On socials[]: icon type (INSTAGRAM, TIKTOK, EMAIL_ADDRESS, …).'
id:
type: string
description: Id of this links item.
url:
type: string
description: 'On the page: Linktree profile URL. On a link row: outbound destination (PRODUCT may use shopUrl when Linktree leaves url empty).'
thumbnail:
type: string
description: Thumbnail image URL.
socials:
type: array
items:
type: object
properties:
type:
type: string
description: 'On links[]: Linktree link type (CLASSIC, PRODUCT, SPOTIFY_ALBUM, SPOTIFY_SONG, YOUTUBE_VIDEO, SOUNDCLOUD_PLAYLIST, GROUP, …). On socials[]: icon type (INSTAGRAM, TIKTOK, EMAIL_ADDRESS, …).'
url:
type: string
description: 'On the page: Linktree profile URL. On a link row: outbound destination (PRODUCT may use shopUrl when Linktree leaves url empty).'
socialAccounts:
type: object
properties:
instagram:
type: string
description: Instagram URL.
tiktok:
type: string
description: Tiktok URL.
spotify:
type: string
description: Spotify URL.
youtube:
type: string
description: Youtube URL.
soundcloud:
type: string
description: Soundcloud URL.
appleMusic:
type: string
description: Apple music URL.
example:
success: true
data:
platform: linktree
url: https://linktr.ee/miguelangeles
id: 15278008
username: miguelangeles
name: MIGUEL ANGELES
description: '☆☆☆☆ IRL ANGEL ☆☆☆☆
ψ EMBRACE CHAOS ψ'
avatar: https://ugc.production.linktr.ee/d3141538-f586-4f3f-bc9a-a82fbebab798_DEATHRATTLE-slowed-COVER.jpeg
verified: false
verticals:
- music
- creative
linkPlatforms:
- TikTok
- Instagram
timezone: America/New_York
email: miguel@irlangel.com
linkCount: 8
links:
- title: new project "BEFORE THE SUN RISES & WINTERR ENDS"
type: SPOTIFY_ALBUM
id: '463416775'
url: https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG?si=Zub7J4I3RySAaM9WVX3Okg
thumbnail: https://ugc.production.linktr.ee/8ed131c7-6d74-47fc-bceb-8be7f6bae4c8_ab67616d0000b2739bd93cc6e406b820dfff691f.jpeg
- title: stream "NOVEMBERR"
type: SPOTIFY_SONG
id: '460281204'
url: https://open.spotify.com/track/62HnBMEdZjeFCd2T8g37T8?si=7bd35dd0e9f24d65
thumbnail: https://ugc.production.linktr.ee/3bd59146-cd44-4187-9601-4341b21070d2_ab67616d0000b2739ad10104c60fb9deff5b7f34.jpeg
socials:
- type: INSTAGRAM
url: https://instagram.com/miguelangeles
- type: TIKTOK
url: https://tiktok.com/@irlangel
socialAccounts:
instagram: https://instagram.com/miguelangeles
tiktok: https://tiktok.com/@irlangel
spotify: https://open.spotify.com/artist/14xRX3JR8H4RWh8R7V3fvZ?si=EgRxWIPiRcaEHtSnqk5PAQ
youtube: https://www.youtube.com/watch?v=xiFUzOJaiC4
soundcloud: https://soundcloud.com/miguelangeles
appleMusic: https://music.apple.com/ca/artist/miguel-angeles/1209423162
'400':
$ref: '#/components/responses/Error400'
'401':
$ref: '#/components/responses/Error401'
'402':
$ref: '#/components/responses/Error402'
'404':
$ref: '#/components/responses/Error404'
'422':
$ref: '#/components/responses/Error422'
'429':
$ref: '#/components/responses/Error429'
'502':
$ref: '#/components/responses/Error502'
components:
responses:
Error429:
description: Rate limit reached. Wait for Retry-After seconds. Not billed.
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: rate_limit_exceeded
message: rate limit exceeded
retryable: true
plan: starter
limit_per_minute: 120
Error422:
description: A required parameter is missing or has the wrong type. Not billed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: VALIDATION_ERROR
message: Request validation failed. Fix the listed fields and retry.
retryable: false
issues:
- type: missing
loc:
- query
- url
msg: Field required
input: null
Error404:
description: The resource does not exist or is not public. Not billed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: NOT_FOUND
message: Monitor not found
retryable: false
Error502:
description: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: UPSTREAM_UNAVAILABLE
message: The upstream data source failed for this request. Retry shortly.
retryable: true
Error401:
description: Missing, invalid or revoked API key. Not billed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: UNAUTHORIZED
message: Invalid or revoked API key
retryable: false
Error400:
description: 'Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: WRONG_RESOURCE_TYPE
message: Expected a TikTok URL, but received a YouTube URL. Use the YouTube endpoint for that URL, or pass a TikTok URL like https://www.tiktok.com/@user/video/1234567890.
retryable: false
suggestedEndpoint: /v1/youtube/video-details
Error402:
description: Not enough credits for this request. Not billed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
success: false
error:
code: insufficient_credits
message: This call needs 2 credits; 1 available. No credits charged.
retryable: false
required: 2
available: 1
upgrade_url: /dashboard/billing
headers:
ServerTiming:
description: 'Total time the request took, in milliseconds: `total;dur=<ms>`. No per-step breakdown.'
schema:
type: string
example: total;dur=4387
Cache:
description: 1 when the response was served from the 24h cache, 0 otherwise.
schema:
type: string
enum:
- '0'
- '1'
RequestId:
description: Request id. Include it when contacting support.
schema:
type: string
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
Credits:
description: Credits charged for this request. 0 on a free cache hit or a failed request.
schema:
type: integer
schemas:
Error:
type: object
required:
- success
- error
properties:
success:
const: false
error:
type: object
required:
- code
- message
- retryable
properties:
code:
type: string
description: Machine-readable error code, e.g. WRONG_RESOURCE_TYPE, NOT_FOUND, insufficient_credits, rate_limit_exceeded. Compare case-sensitively; both upper and lower case codes exist.
message:
type: string
description: Human-readable explanation.
retryable:
type: boolean
description: true when the same request may succeed later (429, most 5xx). Do not retry when false.
suggestedEndpoint:
type:
- string
- 'null'
description: On platform mismatch, the endpoint that matches the URL you sent.
additionalProperties: true
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Your API key: `Authorization: Bearer capt_live_...`. Create one at https://captapi.com/dashboard/api-keys.'
apiKeyHeader:
type: apiKey
in: header
name: X-API-Key
description: 'Alternative to the bearer header: `X-API-Key: capt_live_...`.'
externalDocs:
description: Docs
url: https://captapi.com/docs