Embed a race
A live forecast card for an article, newsletter or blog post: the chance, the margin, the rating and how the forecast has moved. It updates itself, so the number on your page is the number on ours.
Try it
Pick a race, a theme and a size, then copy the snippet. Search by state, district (MI-07) or candidate.
<script src="https://www.callthemap.com/embed.js" data-race="house/va-01" data-theme="auto" data-variant="card"></script><iframe src="https://www.callthemap.com/embed/house/va-01?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/house/va-01"><img src="https://www.callthemap.com/embed/house/va-01/image?theme=auto" alt="Call the Map forecast" width="800" height="420"></a>Embed the early vote
A state’s ballots so far, the party split where the state publishes one (registration, not votes) and the change from the same point of 2022 where the counts allow. It updates with the counts.
<script src="https://www.callthemap.com/embed.js" data-race="early-vote/us" data-theme="auto" data-variant="card"></script><iframe src="https://www.callthemap.com/embed/early-vote/us?theme=auto&variant=card" width="480" height="300" style="border:0;max-width:100%" sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox" title="Call the Map early vote: Every state counted"></iframe><a href="https://www.callthemap.com/early-vote"><img src="https://www.callthemap.com/embed/early-vote/us/image" alt="Call the Map early vote: Every state counted" width="800" height="420"></a>The address is /embed/early-vote/<state>, by two-letter code (/embed/early-vote/nc), or /embed/early-vote/us for every state counted; with embed.js, use data-race="early-vote/nc". Pasting https://www.callthemap.com/early-vote on its own line in a CMS that reads oEmbed expands it the same way. The counts themselves are downloads: US.csv (one row per state) and /early-vote/data/NC.csv for one state’s days and counties, each with a .json twin, all listed at /early-vote/data. Free to use with credit to Call the Map (callthemap.com/early-vote). Counts that come from civicAPI say so on the card and in the files, and must be credited to civicAPI too.
Any race
Every race the site forecasts has an embed at the same address as its page, under /embed/ instead of /:
/embed/senate/<state>, for example/embed/senate/north-carolina/embed/house/<district>, for example/embed/house/ca-39/embed/governors/<state>, for example/embed/governors/georgia
Two query parameters control appearance: theme (light, dark, or auto to 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. Ghost reads it, and so does WordPress for administrators and editors (WordPress embeds from sites outside its own list only for users allowed to post unfiltered HTML): paste a race page URL on its own line and the editor expands it into the live card with no code at all. An editor that embeds only from its own list of sites shows the URL as a plain link; there, paste the iframe snippet above where the editor takes HTML, or the card’s static image where it does not. 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 are public and need no key:
/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, for example 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. |