Free & Open to Use
Shorten. Share.
Stay in control.
Create smart short links with passwords, expiry dates, and visitor limits — all for free.
Your Recent Links
Your shortened links will appear here. They're saved locally in your browser.
Password Lock
Protect links so only people with the password can access the destination.
Auto Expiry
Set a date and the link stops working automatically after it expires.
Click Limits
Restrict how many times a link can be visited before it deactivates.
QR Code
Generate and download a QR code for any short link instantly.
Developer API
Integrate MD Fly into your own apps and scripts. No API key required — completely public. Rate limit: 6 requests per minute per IP.
POST
https://mdfly.link/api.php
Shorten a URL
| Field | Type | Description |
|---|---|---|
| url | string | The long URL to shorten — required |
| password | string | Optional. Visitors must enter this to access the link |
| expires_at | string | Optional. UTC datetime — format: YYYY-MM-DD HH:MM |
| expires_utc_ts | integer | Optional. UTC unix timestamp — alternative to expires_at |
| max_clicks | integer | Optional. Link deactivates after this many visits |
Example — Basiccurl -X POST https://mdfly.link/api.php \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/path"}'
Example — All Optionscurl -X POST https://mdfly.link/api.php \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/very/long/path",
"password": "secret123",
"expires_at": "2025-12-31 23:59",
"max_clicks": 100
}'
Success Response — HTTP 201{
"success": true,
"short_url": "https://mdfly.link/aB3xYz",
"code": "aB3xYz",
"original_url": "https://example.com/very/long/path",
"has_password": false,
"expires_at_utc": null,
"max_clicks": null,
"created_at_utc": 1748131200
}
expires_at must always be provided in UTC. If your users are in a specific timezone, convert to UTC before sending. The server compares against UTC time precisely to the minute.
ERRORS
Error Response Format
| HTTP | error | Reason |
|---|---|---|
| 429 | rate_limited | More than 6 requests per minute from the same IP |
| 400 | missing_url | The "url" field was not provided |
| 400 | invalid_url | URL is malformed or missing http:// / https:// |
| 400 | bad_request | Invalid field value (e.g. past expiry date, max_clicks < 1) |
| 405 | method_not_allowed | Only POST is accepted |
Error Response{
"success": false,
"error": "invalid_url",
"message": "The provided URL is not valid. Make sure it starts with http:// or https://"
}