Introducing the Shotcut.in Python API Client

Kavya
Kavya Published on February 09, 2025

Introducing the Shotcut.in Python API Client

We are excited to announce the release of the Shotcut Python API Client, a powerful and easy-to-use Python package for interacting with Shotcut.in, the leading URL shortener and link management platform. This package simplifies access to Shotcut.in’s robust API, allowing developers to seamlessly integrate URL shortening, QR code generation, campaign management, branded domains, and more into their Python applications.

Why Use the Shotcut Python API Client?

The Shotcut Python API Client provides a streamlined and efficient way to leverage Shotcut.in’s features within your applications. Here’s why you should consider using it:

  • Easy Integration: A simple, intuitive interface to interact with all Shotcut.in API endpoints.
  • Comprehensive Features: Supports URL shortening, QR code generation, tracking pixels, campaigns, CTA overlays, and more.
  • Error Handling: Built-in mechanisms to handle API errors, rate limits, and authentication issues.
  • Branded Domains: Manage custom short domains effortlessly.
  • Marketing and Analytics: Track link performance and optimize marketing campaigns.
  • Type Hints & IDE Support: Full typing support for better code suggestions and error checking.

Getting Started

Installation

Installing the Shotcut Python API Client is quick and easy. Simply run:

pip install shotcut-python

Quick Start Guide

Here’s how you can get started with the Shotcut API Client in just a few lines of code:

from shotcut import ShotcutAPI# Initialize the client  
api = ShotcutAPI(api_key="your_api_key_here")# Shorten a URL  
response = api.shorten_link(url="https://example.com", custom="my-custom-alias")  
print(response['shorturl'])# Generate a QR Code  
qr = api.create_qr_code(type="link", data="https://example.com")  
print(qr['link'])

Key Features

URL Shortening

  • Shorten long URLs with custom aliases.
  • Set expiration dates, passwords, and branded domains.
  • Manage and retrieve analytics for shortened links.

QR Code Generation

  • Generate high-quality QR codes.
  • Customize colors, logos, and formats.
  • Download QR codes for marketing and branding purposes.

Campaign Management

  • Organize links into marketing campaigns.
  • Track performance across different campaigns.
  • Assign links to specific campaigns for better tracking.

Branded Domains

  • Use your own domain for shortened links.
  • Configure redirections for homepage and 404 errors.

CTA Overlays & Splash Pages

  • Create engaging call-to-action overlays for links.
  • Customize splash pages for branding and promotions.

Tracking Pixels

  • Add tracking pixels for analytics and retargeting.
  • Manage multiple pixels for different platforms.

Error Handling

  • Handle API errors with descriptive messages.
  • Manage rate limits and authentication issues.

Example: Advanced API Usage

Fetching account details and managing links:

# Get account info  
account = api.get_account()  
print(account)# List all shortened URLs  
urls = api.list_links(limit=10, page=1)  
print(urls)

Contribution & Development

Want to contribute to the project? Here’s how you can get started:

  • Clone the repository:

git clone https://github.com/Shotcut-Track/shotcutapi-python.git

  • Install development dependencies: 

pip install -e ".[dev]" 

  • Run tests to ensure everything works correctly:

      pytest
 

 

Get Your API Key

To start using the Shotcut Python API Client, get your API key from the Shotcut Developer Portal.

Final Thoughts

The Shotcut Python API Client is designed to make URL shortening and link management seamless for developers. Whether you’re looking to create short links, manage QR codes, or analyze campaign performance, this package has you covered. Try it out today and simplify your link management with Shotcut.in!

For more details, check out the official repository: Shotcut API Python GitHub.

Keep reading

More posts from our blog