
Ugurly (available at ugurly.vercel.app) is a free, open-source URL shortening service. It offers URL statistics, a versatile API, and customization features such as custom slugs, password protection, and link lifespan management.
- Custom Slugs: Create personalized slugs for your URLs 🎯
- Emoji Slugs: Use emojis as slugs for fun and uniqueness 😃
- Password Protection: Secure your URLs with passwords 🔒
- Click Limit: Control the maximum number of clicks on your URLs 📈
- URL Statistics: Access detailed statistics for your shortened URLs 📊
- API: Utilize a free and open-source API for URL shortening and analytics 🛠️
- Open Source: Ugurly is open-source and free to use 📖
- Ad-Free: No ads, no tracking, no distractions 🚫
- Completely Free: No hidden costs, premium plans, or restrictions 💸
- Self-Hosting: Deploy Ugurly on your own server for complete control 🏠
To access a shortened URL, use the basic structure: https://ugurly.vercel.app/r/:short-code
Example: https://ugurly.vercel.app/r/google
For password-protected URLs, follow the same structure. You'll be redirected to a password entry page.
Example: https://ugurly.vercel.app/r/google-protected
Password: 1234
To bypass the password entry page, append the password as a URL parameter:
https://ugurly.vercel.app/r/<short_code>?password=<password>
https://ugurly.vercel.app/r/google-protected?password=1234
Note: All API routes are protected. Obtain your API key from Ugurly Settings.
Base URL: https://ugurly.vercel.app/api/v1
Required Headers:
Header | Description | Required |
---|---|---|
Authorization | Your API key (Bearer API_KEY) | Yes |
Endpoint: https://ugurly.vercel.app/api/v1/url/create
Method: POST
Payload | Data Type | Description | Required |
---|---|---|---|
url | String | Long URL to be shortened | Yes |
slug | String | Custom alias for the shortened URL | No |
password | String | Password for accessing the URL | No |
maxClicks | Number | Maximum allowed clicks for the URL | No |
Endpoint: https://ugurly.vercel.app/api/v1/url/:url-id
(Use ID, not slug)
Method: GET
Endpoint: https://ugurly.vercel.app/api/v1/urls
Method: GET
URLQueryParam | Data Type | Description | Required |
---|---|---|---|
limit | Number | Page size for results | No |
cursor | String | Starting cursor for pagination | No |
Endpoint: https://ugurly.vercel.app/api/v1/url/edit/:url-id
(Use ID, not slug)
Method: POST
Payload | Data Type | Description | Required |
---|---|---|---|
url | String | Updated long URL | Yes |
slug | String | Updated custom alias for the URL | No |
maxClicks | Number | Updated maximum allowed clicks for the URL | No |
password | String | Updated password for accessing the URL | No |
Endpoint: https://ugurly.vercel.app/api/v1/url/delete/:url-id
(Use ID, not slug)
Method: DELETE
- TursoDB 🌿
bash
npm install
bash
mv .env.example .env
bash
TURSO_DATABASE_URL="libsql://db-name-user.turso.io"
TURSO_AUTH_TOKEN="longtoken"
# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
# NOTE: NEXTAUTH_SECRET is required for production
# NEXTAUTH_SECRET=""
NEXTAUTH_URL="http://localhost:3000"
# Next Auth Discord Provider
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""
# Next Google Auth Provider
GOOGLE_CLIENT_ID="your-app.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="GOCXXX-XXXX-XXXXXXXXXXXXX"
# Core
# This is used to generated urls server side and client side
NEXT_PUBLIC_REDIRECT_URL="https://ugurly.vercel.app"
bash
npm run dev
Open your browser and go to http://localhost:3000
to use your self-hosted Ugurly URL shortener.