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

Codex · Public Records

How to Use CourtListener court directory in Codex

Returns CourtListener court records with names, IDs, citation abbreviations, websites, jurisdiction types, and institutional dates. Use it to identify courts and prepare court-specific research filters.

Prompts to try with CourtListener court directory in Codex

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

Use CourtListener court directory to retrieve federal appellate court records and build a selector in this project that displays full names and stores returned court IDs.

CourtListener court directoryCodex
Try asking
  • Use CourtListener court directory to find the Ninth Circuit and compare its returned ID and citation abbreviation with the court references in this project.

  • Use CourtListener court directory to retrieve California state supreme and appellate court records and generate a JSON reference file containing their IDs, full names, and homepage links.

  • Use CourtListener court directory to find the Supreme Court of the United States and add its returned name, citation abbreviation, and institutional start date to this project's court reference table.

  • Use CourtListener court directory to retrieve federal bankruptcy court records and create a report of entries missing homepage links or establishment dates.

How to set up CourtListener court directory in Codex

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

Use Spiral's MCP server

  1. Add the hosted server
    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.

    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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run CourtListener court directory

    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/courts/courts",
        "input": {
          "page": 1
        }
      }'

Then paste one of the prompts above: Codex finds CourtListener court directory on Spiral, shows the price and runs it.

CourtListener court directory providers and prices

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

AlexandriaPublic Records
CourtListener · Courts
courtlistener-com/courts/courts

Settings you can ask for

Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page1 to 10001

page

In useon or off

Only courts CourtListener currently collects; set false to include historical courts.

JurisdictionF, FD, FB, FBP, FS, S, SA, SS and 8 more

jurisdiction

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

What can you do with CourtListener court directory in Codex?

Build a court selector populated with CourtListener names, IDs, and citation abbreviations. A coding agent can also compare those records with your project's court references and identify entries that need review.

Build a court selector

Populate a legal research interface with returned court names and IDs so readers can choose a specific institution.

Prepare court-specific research

Find the CourtListener IDs for the Ninth Circuit and California Supreme Court before conducting separate case searches.

Resolve court abbreviations

Create a reference table connecting returned citation abbreviations to full court names for an editorial or research team.

Plan historical research

Review establishment and abolition dates for historical institutions to identify which court records deserve further investigation.

Maintain a court website directory

Organize returned court homepage links by court name and jurisdiction type for a public legal resource.

Monitor directory changes

Compare successive court directory results to identify changed names, homepage links, citation abbreviations, or institutional dates.

Audit court metadata

Identify records missing institutional dates or homepage links and produce a focused list for manual research.

Questions about CourtListener court directory in Codex

Can Codex use CourtListener court directory?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run CourtListener court directory like any built-in tool.

How much does CourtListener court directory 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 CourtListener court directory in Codex?

No. Spiral runs CourtListener court directory 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 court directory in Codex?

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

Does Codex wait while CourtListener court directory runs?

CourtListener court directory runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

How many courts does CourtListener list?

CourtListener's public directory lists 3,363 jurisdictions at the time checked. Its court database includes current and historical institutions.

Are court dates and other details complete?

CourtListener explicitly identifies missing dates and other incomplete information in its jurisdiction directory. A listed court can therefore lack some institutional details.

Do start and end dates show the available case history?

The start date describes when the court was established, and the end date describes when it was abolished, if known. These are institutional dates, so they do not establish the date range of CourtListener's decisions.

Does the modification date show when the latest opinion arrived?

The modification timestamp records when the court record changed. It does not measure how recently CourtListener collected a decision from that court.

How do court IDs relate to case records?

CourtListener links opinions through dockets to court records. For example, scotus is the court ID used for the Supreme Court.

Get started

Start using CourtListener court directory in Codex

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

Paste this into Codex:

Set up Codex

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