# Linktree Link-in-Bio API Documentation

Scrappa's `GET /api/link-in-bio/linktree` endpoint reads a public Linktree creator page and returns its profile, links, pinned links, and typed social links as structured JSON. Pass either `handle` or a full `url`.

Each link carries the platform `type` as observed live, and an unrecognised type is passed through rather than dropped, so no link is ever silently lost. Linktree answers a reserved handle with a redirect to its blocked page, which this endpoint does not follow, so that case comes back as a 422 `UPSTREAM_REJECTED`. A handle that answers 200 but carries no profile data returns an empty result instead. An existing profile with nothing configured answers with HTTP 200 and an empty result. That response is not billable, and its `meta.reason` explains which case applied.

- **Documentation:** [https://scrappa.co/docs/link-in-bio-api/link_in_bio_linktree](https://scrappa.co/docs/link-in-bio-api/link_in_bio_linktree)
- **API group:** Link-in-Bio API
- **Endpoint:** `GET https://scrappa.co/api/link-in-bio/linktree`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | No | Linktree username, for example linktree. |
| `url` | string | No | Full Linktree profile URL. Used when you do not have the bare username. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/link-in-bio/linktree?handle=linktree"
```

## Example response

```json
{
    "provider": "linktree",
    "handle": "linktree",
    "profile": {
        "id": 123456789,
        "username": "linktree",
        "name": "Linktree",
        "page_title": "Linktree",
        "description": "The best link-in-bio tool.",
        "timezone": "Europe/Berlin",
        "avatar": "https://cdn.example.com/avatar.jpg",
        "is_verified": true,
        "badges": [],
        "verticals": []
    },
    "links": [
        {
            "id": "1000001",
            "url": "https://www.youtube.com/channel/UCkG8b0Yl8kG",
            "title": "YouTube",
            "type": "YOUTUBE_CHANNEL",
            "thumbnail": null,
            "is_pinned": false,
            "is_hidden": false,
            "order": 1
        }
    ],
    "pinned_links": [],
    "socials": [
        {
            "type": "INSTAGRAM",
            "url": "https://www.instagram.com/linktree",
            "title": null
        }
    ],
    "meta": {
        "duration_ms": 640,
        "attempts": 1,
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Profile Not Found | No public profile exists for this handle. |
| 503 | Upstream Unavailable | The profile could not be read from its source right now. Please retry. |
| 422 | Request Rejected Upstream | The source rejected this request, for example because the handle was not acceptable to it. |
| 503 | Profile Host Blocked the Request | The provider's bot protection refused this request after every available exit was tried. This is not a billing event; retry later. |
| 422 | Invalid Handle or URL | The handle was not in a supported format, or the URL did not belong to this endpoint's provider. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
