Discover/tr API
live

tr APItr.ee

Create tr.ee short links via API. Submit any destination URL and get back a short URL, QR code link, UUID, moderation verdict, and creation timestamp.

Endpoints
1
Updated
6d ago

What is the tr API?

The tr.ee API exposes 1 endpoint — short_url — that accepts a destination URL and returns 6 structured fields describing the newly created short link. Each call produces a unique tr.ee short link (e.g. https://tr.ee/<short_id>) along with a companion QR-code short URL, a site-assigned UUID, an ISO 8601 creation timestamp, and a moderation verdict for the destination.

This call costs10 credits / call— charged only on success
Try it
Absolute destination URL to shorten, including the http:// or https:// scheme.
api.parse.bot/scraper/4bb06577-065b-42e7-9e4e-fbad35631931/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X POST 'https://api.parse.bot/scraper/4bb06577-065b-42e7-9e4e-fbad35631931/short_url' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://en.wikipedia.org/wiki/URL_shortening"
}'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace tr-ee-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: tr.ee link shortener SDK — create a short link and inspect it."""
from parse_apis.tr_ee_api import Tree, InputFormatInvalid

client = Tree()

# Shorten a URL and inspect every returned field.
try:
    link = client.links.create(url="https://en.wikipedia.org/wiki/URL_shortening")
except InputFormatInvalid as e:
    print("Bad URL:", e.message)
    raise

print("Short URL:   ", link.short_url)
print("Short ID:    ", link.short_id)
print("Destination: ", link.destination_url)
print("QR channel:  ", link.qr_short_url)
print("UUID:        ", link.link_uuid)
print("Created:     ", link.created_at)
print("Moderation:  ", link.moderation_action)

print("exercised: links.create")
All endpoints · 1 totalmissing one? ·

Submits a destination URL to the tr.ee free link shortener and returns the newly created short link. Each call creates a new link (a repeated call for the same destination yields a different short URL). Returns one object with the direct short URL, its short id, a companion QR-channel short URL, the link's UUID, the creation timestamp and the site's moderation verdict. Costs two to three site round trips. A value that is not an absolute http(s) URL is rejected before any request is made.

Input
ParamTypeDescription
urlrequiredstringAbsolute destination URL to shorten, including the http:// or https:// scheme.
Response
{
  "type": "object",
  "fields": {
    "short_id": "path segment of short_url",
    "link_uuid": "site-assigned UUID of the created link",
    "short_url": "the shortened https://tr.ee/<short_id> link",
    "created_at": "ISO 8601 UTC creation timestamp",
    "qr_short_url": "second tr.ee short link the site creates for the QR-code channel of the same destination",
    "destination_url": "the destination the short link redirects to, as stored by the site",
    "moderation_action": "site moderation verdict for the destination (e.g. SAFE)"
  },
  "sample": {
    "data": {
      "short_id": "sgFydX",
      "link_uuid": "dd46cef7-e0b9-4c50-86af-fe5de8d7e4f3",
      "short_url": "https://tr.ee/sgFydX",
      "created_at": "2026-09-03T06:01:49.215Z",
      "qr_short_url": "https://tr.ee/tuNcMMHYPoWM",
      "destination_url": "https://en.wikipedia.org/wiki/URL_shortening",
      "moderation_action": "SAFE"
    },
    "status": "success"
  }
}

About the tr API

What the API Returns

The short_url endpoint accepts a single required parameter — url — which must be an absolute URL including the http:// or https:// scheme. On success, it returns an object with six fields: short_url (the full https://tr.ee/<short_id> link), short_id (the path segment alone), link_uuid (the site-assigned UUID for the link), created_at (UTC creation timestamp in ISO 8601 format), qr_short_url (a second tr.ee link dedicated to the QR-code channel for the same destination), and destination_url (the destination as stored by the service). The moderation_action field reports the site's safety verdict for the submitted destination — typical values include SAFE.

Link Creation Behavior

Every call to short_url creates a new link, even when the same destination URL is submitted more than once. There is no deduplication: submitting https://example.com twice will produce two different short_id values and two distinct short_url values. Both will redirect to the same destination, but they are tracked separately and carry different UUIDs.

QR Code Channel

The qr_short_url field is a separate tr.ee link that the service generates alongside the primary short link. It points to the same destination but is intended for QR-code distribution. This lets you pass qr_short_url directly to a QR-code rendering library without generating a secondary short link yourself.

Reliability & maintenance

The tr API is a managed, monitored endpoint for tr.ee — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when tr.ee changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official tr.ee API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Generate trackable short links for marketing campaigns and store the link_uuid for later reference.
  • Produce qr_short_url values to embed directly in printed materials or downloadable QR codes.
  • Record created_at timestamps to audit when specific short links were issued.
  • Check moderation_action before publishing a short link to confirm the destination was flagged as SAFE.
  • Programmatically shorten large batches of URLs and persist the short_id–to–destination mapping.
  • Integrate tr.ee short links into social media scheduling tools where character count matters.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does tr.ee have an official developer API?+
tr.ee (operated by Linktree) does not publish a documented public API for link shortening. Linktree offers a separate account-based API at developers.linktree.com, but that covers profile and page management, not the tr.ee free shortener.
What exactly does the short_url endpoint return?+
It returns a single object with six fields: short_url, short_id, link_uuid, created_at, qr_short_url, destination_url, and moderation_action. There is no click analytics, redirect-count, or expiry data in the response — the payload covers link identity and creation metadata only.
Does submitting the same destination URL twice return the same short link?+
No. Each call creates a new link. Two calls with identical destination URLs will produce two different short_id and link_uuid values. If you need to avoid duplicates, store the short_url from the first call and reuse it rather than calling the endpoint again.
Can I retrieve or list previously created short links?+
Not currently. The API covers link creation only; there is no endpoint for listing, looking up, or deleting existing short links. You can fork this API on Parse and revise it to add a lookup or management endpoint if your use case requires it.
Does the API return click or redirect analytics for a short link?+
Not currently. The response includes creation metadata (created_at, link_uuid) and the link itself, but no click counts, referrer data, or geographic breakdown. You can fork this API on Parse and revise it to add an analytics endpoint if the underlying data becomes accessible.
Page content last updated . Spec covers 1 endpoint from tr.ee.
Related APIs in Developer ToolsSee all →