Get up and running with the Spoo.me API in just a few minutes. This guide will show you how to make your first API call and shorten your first URL.

Step 1: Make Your First API Call

No registration or API keys required! You can start using the Spoo.me API immediately.

curl -X POST https://spoo.me \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=https://example.com"

Expected Response:

{
  "short_url": "https://spoo.me/abc123"
}

Step 2: Try Advanced Features

Try features like password protection, custom aliases, and emoji URLs.

Custom Alias

curl -X POST https://spoo.me \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=https://github.com/spoo-me" \
  -d "alias=github"

Password Protection

curl -X POST https://spoo.me \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=https://example.com" \
  -d "password=SecurePass123@"

Step 3: Get URL Statistics

Retrieve analytics for your shortened URL:

curl -X POST https://spoo.me/stats/abc123 \
  -H "Content-Type: application/x-www-form-urlencoded"

Step 4: Try Emoji URLs

Create fun URLs using emojis:

curl -X POST https://spoo.me/emoji \
  -H "Accept: application/json" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "url=https://example.com" \
  -d "emojies=🚀🌟"

Common Use Cases

Marketing Campaigns

# Track campaign performance
campaign_url = shorten_url(
    "https://mysite.com/campaign",
    alias="summer2024",
    max_clicks=1000
)

Social Media

# Create shareable social links
social_url = shorten_url(
    "https://mysite.com/article",
    alias="latest-post"
)

Email Marketing

# Track email click-through rates
email_url = shorten_url(
    "https://mysite.com/newsletter",
    alias="newsletter-jan"
)

QR Code Generation

# Create QR-friendly URLs
qr_url = shorten_url(
    "https://mysite.com/menu",
    alias="menu"
)

Next Steps

1

Explore API Endpoints

Check out all available endpoints in our API Reference

2

Install Python Library

Use our Python library for easier integration

3

Add SpooBot to Discord

Try our Discord bot for team collaboration

4

Monitor Rate Limits

Understand rate limiting to optimize your usage

Error Handling

Always handle potential errors in your applications:

import requests

def safe_shorten_url(url, **kwargs):
    try:
        response = requests.post(
            "https://spoo.me",
            headers={"Accept": "application/json"},
            data={"url": url, **kwargs}
        )
        
        if response.status_code == 200:
            return response.json()["short_url"]
        elif response.status_code == 429:
            print("Rate limit exceeded. Please wait.")
            return None
        else:
            error_data = response.json()
            print(f"Error: {error_data.get('error', 'Unknown error')}")
            return None
            
    except requests.RequestException as e:
        print(f"Request failed: {e}")
        return None

# Usage
short_url = safe_shorten_url("https://example.com", alias="test")
if short_url:
    print(f"Success: {short_url}")

Testing Your Integration

Use these test URLs to verify your integration:

Test URLs:

  • https://httpbin.org/json - Returns JSON response
  • https://httpbin.org/delay/2 - Simulates slow loading
  • https://example.com - Simple test page

Need Help?

You’re now ready to start building with the Spoo.me API! 🚀