---
title: "Free shorten API"
description: "Shorten a URL with one POST request — no account, no API key."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.in.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Free shorten API

The simplest way to create a short link programmatically. **No account, no
API key, no configuration** — one request in, a short link out. Perfect for
scripts, bots, and side projects.

```bash
curl -X POST https://in.bio/api/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/very/long/link"}'
```

```json
{
  "short_url": "https://in.bio/a8K2p",
  "slug": "a8K2p",
  "qr_url": "https://in.bio/qr/a8K2p.png",
  "preview_url": "https://in.bio/preview/a8K2p",
  "expires": "Anonymous links are deleted after 30 days. Claim it with a free account to keep it and see click analytics.",
  "claim_url": "https://in.bio/register?claim=…",
  "docs": "https://docs.in.bio/api/free-shorten"
}
```

## Request

`POST https://in.bio/api/shorten` — JSON or form body, one field:

| Field | Type | Notes |
|---|---|---|
| `url` | string | Required. Max 2048 chars. `https://` is assumed if the scheme is missing |

## Responses

| Status | Body | Meaning |
|---|---|---|
| `201` | `{short_url, slug, qr_url, preview_url, claim_url, expires, docs}` | Link created |
| `422` | `{"error": "reason"}` | Invalid or unsafe URL (blocked destination, private address, re-shortened shortener…) |
| `429` | — | Rate limit hit; check `Retry-After` |

## Limits & rules

- **5 requests per minute** per IP, and 100 per day.
- Links are **anonymous**: they redirect immediately but can't be edited or
  tracked, and they're **deleted after 30 days** unless claimed via
  `claim_url`.
- Every destination goes through the same **phishing/malware safety scan**
  as the rest of INBIO — unsafe URLs are rejected or disabled.
- The `qr_url` serves a ready-to-use PNG QR code for the link.

## Examples

```js title="JavaScript"
const res = await fetch("https://in.bio/api/shorten", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://example.com/long" }),
});
const { short_url } = await res.json();
```

```python title="Python"
import requests

r = requests.post("https://in.bio/api/shorten", json={"url": "https://example.com/long"})
short_url = r.json()["short_url"]
```

:::tip
Need custom slugs, editing, analytics, or more volume? The
[authenticated API](/api) starts on the Pro plan with 60 requests/minute.
:::

Source: https://docs.in.bio/api/free-shorten/index.mdx
