> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://statpad.dev/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://statpad.dev/docs/_mcp/server.

# Origins, attribution and limits

> The origin formats an embed key accepts and refuses, how quickly revoking or editing a key takes effect, the attribution lines and which plan drops one, the leagues widgets cover, limits and error codes.

## Origins

An origin is a scheme and host, as the browser's address bar shows it, with no path. A key works only on the origins you list for it, from 1 to 10 per key.

| You list                | It allows                                                                                                                                                              |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `https://example.com`   | That host only. `https://www.example.com` is a different origin.                                                                                                       |
| `https://*.example.com` | Every subdomain, at any depth: `https://www.example.com`, `https://news.example.com`, `https://live.news.example.com`. Not `https://example.com` itself, so list both. |
| `http://localhost:3000` | Your machine on that port, while you build. The port is required.                                                                                                      |

The portal lower-cases each origin, drops a trailing slash and converts a Unicode host to its ASCII form, so `https://bücher.de` is stored as `https://xn--bcher-kva.de`. It marks a row that repeats another, after those changes, as already listed, so remove the duplicate before you save.

These are refused:

| Origin                                                           | Why                                                                                                                                   |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `http://example.com`                                             | Use `https`. Only `localhost` may use `http`.                                                                                         |
| `http://127.0.0.1:3000`                                          | Use `http://localhost:3000`.                                                                                                          |
| `http://localhost`                                               | Add the port.                                                                                                                         |
| `https://example.com:8443`                                       | `https` origins use the default port, so leave it out.                                                                                |
| `https://example.com/blog`                                       | An origin has no path.                                                                                                                |
| `https://intranet`, `https://localhost`                          | The host needs at least two labels, such as `example.com`.                                                                            |
| `https://*.com`                                                  | A wildcard needs a domain after it.                                                                                                   |
| `https://*.co.uk`, `https://*.vercel.app`, `https://*.github.io` | A wildcard can't cover a public suffix, a domain anyone can register under. List your own domain, such as `https://*.yoursite.co.uk`. |
| `https://www.*.example.com`, `https://*.*.example.com`           | A wildcard goes only at the start, once.                                                                                              |
| `https://statpad.dev`, `https://*.statpad.dev`                   | Statpad's own hosts. For iframes and apps, use the [hosted page switches](/docs/embeds/hosted-pages#turn-them-on-for-a-key) instead.  |

The portal marks a refused origin on its row and says why.

## How fast changes take effect

Statpad caches a key's settings in a few places for short times, so a change to the key reaches pages within a few minutes, not at once:

| Change                              | Reaches the page                                                                                                     |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Add an origin                       | New page loads, and open widgets that showed **Not available on this site**, within a few minutes, without a reload. |
| Remove an origin, or revoke the key | Open widgets and hosted pages stop within a few minutes.                                                             |
| Turn a hosted page switch on or off | New hosted page loads within a few minutes. Open hosted pages that relied on it stop within a few minutes.           |

A scores list pinned to a past day, such as `date="2026-11-09"`, whose games are all final, is the one exception. That answer can't change, so Statpad caches it for an hour, and a site you removed can keep showing it for up to an hour.

Revoking a key can't be undone. Its widgets show **Embed key revoked**, and your other embed keys and your API keys keep working. To move a site to a new key, create the new key, update the page, then revoke the old one.

When your account loses active access, such as when the trial ends without a subscription, its widgets show **Not included** until access returns.

## Attribution

Every widget has a footer with up to two lines:

* **Not affiliated with any league or team.** It shows on every plan.
* **Powered by Statpad**, which links to statpad.dev. It shows on every plan except Business.

| Plan      | Not affiliated line | Powered by Statpad |
| --------- | ------------------- | ------------------ |
| Pro trial | Shown               | Shown              |
| Developer | Shown               | Shown              |
| Pro       | Shown               | Shown              |
| Business  | Shown               | Left out           |

The widget reads your plan with its data, so the line goes within a few minutes of your account moving to Business. Don't hide, cover or restyle either line. [Section 17 of the Terms](https://statpad.dev/terms#embeds) covers what you may and may not do with widgets.

## Leagues

Widgets cover football and basketball:

| League                                  | Alias   | Sport      |
| --------------------------------------- | ------- | ---------- |
| National Football League                | `nfl`   | Football   |
| NCAA Division I FBS Football            | `ncaaf` | Football   |
| National Basketball Association         | `nba`   | Basketball |
| NCAA Division I Men's Basketball        | `ncaab` | Basketball |
| Women's National Basketball Association | `wnba`  | Basketball |

A widget shows only leagues your account holds. A league it doesn't hold answers `no_access`, which shows as **Not included**. Hockey and soccer aren't covered yet: for a hockey or soccer league your account holds, a widget gets `not_found`, which shows as **League not available** in a scores list and **Game not found** in a scoreboard.

What each sport shows:

* **Football:** a helmet in each team's colours, the team with the ball, and during play the down and distance and the ball's spot. The expanded scoreboard adds timeouts, the red zone and the last play, labelled when it's a **Touchdown**, **Field goal**, **Safety**, **Interception** or **Fumble**.
* **Basketball:** a disc in each team's colours, and which team is in the bonus. The expanded scoreboard adds each team's fouls and timeouts left.

The clock is the game clock as of the last play. It doesn't tick between updates.

## Limits

| Limit                               | Value                                                                                |
| ----------------------------------- | ------------------------------------------------------------------------------------ |
| Active embed keys per account       | 5, on every plan. Revoked keys don't count.                                          |
| Origins per key                     | 1 to 10                                                                              |
| Views                               | Counted per widget load and shown on the Embeds page. Not capped, and never charged. |
| Request allowance, rate and streams | Embeds use none of them.                                                             |
| Days a scores list can show         | 2026-08-01 to 14 days after today                                                    |
| `max` on a scores list              | 100                                                                                  |
| How often a widget checks           | About every 4 seconds while a game is live, 30 seconds before, 60 once final         |

Creating a sixth key fails with **You have 5 embed keys, the most an account can have**. An account without an active plan can't create embed keys.

Statpad throttles traffic that reaches it at an unusual rate, from one address or for one key. A throttled widget gets `rate_limited`, keeps its last data up and tries again.

## Error codes

A widget reports these in [`statpad-error`](/docs/embeds/elements#events) and shows the matching [message](/docs/embeds/elements#states-and-messages).

| Code                 | Status | Meaning                                                                         | Fix                                            |
| -------------------- | ------ | ------------------------------------------------------------------------------- | ---------------------------------------------- |
| `origin_not_allowed` | `403`  | The page's origin isn't on the key.                                             | Add the origin to the key.                     |
| `key_revoked`        | `403`  | The key was revoked.                                                            | Create a new key and update the page.          |
| `no_access`          | `403`  | The account has no active plan, or doesn't hold the league.                     | Subscribe, or use a league your plan includes. |
| `key_unknown`        | `404`  | No embed key has this value.                                                    | Copy the key again from the Embeds page.       |
| `not_found`          | `404`  | No such game or league, or a league your account holds that embeds don't cover. | Check `league` and `game`.                     |
| `invalid_request`    | `400`  | A missing or malformed key, league or game, or a `date` out of range.           | Check the attributes.                          |
| `rate_limited`       | `429`  | Too many requests from one address, or for one key.                             | None. The widget retries.                      |
| `unavailable`        | `503`  | Statpad couldn't answer.                                                        | None. The widget retries.                      |
| `network`            |        | No answer within 10 seconds.                                                    | None. The widget retries.                      |
| `invalid_response`   |        | An answer the widget couldn't read.                                             | None. The widget retries.                      |

A hosted page's checks can also stop it with these, shown as **Not available on this site**:

| Code             | Meaning                                                     | Fix                                                               |
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------------------- |
| `iframes_off`    | The page is in an iframe and the key doesn't allow iframes. | Turn on **Iframes on these sites**.                               |
| `apps_off`       | The page is in an app and the key doesn't allow apps.       | Turn on **Mobile apps**.                                          |
| `parent_unknown` | The page can't tell which site is framing it.               | See [Referrer-Policy](/docs/embeds/hosted-pages#referrer-policy). |