GET /v1/crawl/linktree/page
Linktree scraper API: a creator's Linktree page by username
Send a Linktree username in username and get the page's HTML document with its final URL, status and headers. Read the page's links out of the HTML.
- Price
- $0.0005 per call
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl
curl 'https://api.virev.ai/v1/crawl/linktree/page?username=shawnmendes' \
-H "Authorization: Bearer $VIREV_API_KEY"python
import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/crawl/linktree/page",
params={
"username": "shawnmendes",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
username required | query | string | The Linktree username. |
Example response
The example response of the API reference, with lists cut to their first 3 items and long text shortened.
json
{
"data": {
"final_url": "https://linktr.ee/shawnmendes",
"status": 200,
"content_type": "text/html; charset=utf-8",
"payload_kind": "text",
"response_headers": {
"cache-control": "max-age=31536000, no-cache, stale-if-error=31536000",
"content-type": "text/html; charset=utf-8",
"etag": "W/\"10lwcascwds6blj\""
},
"body": "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"description\" content=\"Linktree. Make your link do more.\" data-next-head=\"\"/><meta property=\"og:title\" content=\"Shawn Mendes Songs & Music Videos Links | Linktree\" data-next-head=\"\"/><meta…"
},
"meta": {
"cost": "$0.0005",
"balance": "$3.0755",
"request_id": "req_28304e4fe8e2cccc7cba5e028cce4295"
}
}How it works
A Linktree creator page — the document, with the page's links available via HTML extraction.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | The page does not exist: its site answered 404 or 410 for this input. You are not charged. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |