API (application programming interface) is a collection of predefined classes, functions, procedures, structures, and constants that are formed in programming code.
Usually, API is applied for internal use or by customers who want to implement the features of their favorite app on the website. API makes the developers' work easier. By using a pre-written code, a developer implements the features much quicker.
Short.cm provides free API for developers and offers a useful source of collection codes, guides, and discussions.
Examples of API
When you enter the site address in the browser address bar, a request is sent to the remote server. The server analyzes the request and responds. Your browser reads this response and displays the page with processed API. This is an example of interacting with the remote server API. In this case, the API receives requests, passes them, and sends you responses.
If you want to embed a module on your website that will show the weather forecast, you can use the API of one of the weather services. Thanks to it, you get meteorological data that will be updated automatically, without your direct participation.
When you insert a link of a Youtube video into a post on Facebook, the social network uses the video hosting API. As a result, followers can watch YouTube videos without leaving the social network. Finally, you can frequently use a social network account, e.g., Facebook, Twitter, or Google, to register on a site or in an application. In this case, the social network API is used to retrieve data.
The Short.cm API works the same.
The actions the Short.cm API embeds
The forefront and useful action to use the Short.cm API is including a piece of code to a website for short-link creation. With this point, developers use an already-written code and just apply it for implementing features that demand too much time to create by themselves.
The advantages are that customers create short links on a pre-installed website short domain, or add their personal branded domain, without being redirected to Short.cm. With API, the website contains the instruments to shorten a URL.
But this is not the end. There are many Short.cm features that developers can leverage in the application by implementing the API.
With code snippets, the following operations can be integrated:
- shorten a link;
- bulk link creation;
- update the original URL, title or path for existing URL by ID;
- add a domain;
- return list of country rules for a given link;
- request the domain list;
- get link-click statistics;
- delete a short URL;
- observe the statistics of a shortened URL;
- create a QR code;
- archive a URL.
The Short.cm API page is easy to navigate and has a clear structure that helps to find the content you're looking for quickly. Moreover, you can test the codes straight on the page by clicking "Try it."
What did you learn?
- Are APIs free to use?
- How can I get data API?
- How do you short a link?
- Free URL shortener API
Read also:
Join the conversation