GooLNK

GooLNK

  • Category: URL Shorteners

Shorten URLs with the API

The Goolnk API provides an easy way to shorten long URLs using a simple

POST
request to
/api/v1/shorten
. However, it's important to follow a few guidelines when making requests to avoid errors. Long URLs must be properly URL-encoded, and can not contain spaces. All user input should also be stripped of any leading or trailing whitespace.

5 Benefits of Using Goolnk API for URL Shortening

  1. Saves space by shortening long links
  2. Easier to share short links on social media
  3. Improves the readability of URLs
  4. Provides tracking and analytics of shortened links
  5. Enhances user experience with faster load times

Example Code in JavaScript

fetch('https://goolnk.com/api/v1/shorten', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ longUrl: 'https://example.com/long/url/with/special/characters?query=parameter' }) }) .then(response => response.json()) .then(data => console.log(data));

Note: In this example, the

longUrl
value is properly encoded so it can be successfully shortened by the API.

Similar APIs of URL Shorteners