Spiral gives your agent every tool with one account. Browse the tools →

opencode · Public Records

How to Use OpenSecrets race top contributors in opencode

Returns the top contributing organizations associated with candidates in a federal race. Use it to compare funding sources, remembering that organization totals can include affiliated individuals' donations.

Prompts to try with OpenSecrets race top contributors in opencode

Copy an example into opencode, or ask in your own words.

Use OpenSecrets race top contributors for New Hampshire's 2022 U.S. Senate race. Build a comparison of the organizations listed for Maggie Hassan and Don Bolduc.

OpenSecrets race top contributorsopencode
Try asking
  • Use OpenSecrets race top contributors for Arizona's 2024 U.S. Senate race. Add the returned organization rankings to this project's race detail view with a clear explanation of associated contributions.

  • Use OpenSecrets race top contributors to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from OpenSecrets race top contributors and tell me what changed since last week.

  • Check OpenSecrets race top contributors and summarize what you find in three bullet points.

How to set up OpenSecrets race top contributors in opencode

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

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode 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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run OpenSecrets race top contributors

    One request; the result comes back by polling or a webhook.

    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": "opensecrets-org/campaign-finance/race_top_contributors",
        "input": {
          "state": "<state>",
          "office": "senate"
        }
      }'

Then paste one of the prompts above: opencode finds OpenSecrets race top contributors on Spiral, shows the price and runs it.

OpenSecrets race top contributors providers and prices

Spiral runs OpenSecrets race top contributors through Alexandria. Open a card for today's price, with every fee included.

AlexandriaPublic Records
OpenSecrets race fundraising and top donors · Race top contributors
opensecrets-org/campaign-finance/race_top_contributors

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Officesenate or house

senate (U.S. Senate) or house (U.S. House, needs district).

Cycle2000 to 2026

Election cycle (even year). Defaults to 2026. When OpenSecrets has no data for that cycle yet it answers with its latest cycle and says so in note.

District0 to 53

U.S. House district number, required for office=house; 1 (or 0) for an at-large seat. Ignored for other offices.

Every API field of OpenSecrets race fundraising and top donors · Race top contributors is on its tool page: open its card above.

What can you do with OpenSecrets race top contributors in opencode?

Build a race finance view that compares reported campaign totals or leading associated organizations. A coding agent can use OpenSecrets results to populate tables and write explanations of organization attribution.

Prepare a race finance briefing

Compare candidates' reported fundraising, spending, and cash on hand, then add the organizations associated with their largest contributions.

Build a local election explainer

Explain a House race's funding picture with candidate finance totals and organization donor rankings. Label organization totals as associated contributions.

Prepare candidate interview questions

Use a candidate's spending and cash position alongside their leading associated organizations to draft questions grounded in reported campaign finances.

Compare funding across election cycles

Retrieve the same federal race in multiple election cycles to examine changes in campaign totals and leading associated organizations.

Monitor published campaign finance changes

Check a federal race periodically for changes in fundraising totals and organization rankings. Summarize changes only when the source returns new figures.

Create a campaign finance classroom exercise

Have students compare two federal candidates' finances and associated organizations, then explain what an organization total represents.

Questions about OpenSecrets race top contributors in opencode

Can opencode use OpenSecrets race top contributors?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run OpenSecrets race top contributors like any built-in tool.

How much does OpenSecrets race top contributors cost in opencode?

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

Do I need an Alexandria account to use OpenSecrets race top contributors in opencode?

No. Spiral runs OpenSecrets race top contributors on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up OpenSecrets race top contributors in opencode?

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

Does opencode wait while OpenSecrets race top contributors runs?

OpenSecrets race top contributors runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Where does OpenSecrets get campaign finance figures?

Federal campaign figures originate with Federal Election Commission reports. Governor figures use state disclosure data collected by OpenSecrets, formerly FollowTheMoney.

Does an OpenSecrets data date include every donation through that day?

No. OpenSecrets says disclosure delays mean its data is not necessarily complete through the displayed date. Governor figures can lag by an election cycle.

Do these contributor rankings cover governor candidates?

The documented organization rankings cover federal candidates. Governor fundraising uses a separate state disclosure source.

Does a listed organization total mean the organization donated that money itself?

It can combine the organization's PAC contributions with donations from associated individuals, including employees, owners, and their immediate families. Describe it as money associated with the organization.

Does public access make OpenSecrets data unrestricted for reuse?

OpenSecrets' published OpenData guide specifies attribution, noncommercial use, and share-alike terms. It also requires for-profit organizations to obtain a data license.

Get started

Start using OpenSecrets race top contributors in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options