URL Shortener API docs

Shorten URLs with click tracking, custom aliases, and expiration. Includes bulk shortening and QR code generation.

Authentication

All URL Shortener API requests authenticate via two headers. Get your API key from your RapidAPI dashboard after subscribing on the Basic (free) tier or higher.

X-RapidAPI-Key: YOUR_API_KEY
X-RapidAPI-Host: url-shortener-by-helix-api.p.rapidapi.com

Base URL

https://url-shortener-by-helix-api.p.rapidapi.com

Endpoints

POST
/shorten

Create short URL

GET
/resolve/{code}

Resolve short URL to original

GET
/stats/{code}

Get click stats

POST
/bulk

Shorten up to 10 URLs

Code Examples

Python

import requests

url = "https://url-shortener-by-helix-api.p.rapidapi.com/shorten"
headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "url-shortener-by-helix-api.p.rapidapi.com",
}

response = requests.post(url, headers=headers)
print(response.json())

JavaScript

const response = await fetch(
  "https://url-shortener-by-helix-api.p.rapidapi.com/shorten",
  {
    method: "POST",
    headers: {
      "X-RapidAPI-Key": "YOUR_API_KEY",
      "X-RapidAPI-Host": "url-shortener-by-helix-api.p.rapidapi.com"
    }
  }
);
const data = await response.json();

cURL

curl -X POST "https://url-shortener-by-helix-api.p.rapidapi.com/shorten" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: url-shortener-by-helix-api.p.rapidapi.com"

Response Format

All endpoints return JSON in this consistent envelope:

{
  "status": "ok",
  "data": { /* endpoint-specific payload */ },
  "meta": {
    "cached": false,
    "latency_ms": 142,
    "request_id": "req_abc123"
  },
  "timestamp": "2026-05-21T12:00:00Z"
}

Error Codes

HTTPCodeMeaning
400BAD_REQUESTMissing or invalid parameter
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENYour plan doesn't include this endpoint
429RATE_LIMIT_EXCEEDEDToo many requests — back off and retry
500INTERNAL_ERRORSomething went wrong on our side
503UPSTREAM_UNAVAILABLEA third-party data source is down

Common Use Cases

Marketing campaigns
Link tracking
SMS links
Social media
Affiliate links
Email newsletter links
Podcast show notes links
QR code short URLs
Mobile app deep links
Event invitation links
Customer survey links
Product launch links
Referral program links
Print ad tracking URLs
Influencer campaign links
App store redirect links
Support ticket links
Webinar registration links
Job posting short links
Invoice payment links

Related APIs

Ready to build with URL Shortener API?

Get API Key on RapidAPI

Start building with real APIs today

Free tier on every API, a live demo on every page, and a guide for each. No credit card to explore.

Helix-API Newsletter

Get new API launches, integration guides, and code examples in your inbox.