How to Use ESPN team directory in Codex
Get ESPN's teams for a league, including team identities, abbreviations, locations and logos. Use it to match a club name before retrieving its schedule or to build a team selector.
Prompts to try with ESPN team directory in Codex
Copy an example into Codex, or ask in your own words.
Use ESPN team directory to retrieve NBA teams and replace the hard-coded team choices in this project's personal basketball dashboard with returned names and abbreviations.
Use ESPN team directory to find Arsenal in the English Premier League and save its returned identity in this project's team configuration.
Use ESPN team directory to retrieve NHL teams and generate a local lookup of returned team identities, names and abbreviations for this project's hockey views.
Use ESPN team directory to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from ESPN team directory and tell me what changed since last week.
How to set up ESPN team directory in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- 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
- Send Codex this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- 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
- Create an API key
In the console, under API keys.
- Run ESPN team 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": "espn-com/sports-data/teams", "input": { "sport": "<sport>", "league": "<league>" } }'
Then paste one of the prompts above: Codex finds ESPN team directory on Spiral, shows the price and runs it.
ESPN team directory providers and prices
Spiral runs ESPN team directory through Alexandria. Open a card for today's price, with every fee included.
What can you do with ESPN team directory in Codex?
Build a personal sports app with a league team selector and a game calendar. A coding agent can connect ESPN team identities to fixtures, scores and explicit game status in your project's views.
Personal game calendar
Match the Boston Celtics in the NBA directory, then turn their upcoming fixtures into a personal calendar with opponents and start times.
Weekly basketball workload
Enumerate NBA teams, retrieve their schedules and count games in the coming week. Identify teams playing on consecutive dates for a fantasy basketball planning sheet.
Recent results comparison
Resolve Arsenal and Chelsea within the Premier League, then compare their last five completed league games using opponents and scores.
Schedule change checks
Keep a watchlist tied to ESPN team identities, then compare successive schedule responses for changed start times or game status.
Personal sports app prototype
Populate a league team selector with names and abbreviations, then show the selected team's fixtures and completed results.
Multi-team viewing plan
Identify the New York Knicks and Brooklyn Nets in the NBA directory, then compare upcoming start times to find overlapping games.
More on ESPN team directory and Codex
Overview
ESPN team directory in other agents
Questions about ESPN team directory in Codex
Can Codex use ESPN team directory?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run ESPN team directory like any built-in tool.
How much does ESPN team 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 ESPN team directory in Codex?
No. Spiral runs ESPN team 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 ESPN team directory in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while ESPN team directory runs?
ESPN team directory runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.
Is ESPN's coverage limited to US sports?
No. The documented coverage includes US and international sports, including the NFL, NBA, MLB and NHL. Its boundary is what ESPN exposes, so it is not a promise of every league worldwide.
Where does this ESPN data come from?
It comes from ESPN's public site and core JSON APIs. The team directory identifies clubs within a league, while the schedule data describes their games.
Can two ESPN teams have the same name?
Yes. ESPN's documented example includes Arsenal in both the Premier League and the Women's Super League. Match the competition as well as the club name before comparing records.
Does ESPN guarantee this data will always be available?
Disney's terms covering ESPN supply the products as is and as available. That is a limit on the source's warranty, not a guarantee of uninterrupted data availability.
Does public access permit commercial reuse?
Disney's terms prohibit commercial or business uses except as expressly licensed. Public accessibility alone does not establish permission to redistribute ESPN content commercially.
Start using ESPN team directory in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


