REST API

Base URL: https://urlik.xyz/api/. Responses are JSON of the form:

{ "status": "success", "message": "...", "return": { ... } }

Authentication (optional for basic shortening) — the X-Api-Key header. Your key is in your account. Links created with a key are attached to your account.

Endpoints

POST /api/getLink.json

Create a short link.

ParameterRequiredDescription
urlrequiredtarget URL (http/https)
aliasoptionalcustom code, 2–32 chars [a-zA-Z0-9_-]
modeoptionalredirect (default), preview, frame
expireoptionallifetime in seconds (0 = never)
passwordoptionalpassword to follow the link
curl -X POST https://urlik.xyz/api/getLink.json \
 -H "X-Api-Key: YOUR_KEY" \
 -d "url=https://example.com/very/long/path" \
 -d "mode=redirect"
{ "status":"success", "return":{
 "hex":"a1b2c3", "url":"https://urlik.xyz/a1b2c3",
 "qr":"https://urlik.xyz/qr/a1b2c3.png",
 "stats":"https://urlik.xyz/a1b2c3+", "mode":"redirect" } }

POST /api/stats.json

Stats for a link. The code parameter is the short code. Returns the click count, a daily series, sources, devices and browsers.

POST /api/links.json

List your links. Requires X-Api-Key.

POST /api/update.json

Update a link (code + fields url, mode, expire, password). Requires a key/session.

POST /api/delete.json

Delete a link (code). Requires X-Api-Key or the owner's session.

Media downloader, QR codes and temporary email

These methods require the X-Api-Key header (your key is in your account) or a call through RapidAPI.

MethodParametersDescription
GET /api/download.jsonurl*download video/photo from 1000+ sites (TikTok, YouTube, Instagram…): returns formats with ready signed download links (MP4/MP3/image)
GET /api/qr.jsondata*, format, fg, bg, ecc, sizeQR code: format = png/svg, colors fg/bg
GET /api/mailbox.jsonaddress or usernameget or create a temporary address
GET /api/messages.jsonaddresslist messages in a temporary inbox
GET /api/message.jsonaddress, idread a single message

Pruébalo en vivo

Explora y llama a cada endpoint aquí mismo. Pega tu clave de API con el botón Authorize para hacer peticiones autenticadas.

Insertar el acortador

Pegue este fragmento en cualquier página para añadir un acortador de URL funcional con enlace a urlik.xyz:

<iframe src="https://urlik.xyz/embed" style="width:100%;max-width:520px;height:150px;border:0" title="URL shortener by urlik.xyz" loading="lazy"></iframe>

/embed ↗

Una API REST sencilla para enlaces cortos

La API REST de Urlik te permite crear, leer, actualizar y eliminar enlaces cortos desde tu propio código y obtener las estadísticas de clics en JSON. Es una API HTTPS sin complicaciones — envías una petición POST y recibes una respuesta JSON predecible — así que funciona desde cualquier lenguaje o plataforma.

El acortado básico no necesita credenciales. Para asociar los enlaces a tu cuenta y gestionarlos después, envía tu clave en la cabecera X-Api-Key, que encontrarás en tu cuenta. Las respuestas siguen siempre la misma estructura de status, message y return que se muestra abajo.

¿Necesito una clave API?

No para el acortado básico — puedes crear un enlace de forma anónima. Una clave, disponible en tu cuenta, asocia los enlaces a ti y es necesaria para listarlos, actualizarlos o eliminarlos.

¿En qué formato están las respuestas?

Cada endpoint devuelve JSON con un status, un message legible y un objeto return con los datos, así que el análisis es consistente entre llamadas.

¿Hay un límite de peticiones?

Sí, las peticiones tienen un límite por cliente para mantener el servicio rápido y justo. Las claves autenticadas tienen un margen mayor que el tráfico anónimo.

¿Puedo usarla desde cualquier lenguaje?

Sí. Es una API JSON sobre HTTPS estándar, así que cualquier cosa capaz de enviar una petición POST — curl, Python, PHP, JavaScript o Go — puede usarla.

A qué búsquedas responde esta página