Embed a race
A live, self-updating forecast card for any article, newsletter or blog post — the probability, the margin, the rating and, where we have one, a sparkline of how the forecast has moved. It stays current on its own: republish nothing, and the number on your page is the number on ours.
Try it
Pick a race, a theme and a size, then copy the snippet under it.
<script src="https://www.callthemap.com/embed.js" data-race="senate/texas" data-theme="auto" data-variant="card"></script><iframe src="https://www.callthemap.com/embed/senate/texas?theme=auto&variant=card" width="480" height="220" style="border:0;max-width:100%" sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox" title="Call the Map election forecast"></iframe><a href="https://www.callthemap.com/senate/texas"><img src="https://www.callthemap.com/embed/senate/texas/image?theme=auto" alt="Call the Map forecast" width="800" height="420"></a>Any race
Every race the site forecasts has an embed at the same address as its page, under /embed/ instead of /:
/embed/senate/<state>— e.g./embed/senate/north-carolina/embed/house/<district>— e.g./embed/house/ca-39/embed/governors/<state>— e.g./embed/governors/georgia
Two query parameters control appearance: theme (light, dark, or autoto follow the reader’s device) and variant (card for the full card, compact for a single summary row, or bar for just the probability bar).
Pasting a bare link
Every race page publishes an oEmbed discovery link. WordPress, Substack and Ghost all read it automatically — paste a race page URL on its own line and the editor expands it into the live card with no code at all. Anyone else can call the endpoint directly:
GET https://www.callthemap.com/api/oembed?url=https://www.callthemap.com/senate/texas&format=jsonTerms
Free to embed on any site, for any purpose, including commercial publications. Two conditions:
- Attribution stays visible. Every card carries a “Call the Map” link back to the full forecast; do not remove, hide or cover it.
- Link back, don’t republish the numbers as your own. Quoting a specific figure in your own text is fine with a citation; scraping the embed or the API to power a competing forecast display is not.
The card re-renders from the current forecast on every load; we do not track embed installs or usage, and the embed route sets no cookies. Questions about high-volume use: see contact.
The public JSON API
The embed reads the same data these endpoints serve. All are public, unauthenticated, CDN-cached and return the currently active edition:
/api/forecast/v1/active | Which edition is currently live, and whether it’s stale. |
/api/forecast/v1/metadata | Release identity, chamber toplines and freshness. |
/api/forecast/v1/races/<race_id> | One race’s full forecast record — e.g. SEN-TX, MI-07, GOV-OH. |
/api/forecast/v1/history | The dated forecast series behind every sparkline. |
/api/oembed?url=… | The oEmbed rich payload for any race page URL. |