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

opencode · News & Media

How to Use NHPR news search in opencode

Find NHPR reporting by keyword, including candidates, races, and ballot questions. Use it when you know the subject you want to investigate rather than a particular story URL.

Prompts to try with NHPR news search in opencode

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

Use NHPR news search to find reporting about PFAS in Merrimack, New Hampshire, and add a linked reading list to this project's research notes.

NHPR news searchopencode
Try asking
  • Use NHPR news search to find New Hampshire school funding coverage and organize the relevant links by issue in this project's research notes.

  • Use NHPR news search to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from NHPR news search and tell me what changed since last week.

  • Check NHPR news search and summarize what you find in three bullet points.

How to set up NHPR news search 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 NHPR news search

    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": "nhpr-org/news/search_news",
        "input": {
          "query": "<query>"
        }
      }'

Then paste one of the prompts above: opencode finds NHPR news search on Spiral, shows the price and runs it.

NHPR news search providers and prices

Spiral runs NHPR news search through Alexandria. Open a card for today's price, with every fee included.

AlexandriaNews & Media

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page1 to 501

Result page, 10 results each.

Sortnewest, relevance, or oldestnewest

newest (default) puts the latest coverage first; relevance is NHPR's own ranking and can surface archive audio from the 1990s.

Every API field of NHPR New Hampshire Public Radio news and elections · Search news is on its tool page: open its card above.

What can you do with NHPR news search in opencode?

Build a personal New Hampshire news reader with links to reporting on elections, housing, and schools. A coding agent can organize NHPR results in your project and use article text to help you assess which stories belong.

Prepare a personal election reading list

Find coverage of New Hampshire's governor and congressional races, review election-tagged stories, and read the reporting behind each selection.

Research housing policy

Start with recent coverage, search for New Hampshire housing proposals, follow relevant topic tags, and examine the articles for policy details.

Follow public school funding debates

Review education coverage and search for school funding reporting. Use topic collections and full articles to separate reported proposals from decisions already made.

Build an environmental reading brief

Find recent environment reporting, investigate PFAS coverage in Merrimack, and read relevant articles alongside NHPR's topic collections.

Prepare questions for a civic discussion

Use State House reporting and election coverage to draft questions about public policy. Read the underlying articles before attributing a position to an elected official.

Compare candidate policy coverage

Find candidate guides and interviews, review governor-tagged coverage, and compare how NHPR reports positions on housing and education.

Questions about NHPR news search in opencode

Can opencode use NHPR news search?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run NHPR news search like any built-in tool.

How much does NHPR news search 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 NHPR news search in opencode?

No. Spiral runs NHPR news search on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up NHPR news search in opencode?

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

Does opencode wait while NHPR news search runs?

NHPR news search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Does NHPR cover only New Hampshire?

NHPR's website carries local, national, and international reporting. A story appearing on NHPR is therefore not necessarily about New Hampshire.

Is every election story written by NHPR's newsroom?

NHPR's 2026 election collection explicitly includes its politics team and news partners. The collection is broader than NHPR-authored reporting alone.

Can a published NHPR story change later?

Yes. One NHPR story notes that it was first published at 8 a.m. and updated with new information at 2:50 p.m. that day.

How does NHPR handle factual errors?

NHPR's corrections policy calls for timely correction of substantive factual errors. Its published reporting can therefore change when an error is identified.

Can I get unpublished interview recordings or reporting notes?

NHPR's ethics code says it does not share raw audio or reporting material outside a final broadcast or digital publication. These tools are for published coverage.

Get started

Start using NHPR news search 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