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.
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.
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"
}'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")
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.
| Param | Type | Description |
|---|---|---|
| urlrequired | string | Absolute destination URL to shorten, including the http:// or https:// scheme. |
{
"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.
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?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Generate trackable short links for marketing campaigns and store the
link_uuidfor later reference. - Produce
qr_short_urlvalues to embed directly in printed materials or downloadable QR codes. - Record
created_attimestamps to audit when specific short links were issued. - Check
moderation_actionbefore 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.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 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.
Does tr.ee have an official developer API?+
What exactly does the short_url endpoint return?+
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?+
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?+
Does the API return click or redirect analytics for a short link?+
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.