T.LY Tools How To

T.LY Node URL Shortener API Package

T.LY Node URL Shortener API Package

We're excited to introduce the T.LY Node.js URL Shortener API, a simple package to shorten URLs directly from your Node.js applications. This package makes it easy for developers to integrate T.LY’s powerful URL-shortening capabilities with just a few lines of code.

T.LY API Docs on the t.ly domain showing endpoint sections and code examples for developers using the Node package.

Getting Started

To start using the T.LY Node.js package, install it from npm:

npm install tly-api

Create an account, generate an API key, and then you can shorten a URL with the following code:

const TLY = require('tly-api');
const tly = new TLY('YOUR_API_KEY');

(async () => {
    try {
        const shortUrl = await tly.shorten('https://example.com');
        console.log('Shortened URL:', shortUrl);
    } catch (error) {
        console.error('Error:', error);
    }
})();

Features

  • Fast URL shortening – Quickly shorten any long URL
  • Expand short URLs – Retrieve the original URL from a short link
  • Click tracking – Get insights into your link’s performance
  • Easy integration – Lightweight and simple to use

🔗 GitHub Repository

📦 NPM Package

We hope this package makes URL shortening even easier for Node.js developers. Try it out today and let us know what you think!

Free tools

Put it into practice with T.LY

Create branded short links, dynamic QR codes and OneLinks, and see every click in one place.