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

opencode · Public Records

How to Use CourtListener opinion search in opencode

Find published U.S. court opinions with case names and excerpts from the decisions. Use it to build a reading list for a legal issue or locate an opinion by case name or citation.

Prompts to try with CourtListener opinion search in opencode

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

Use CourtListener opinion search to find Google LLC v. Oracle America, Inc. Add the returned case names and excerpts to a research note in this project.

CourtListener opinion searchopencode
Try asking
  • Use CourtListener opinion search to find Ninth Circuit opinions discussing software copyright filed during 2025. Build a table from the returned case names and excerpts.

  • Use CourtListener opinion search to find opinions mentioning the Digital Millennium Copyright Act filed during October 2026. Add the returned results to this project's research notes.

  • Use CourtListener opinion search to find published Supreme Court opinions with Microsoft in the case name. Create a reading list from the returned results.

  • Use CourtListener opinion search to find Second Circuit opinions discussing fair use filed during 2025. Compare the returned case names with our existing research notes and flag repeated names.

How to set up CourtListener opinion 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 CourtListener opinion 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": "courtlistener-com/opinions/search_opinions",
        "input": {
          "query": "<query>"
        }
      }'

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

CourtListener opinion search providers and prices

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

AlexandriaPublic Records
CourtListener · Search opinions
courtlistener-com/opinions/search_opinions

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Cited gta number from 0

Only clusters cited more than this many times.

Order byscore desc, dateFiled desc, dateFiled asc, citeCount desc, or citeCount ascscore desc

Keyless feeds always return the newest matches first. score desc (default) and dateFiled desc are accepted; other orders need a CourtListener API token and fail with a non-retryable upstream_blocked error.

Include unpublishedon or off

Also return unpublished opinions (CourtListener returns published only by default).

Every API field of CourtListener · Search opinions is on its tool page: open its card above.

What can you do with CourtListener opinion search in opencode?

Build a case research table from CourtListener's published opinion results. A coding agent can organize case names and excerpts in your project and flag repeated names for review.

Build a research reading list

Find published opinions discussing software copyright, then turn the returned case names and excerpts into a shortlist for closer reading.

Locate a known decision

Search for Google LLC v. Oracle America, Inc. by case name or citation to find the corresponding opinion result.

Prepare a court-specific topic digest

Collect matching Ninth Circuit opinions about arbitration within a defined filing period and organize their case names and excerpts for review.

Compare research across jurisdictions

Run separate searches for California and New York appellate opinions about noncompete agreements. Build separate reading lists from the returned decisions.

Find decisions discussing a statute

Search opinion text for the Digital Millennium Copyright Act and collect excerpts that help a researcher choose which decisions to read.

Maintain a public policy research queue

Check for matching published opinions about EPA rulemaking and add newly encountered case names to a review queue.

Questions about CourtListener opinion search in opencode

Can opencode use CourtListener opinion search?

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

How much does CourtListener opinion 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 CourtListener opinion search in opencode?

No. Spiral runs CourtListener opinion 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 CourtListener opinion search in opencode?

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

Does opencode wait while CourtListener opinion search runs?

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

Does CourtListener cover every U.S. court decision?

CourtListener estimates coverage of more than 99.9% of published precedential U.S. case law. That estimate covers a defined category of decisions, not every filing, and case law search returns published decisions by default.

How far back does CourtListener's opinion collection go?

The collection includes opinions from Harvard University's law library spanning more than 365 years. Its historical material combines several institutional sources.

How fresh are CourtListener opinions?

CourtListener collects case law as courts release it. Its description ties updates to court publication rather than a fixed daily release.

How many decisions does a search feed return?

CourtListener's search feed returns the first 20 matching decisions. For broad topics such as copyright or antitrust, use narrower court and date ranges to make that limited result set useful.

Why can the same decision appear more than once?

CourtListener may collect multiple versions when a court revises a decision. Similar case names can therefore identify different versions of the same ruling.

Get started

Start using CourtListener opinion 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