curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "linktree.profile.get", "input": { "username": "linktree" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "linktree.profile.get", "input": { "username": "linktree" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "linktree.profile.get", "input": { "username": "linktree" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Response
{ "display_name": "Linktree", "created_at": "2021-08-25", "country": "AU", "links_count": 2, "profile_url": "https://linktr.ee/linktree", "tier": "pro", "timezone": "Asia/Manila", "verified": false, "links": [ { "title": "Linktree's Linktree", "type": "CLASSIC", "url": "https://linktr.ee/linktr.ee" }, { "title": "Homepage", "type": "CLASSIC", "url": "http://linktr.ee/linktr.ee" } ]}