Skip to content

API and webhooks

Everything on this site comes from a public API you can use too: newsrooms, observer groups, tabulators and lawyers. Reading is free. Heavier use and webhooks need a key, so abuse can be traced to an account and switched off without slowing anyone else down.

Limits

Get a key

  1. Create an account.
  2. Pay the one-off verification fee. It stops people creating duplicate accounts.
  3. Create your own keys on your account page, and revoke them whenever you like.

Send the key as an x-api-key header. Newsrooms, observer groups, researchers and courts we work with are made partners: no fee, higher limits.

Start here

The full reference, with every endpoint, is at https://countam-api.2-31-119-246.sslip.io/docs. A few calls cover most needs:

curl https://countam-api.2-31-119-246.sslip.io/api/v1/stats/2026-OSUN-GOV
curl "https://countam-api.2-31-119-246.sslip.io/api/v1/units/29-11-07-010/sheets?election=2026-OSUN-GOV"
curl https://countam-api.2-31-119-246.sslip.io/api/v1/rollups/2026-OSUN-GOV/29-11
curl "https://countam-api.2-31-119-246.sslip.io/api/v1/leads?election=2026-OSUN-GOV&severity=high"
curl https://countam-api.2-31-119-246.sslip.io/api/v1/proofs/<fingerprint>

Use it from your AI assistant (MCP)

Count Am is also an MCP server, so you can ask Claude, ChatGPT or any assistant that supports the Model Context Protocol about the result sheets directly. Your assistant does the thinking; Count Am only answers with checked figures and links to the evidence, and tells the assistant never to call a winner or a flag "fraud". It is free and needs no key.

The address:

https://countam-api.2-31-119-246.sslip.io/api/v1/mcp

Claude Code:

claude mcp add --transport http count-am https://countam-api.2-31-119-246.sslip.io/api/v1/mcp

Without a key you get 20 calls a minute, counted by internet address: enough to try it (a question takes about 3 to 8 calls). A verified API key gives six times as much, 120 a minute for your account (partners 600), and isn't slowed when many people without keys are using it. Send the key as a header, never in the address:

claude mcp add --transport http count-am https://countam-api.2-31-119-246.sslip.io/api/v1/mcp \
  --header "Authorization: Bearer sp_your_key"

Claude, ChatGPT and other apps: add a custom connector (sometimes called a remote MCP server) with the address above. Tools: list_races, race_summary, find_polling_units, polling_unit, sheet, verify_sheet, problems_flagged, problem, race_patterns, collation, recent_changes and run_query (exact counts and totals from a checked query language).

Stay in sync

Every change is an event in one ordered log. Keep the last cursor you saw and ask for what came after. Nothing is ever skipped, even if you were offline all night.

curl "https://countam-api.2-31-119-246.sslip.io/api/v1/events?after=0&limit=500"
# → { events: [...], cursor: 500 }  then  ?after=500

Or have the same events pushed to you. With a key, register your own endpoint; you get its signing secret once:

curl -X POST https://countam-api.2-31-119-246.sslip.io/api/v1/webhooks -H "x-api-key: $KEY" -H "content-type: application/json" \
  -d '{"owner":"Election desk","url":"https://example.org/hooks/sheetproof","events":["lead.created","sheet.withdrawn"],"areas":["29"]}'

Each delivery is signed so you can tell it came from us. An endpoint that fails 100 times in a row is switched off; turn it back on with POST /webhooks/<id>/enable.

CountAm-Signature: t=1768557000,v1=<hex HMAC-SHA256 of "t.body" with your secret>
CountAm-Event-Id:  the idempotency key (drop repeats)

// Node
const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
const ok = crypto.timingSafeEqual(Buffer.from(v1, "hex"),
  crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest());
sheet.first_seenA sheet appeared for a polling unit for the first time. Carries its fingerprint.
sheet.replacedA unit's sheet changed to a different file, or went back to an earlier one.
sheet.withdrawnA sheet that was on the portal has been taken down. Our sealed copy stays.
sheet.swapped_silentlyThe file behind a portal link changed without its upload time changing.
sheet.retimedThe portal changed a sheet's upload time; the file itself is identical.
sheet.extractedAI finished reading the sheet, with its figures and the arithmetic checks.
sheet.disputedThe two AI readings differed and AI couldn't settle it. A person will read it.
unit.missingNo sheet some hours after polls closed.
lead.createdA new problem flagged, with its evidence and any votes moved.
lead.reviewedA reviewer looked at a flag and recorded what they concluded, with their note.
collation.recorded / collation.mismatchAn announcement was recorded, or it can't be squared with the sheets.
rollup.updatedThe sum of read sheets changed. Points at the fresh bulk file.
anchor.sealedA batch of file fingerprints was sealed together, so none can be changed unnoticed.
source.changed / source.blocked / source.recoveredA source served something different, refused us, or came back.
notice.publishedA note about a change Count Am made to its own records, such as clearer wording. Nothing in our records changes without one.

Bulk files

On election night, don't poll the API for everything: download the bulk files, refreshed every few minutes. Every sheet version is one line of sheets.ndjson; the totals for the whole race, with each area inside it, are in rollup-NG.json.

curl https://countam-api.2-31-119-246.sslip.io/dumps/2026-OSUN-GOV/sheets.ndjson
curl https://countam-api.2-31-119-246.sslip.io/dumps/2026-OSUN-GOV/rollup-NG.json

Send us evidence

Partner organisations, such as accredited observer groups, can be given upload access: their keys can send photos of the sheet posted at a polling unit, which are then compared with the copy on INEC's portal.

curl -X POST https://countam-api.2-31-119-246.sslip.io/api/v1/submissions -H "x-api-key: <key>" \
  -F file=@sheet.jpg -F electionId=2026-OSUN-GOV -F unitCode=29-11-07-010

Search

Find a polling unit, an area or a file