LiT Shortcut
Developers
Build your own short URL workflow with lit.sc style API.
This site is open source style.
You can run your own lit.sc style short URL service and call it from scripts.
Legacy-compatible API
To shorten a link
POST to /rpc/setLink with originalURL (and optional shortURL).
curl -X POST http://localhost:3000/rpc/setLink \
-H "Content-Type: application/json" \
-d '{"originalURL":"https://example.com"}'
Response example:
{
"shortenError": false,
"alreadyShortened": false,
"originalURL": "https://example.com",
"shortenedURL": "https://lit.sc/camp-2026"
}
To get information about a shortened link
POST to /rpc/getLink with shortenedURL as full URL or hash.
curl -X POST http://localhost:3000/rpc/getLink \
-H "Content-Type: application/json" \
-d '{"shortenedURL":"https://lit.sc/camp-2026"}'
curl -X POST http://localhost:3000/rpc/getLink \
-H "Content-Type: application/json" \
-d '{"shortenedURL":"camp-2026"}'
Response example:
{
"originalURL": "https://example.com",
"linkHash": "camp-2026",
"timesUsed": 12,
"lastUse": null,
"dateShortened": "2026-05-19T00:00:00.000Z",
"topReferrals": [],
"topUserAgents": [],
"error": false
}
Modern API
You can also use modern endpoints:
POST /api/shorten and POST /api/stats.