Base URL: https://minilink.dk/api/
Solution 1: Via URL
Create a mini link via URL parameters. This is the simplest method of shortening links.
GETShorten link via URL
https://minilink.dk/api/post/{url}
Note: The URL must be URL-encoded.
https://minilink.dk/api/post/https%3A%2F%2Fsimonfas.dk
Solution 2: GET/POST request with JS
Use JavaScript fetch or cURL to make API calls with more control over data.
GETGET Request (browser/JS/fetch)
GET https://minilink.dk/api/post/https%3A%2F%2Fwww.simonfas.dk
POSTPOST Request (cURL)
curl -X POST https://minilink.dk/api/post \
-H "Content-Type: application/json" \
-d '{"url": "https://www.simonfas.dk"}'
Example for a JavaScript Implementation (One URL)
const axios = require('axios');
async function createLink() {
try {
const response = await axios.post(
"https://minilink.dk/api/post",
{
url: "https://www.simonfas.dk",
}
);
console.log(response.data);
} catch (err) {
console.log("Error:", err.response?.data || err.message);
}
}
createLink();
Examplefor a JavaScript Implementation (Bulk Function)
const axios = require('axios');
async function createLink() {
try {
async function createLink() {
try {
const response = await axios.post(
"https://minilink.dk/api/bulk",
{
"urls": [
"https://www.simonfas.dk",
"https://simonfas.dk/nyheder/",
"https://simonfas.dk/udvalgte-videoer/"
]
}
);
console.log(response.data);
} catch (err) {
console.log("Error:", err.response?.data || err.message);
}
}
createLink();
Output
The API returns JSON data with information about the shortened link.
If the link already exists you will receive:
{
"ok": "true",
"message": "Metadata updated for existing link",
"slug": "GeEuG",
"short": "https://mnlk.dk/GeEuG",
"url": "https://simonfas.dk"
}
If it is a new link:
{
"ok": "true",
"message": "New link created",
"slug": "GeEuG",
"short": "https://mnlk.dk/GeEuG",
"url": "https://simonfas.dk"
}
If it's a Bulk:
{
"links": [
{
"message": "Metadata updated for existing link",
"slug": "GeEuG",
"short": "https://mnlk.dk/GeEuG",
"url": "https://simonfas.dk/"
},
{
"message": "Metadata updated for existing link",
"slug": "G99Ip",
"short": "https://mnlk.dk/G99Ip",
"url": "https://simonfas.dk/nyheder/"
},
{
"message": "Metadata updated for existing link",
"slug": "EmbJN",
"short": "https://mnlk.dk/EmbJN",
"url": "https://simonfas.dk/udvalgte-videoer/"
}
],
"count": 3
}
If you send a link without HTTPS:
{
"ok": "false",
"status": 400,
"error_code": "HTTPS_REQUIRED",
"error": "Only HTTPS links are allowed"
}
If you send a link without a TLD (Top Level Domain):
{
"ok": "false",
"status": 400,
"error_code": "INVALID_TLD",
"error": "URL must have a valid domain with TLD (e.g. .com, .dk, .eu, etc.)"
}
If you send a link that is blocked by Minilink:
{
"ok": "false",
"status": 400,
"error_code": "DOMAIN_BLOCKED",
"error": "Links from the domain \"{Domæne_Her}\" is blocked and cannot be shortened.",
"host": "{Link_Her}"
}
If you send a link that is rated unsafe by VirusTotal:
{
"ok": "false",
"status": 400,
"error_code": "VIRUSTOTAL_BLOCK",
"error": "The link is marked as unsafe by VirusTotal and cannot be shortened."
"verdict": "blocked_by_virustotal"
"stats": { "harmless" : {number_here}, "malicious" : {number_here}, "suspicious" : {number_here}, "undetected" : {number_here}, "timeout" : {number_here} }
}
If you send a link that is considered suspicious by Certstream:
{
"ok": "false",
"status": 400,
"error_code": "CERTSTREAM_BLOCK",
"error": "The domain \"{Domain_Here}\" is marked as suspicious (CertStream) and cannot be shortened."
"host": "{Domain_Here}"
"matched_rule": "keyword:xxx"
"severity": {number_here}
}
Error handling
Important notes:
- Links must be valid and contain protocol (https://)
- Links must be valid and contain TLD (e.g. .com, .dk, .eu, etc.)
- Links must be URL-encoded when sent via GET parameters
- The API updates metadata for existing links upon restoration
Rate Limiting
There are no rate limits at this time, but please do not abuse the API. Automated requests should be kept to a reasonable level.
← Back to the front page