---
updatedAt: 2026-10-13T19:45:56.000Z
agentTools:
  projectIndex: https://developers.rebrandly.com/llms.txt
---

# SDKs and client libraries

Official Rebrandly client library for Python, with installation instructions and basic usage examples.

Official client libraries make it easier to integrate the Rebrandly API without writing HTTP boilerplate.

## Python SDK

Install the official Python SDK from PyPI:

```bash
pip install rebrandly-official
```

### Basic usage

```python
from rebrandly_official.rebrandly_client import RebrandlyClient

client = RebrandlyClient('YOUR_API_KEY')

# Create a short link
new_link = client.links.create('https://www.brandyour.link')

# Get a link
link = client.links.get('LINK_ID')

# Delete a link
client.links.delete('LINK_ID')
```

For the full SDK reference — all methods, parameters, and return values — see the [Python SDK documentation](https://developers.rebrandly.com/page/sdk-documentation).

### Source

* PyPI: [rebrandly-official](https://pypi.org/project/rebrandly-official/)
* GitHub: [rebrandly/rebrandly-python](https://github.com/rebrandly/rebrandly-python)

***

## Node.js / JavaScript

> **No official npm package is currently available for Node.js.**
>
> Node.js is the dominant runtime for API integrations. An npm package is in progress. Until then, use the REST API directly.

### REST API example (Node.js)

> **Node.js version:** This example uses the global `fetch` API, available natively from Node.js 18+. For older versions, install [`node-fetch`](https://www.npmjs.com/package/node-fetch) and import it at the top of your file: `import fetch from 'node-fetch'`.

```javascript
const REBRANDLY_API = "https://api.rebrandly.com";

async function createLink(destination, title) {
  const response = await fetch(`${REBRANDLY_API}/v1/links`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "apikey": process.env.REBRANDLY_API_KEY
    },
    body: JSON.stringify({ destination, title })
  });

  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }

  return response.json();
}
```

> When the npm package ships, it will include TypeScript types, native `fetch` support, and automatic retry with exponential backoff.

***

## Other languages

Multi-language code examples for core operations are available on the [API custom URL shortener page](https://developers.rebrandly.com/docs/api-custom-url-shortener).

The Rebrandly API follows REST conventions and can be called from any language that can make HTTPS requests. An OpenAPI 3.0 spec is available at [/openapi](/openapi) for generating client libraries in any language.

***

## MCP server

The Rebrandly MCP server enables AI coding tools (Claude Code, Cursor, and others) to manage links programmatically. See [MCP server documentation](https://developers.rebrandly.com/docs/mcp-server).