---
title: "Preview a link"
description: "The same as Preview a bookmark, with limits of its own."
canonical_url: https://docs.markdrop.in/api/pages/preview-a-link
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Preview a link

`POST https://api.markdrop.in/api/v1/link-preview`

The same as [Preview a bookmark](https://docs.markdrop.in/api/pages/preview-a-bookmark), with limits of its own.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 300 per day, 30 per minute per IP address.

## Request body

`application/json`, required.

- `url` (string, required): The `http` or `https` link to preview. 1–2,048 characters.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X POST https://api.markdrop.in/api/v1/link-preview \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/blog/launch"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/link-preview", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://example.com/blog/launch"
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/link-preview",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"url": "https://example.com/blog/launch"},
)
r.raise_for_status()
print(r.json())
```
