[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [civicAPI live election results](https://spiral.ai/integrations/codex/civicapi-live-election-results)

# How to Use civicAPI live election results in Codex

Get candidate votes, percentages, reporting progress, winner calls, and nationwide seat tallies for US Senate, House, and governor races. Use it for an election overview before examining one contest in detail.

|  |  |
| --- | --- |
| Model | civicAPI live election results |
| Available through | Alexandria |
| Category | Public Records |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with civicAPI live election results in Codex

- Use civicAPI live election results for Georgia on November 3, 2026, and build a table in this project showing each returned contest's candidates, votes, percentages, reporting progress, and winner call.
- Use civicAPI live election results for nationwide House races on November 3, 2026, and add the returned party seat tally to this project's dashboard.
- Use civicAPI live election results to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from civicAPI live election results and tell me what changed since last week.
- Check civicAPI live election results and summarize what you find in three bullet points.

## How to set up civicAPI live election results in Codex

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run civicAPI live election results**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "civicapi-org/elections/live_results",
    "input": {
      "body": "<body>"
    }
  }'
```

Then paste one of the prompts above: Codex finds civicAPI live election results on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## civicAPI live election results tools and prices

- [civicAPI live election results and forecasts · Live results](https://spiral.ai/tools/alexandria/civicapi-org/elections/live_results) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| body |  | — | Alias of chamber. Same values as office. |
| date |  | — | Election date YYYY-MM-DD, a datetime starting with that, or M/D/YYYY. Defaults to 2026-11-03. election_date is an alias. |
| race |  | — | Alias of chamber. Same values as office. |
| seat |  | — | Alias of chamber. Same values as office. |
| type |  | — | Alias of chamber. civicAPI's office name, or senate, house, governor, all. |
| state |  | — | US state: a two-letter code (GA) or a name (Georgia). location, province, and state_code are aliases. |

## What can you do with civicAPI live election results in Codex?

Build an election dashboard with civicAPI race ratings, counted votes, or county returns. A coding agent can turn the returned records into tables and charts that keep expectations separate from results.

### Prepare a state election briefing

Build a Georgia briefing with Senate and governor ratings, reported vote totals, and county detail for selected contests. Give forecast expectations and counted votes separate sections.

### Build a newsroom results dashboard

Show nationwide seat tallies, individual race totals, and county drilldowns. Add available Senate and governor ratings as context beside the results.

### Maintain an editorial watchlist

Select Senate contests from civicAPI's ratings, then follow their vote totals and county returns. Use the watchlist to decide which races need a closer reported update.

### Teach forecasts and election returns

Create a classroom exercise comparing Senate race ratings with reported outcomes and county vote patterns. Ask students to distinguish an expectation, a lead, and a winner call.

### Review expectations against reported outcomes

Compare available Senate and governor ratings with the corresponding reported results. Examine county totals in races where the reported outcome differs from the rating's direction.

### Produce a recurring election desk digest

Summarize changes in race ratings, vote totals, and winner calls since the previous check. Add county detail for contests selected by the editor and credit civicAPI in the digest.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Codex guides](https://spiral.ai/integrations/codex)

## civicAPI live election results in other agents

- [Amp](https://spiral.ai/integrations/amp/civicapi-live-election-results)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/civicapi-live-election-results)
- [Claude](https://spiral.ai/integrations/claude-desktop/civicapi-live-election-results)
- [Claude Code](https://spiral.ai/integrations/claude-code/civicapi-live-election-results)
- [Cline](https://spiral.ai/integrations/cline/civicapi-live-election-results)
- [Cursor](https://spiral.ai/integrations/cursor/civicapi-live-election-results)
- [Devin](https://spiral.ai/integrations/devin/civicapi-live-election-results)
- [dots](https://spiral.ai/integrations/dots/civicapi-live-election-results)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/civicapi-live-election-results)
- [Gemini](https://spiral.ai/integrations/gemini/civicapi-live-election-results)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/civicapi-live-election-results)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/civicapi-live-election-results)
- [goose](https://spiral.ai/integrations/goose/civicapi-live-election-results)
- [Grok](https://spiral.ai/integrations/grok/civicapi-live-election-results)
- [Grok Build](https://spiral.ai/integrations/grok-build/civicapi-live-election-results)
- [Hermes](https://spiral.ai/integrations/hermes/civicapi-live-election-results)
- [Instinct](https://spiral.ai/integrations/instinct/civicapi-live-election-results)
- [Manus](https://spiral.ai/integrations/manus/civicapi-live-election-results)
- [Muse](https://spiral.ai/integrations/muse/civicapi-live-election-results)
- [Muse Code](https://spiral.ai/integrations/muse-code/civicapi-live-election-results)
- [n8n](https://spiral.ai/integrations/n8n/civicapi-live-election-results)
- [Notion](https://spiral.ai/integrations/notion/civicapi-live-election-results)
- [OpenClaw](https://spiral.ai/integrations/openclaw/civicapi-live-election-results)
- [opencode](https://spiral.ai/integrations/opencode/civicapi-live-election-results)
- [Perplexity](https://spiral.ai/integrations/perplexity/civicapi-live-election-results)
- [Raycast](https://spiral.ai/integrations/raycast/civicapi-live-election-results)
- [VS Code](https://spiral.ai/integrations/vscode/civicapi-live-election-results)
- [Windsurf](https://spiral.ai/integrations/windsurf/civicapi-live-election-results)
- [Zapier](https://spiral.ai/integrations/zapier/civicapi-live-election-results)

## More Codex guides

- [civicAPI election race details](https://spiral.ai/integrations/codex/civicapi-election-race-details)
- [legislation.gov.uk amendment records](https://spiral.ai/integrations/codex/legislation-gov-uk-amendment-records)
- [civicAPI election forecast](https://spiral.ai/integrations/codex/civicapi-election-forecast)
- [legislation.gov.uk identifier lookup](https://spiral.ai/integrations/codex/legislation-gov-uk-identifier-lookup)
- [World Happiness Report edition downloads](https://spiral.ai/integrations/codex/world-happiness-report-edition-downloads)
- [legislation.gov.uk legislation search](https://spiral.ai/integrations/codex/legislation-gov-uk-legislation-search)

## Questions about civicAPI live election results in Codex

**Can Codex use civicAPI live election results?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run civicAPI live election results like any built-in tool.

**How much does civicAPI live election results cost in Codex?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need an Alexandria account to use civicAPI live election results in Codex?**

No. Spiral runs civicAPI live election results on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up civicAPI live election results in Codex?**

About two minutes: add the hosted server, then sign in.

**Does Codex wait while civicAPI live election results runs?**

civicAPI live election results runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

**Where does civicAPI get election results?**

It aggregates results from secretaries of state and equivalent election bodies, including state and county boards. Smaller elections and certain countries may rely on local media reports.

**How quickly do election results update?**

civicAPI says its system updates every 5 to 10 seconds during active elections. That schedule describes results; it does not establish the forecast's refresh interval.

**Does forecast coverage match results coverage?**

The public forecast page describes Senate and governor ratings and currently shows no House forecast data. House results coverage does not establish that House forecasts are available.

**Can a newsroom or business publish civicAPI data?**

Yes. civicAPI permits commercial and noncommercial use, with attribution required for nonpersonal projects. Link to civicAPI or credit it by name.

