# Preview a page's social card

`POST https://app.clik.so/api/links/og-preview`

> **In short:** Fetches a web page and returns the title, description and image that social apps would show for it. Use it to show a preview before you create a link.

## You need

* **API key permission:** `read`
* **Workspace role:** viewer or higher
* **Plan:** any plan, including Free

## Example

```bash
curl -X POST "https://app.clik.so/api/links/og-preview" \
  -H "Authorization: Bearer $CLIKSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/summer-sale"
  }'
```

Response 200:

```json
{
  "status": 200,
  "success": true,
  "message": "Success",
  "data": {
    "og_title": "Summer sale — 30% off everything",
    "og_description": "Our biggest sale of the year ends Sunday.",
    "og_image_url": "https://example.com/images/summer-sale.jpg"
  }
}
```

## Request body

| Field | Type         | Required | Description                      |
| ----- | ------------ | -------- | -------------------------------- |
| `url` | string · uri | yes      | The public http(s) page to read. |

## Common errors

| Status | Code               | When                                                                                  |
| ------ | ------------------ | ------------------------------------------------------------------------------------- |
| 401    | `UNAUTHORIZED`     | The API key is missing, malformed or unknown.                                         |
| 422    | `VALIDATION_ERROR` | `url` is missing, is not http(s), or points at a private address.                     |
| 429    | `RATE_LIMITED`     | More than 30 previews in a minute from this workspace, or the key's per-minute limit. |

## Good to know

* Rate limit: 30 calls per minute per workspace.
* It always answers `200` when the URL is valid, even if the page could not be read. Then the title and description are empty and the image is the site's icon.
* It only fetches public http(s) addresses. Private and local addresses are refused with `422`.
* This only reads the page. To set a custom preview on a link, send `og_preview` when you create or update it (Starter plan and up).

---

Source: https://clik.so/docs/api/links/preview-link
