# Embed a Live SnapCount Counter

Put a live SnapCount total on a web page with oEmbed, or on a stream as a transparent OBS overlay.

## oEmbed

Open a live session, choose Share, then Embed on a website to copy its embed URL (`https://snapcount.app/embed/SESSION_ID`). Pass it to the oEmbed endpoint:

- `url` (required): the embed URL.
- `maxwidth`: maximum iframe width in pixels, capped at 300.
- `maxheight`: maximum iframe height in pixels, capped at 200.

```bash
curl -G https://snapcount.app/api/oembed \
  --data-urlencode "url=https://snapcount.app/embed/SESSION_ID" \
  -d maxwidth=300
```

```json
{
  "type": "rich",
  "version": "1.0",
  "title": "Live Counter: Gate A",
  "author_name": "SnapCount",
  "author_url": "https://snapcount.app",
  "provider_name": "SnapCount",
  "provider_url": "https://snapcount.app",
  "cache_age": 60,
  "html": "<div ...><iframe src=\"https://snapcount.app/embed/SESSION_ID\" ...></iframe>...</div>",
  "width": 300,
  "height": 230,
  "thumbnail_url": "https://snapcount.app/og-v4.png"
}
```

## OBS overlay

In a live session, open Share, choose Embed on a website, then Stream overlay (OBS), and copy the overlay URL:

```text
https://snapcount.app/embed/SESSION_ID?bg=transparent&hideTitle=true&scale=2
```

1. In OBS, add a Browser Source to your scene.
2. Paste the overlay URL into the URL field.
3. Set the width and height to fit your layout, for example 400 by 200, and raise `scale` rather than stretching the source.
4. Leave the background alone: the page is already transparent.

The overlay updates live as anyone in the session counts, for as long as the session is open.

## Scoreboard overlay

A two-team scoreboard session shows both team names and scores side by side, like a score bug. Team names stay on in the overlay; tick Hide team names if your scene already has them. The overlay only displays the score, so keep scoring from the scoreboard page.
