# Link preview

1 endpoints.

## Read Open Graph metadata for a URL

```http
POST https://orbitwrite.com/api/v1/link-preview
```

Fetches a public URL and returns its Open Graph / Twitter card metadata for rendering a link preview. Private, loopback and non-HTTP addresses are rejected.

**Authentication:** bearer token or session cookie.

### Request body (`application/json`)

- `url` (string, required)

### Responses

#### 200

Metadata for the URL

- `preview` (LinkPreview, required)
  - `url` (string, required) — The URL the metadata was read from, after redirects — may differ from the requested one.
  - `title` (string | null, required)
  - `description` (string | null, required)
  - `image` (string | null, required)
  - `siteName` (string | null, required)
  - `type` (string, required, one of `video`, `article`) — `video` when the page advertises video content (og:type, a Twitter player card, or a known video host), `article` otherwise. Drives the player-card layout in the composer.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 429

Rate limit exceeded

- `error` (string, required)
- `issues` (any[], optional)
