kutt.it

kutt.it

URL Shorteners

Open Source URL shortener. Kutt is a modern URL shortener with support for custom domains. Shorten URLs, manage your links and view the click rate statistics. Free and open source. Custom domain support. Custom URLs for shortened links Setting password for links. Private statistics for shortened URLs. View and manage your links. RESTful API.

Visit API

📚 Documentation & Examples

Everything you need to integrate with kutt.it

🚀 Quick Start Examples

kutt.it Javascript Examplejavascript
// kutt.it API Example
const response = await fetch('https://github.com/thedevs-network/kutt/blob/develop/README.md', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

How to Use the Kutt API in JavaScript

Kutt is a simple, modern URL shortener that can be integrated into any project. To use the Kutt API in your JavaScript application, you will need to follow the steps below.

Getting Started

To use the Kutt API, you will first need to sign up for an account on their website. Once you have done that, you can create a new API key by going to "API" in your dashboard and clicking on "New API Key".

Making API Requests

To make API requests, you will need to use the fetch function in JavaScript. Here is an example request to shorten a URL using the Kutt API:

const apiKey = "YOUR_API_KEY";
const url = "https://www.example.com";

fetch("https://kutt.it/api/v2/links", {
  method: "POST",
  headers: {
    "X-API-Key": apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ target: url }),
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error(error));

This code will send a POST request to the Kutt API's /links endpoint with your API key and the URL you want to shorten. The response data will be logged to the console.

API Documentation

The Kutt API documentation can be found on their GitHub repo at https://github.com/thedevs-network/kutt/blob/develop/README.md. This documentation includes the available API endpoints, query parameters, request and response types, and examples.

Here is an example of using the Kutt API to get information about a shortened URL:

const apiKey = "YOUR_API_KEY";
const slug = "SHORTENED_SLUG";

fetch(`https://kutt.it/api/v2/stats/${slug}`, {
  method: "GET",
  headers: {
    "X-API-Key": apiKey,
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error(error));

This code will send a GET request to the /stats endpoint with your API key and the slug of the shortened URL you want to retrieve statistics for. The response data will be logged to the console.

Conclusion

With the Kutt API, you can easily integrate URL shortening functionality into your JavaScript application. By following the documentation and examples provided, you can start using the API in just a few minutes.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jul 3Jul 5Jul 7Jul 9Jul 11Jul 13Jul 15Jul 17Jul 19Jul 21Jul 23Jul 25Jul 27Jul 29Aug 104008001440Minutes
Online
Offline

Related APIs in URL Shorteners