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

opencode · E-commerce

How to Use Fanatics product search in opencode

Find Fanatics merchandise through the storefront's keyword search, with facets for narrowing results. Use it when you have a team, player, or product phrase rather than a specific item.

Prompts to try with Fanatics product search in opencode

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

Use Fanatics product search for “Boston Celtics hoodie” and adapt this project's results component to the returned data.

Fanatics product searchopencode
Try asking
  • Use Fanatics product search for “Los Angeles Lakers jersey” and check whether this project's parser handles the returned facets.

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

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

  • Check Fanatics product search and summarize what you find in three bullet points.

How to set up Fanatics product 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 Fanatics product 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": "fanatics-com/products/search_products",
        "input": {
          "query": "<query>"
        }
      }'

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

Fanatics product search providers and prices

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

AlexandriaE-commerce
Fanatics US · Search products
fanatics-com/products/search_products

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Page1 to 2001

1-based page number (the site's pageNumber).

SortTopSellers, NewestArrivals, LowestPrice, or HighestPriceTopSellers

Sort order (the site's sortOption values).

Page size1 to 9624

Products per page (the site's pageSize). The storefront UI offers 24, 48, 72 and 96.

Include facetson or off

Include the site's facet groups (leagues, departments, players, brands, price bands) with their option URLs. Set false for a smaller result when only the products matter.

Every API field of Fanatics US · Search products is on its tool page: open its card above.

What can you do with Fanatics product search in opencode?

Build a personal Fanatics merchandise browser with team navigation and product inspection. Coding agents can use the storefront responses to implement browsing behavior in your project.

Build a personal league shopping shortlist

Identify teams in the Fanatics directory, browse their merchandise, search for specific styles, and check sizes on the final candidates.

Compare gear for rival teams

Find the Lakers and Celtics in the team directory, compare their merchandise sections, search for matching product styles, and inspect shortlisted items.

Plan college sports gifts

Locate college teams, browse each school's merchandise, search for requested apparel, and check the available sizes before choosing gifts.

Explore unfamiliar team shops

Use the league directory to choose teams beyond your usual favorites. Browse their sections, search for preferred merchandise styles, and inspect individual products.

Find alternatives to an unavailable size

Search for the same team and apparel type, browse the relevant merchandise section, and check size-level stock on alternative products.

Questions about Fanatics product search in opencode

Can opencode use Fanatics product search?

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

How much does Fanatics product 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 Fanatics product search in opencode?

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

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

Does opencode wait while Fanatics product search runs?

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

Which Fanatics store does this data cover?

The documented source is the US storefront at fanatics.com. Its merchandise data comes from the storefront's server-rendered pages and Iris data API.

How fresh is Fanatics merchandise information?

Fanatics says its website updates daily but does not specify fixed update times. That statement does not establish a minute-by-minute freshness guarantee.

Does Fanatics show a complete archive of unavailable merchandise?

Fanatics says it displays items currently in stock. The storefront should therefore be used to explore its current assortment rather than as a complete archive of past merchandise.

Can an item be listed while my size is unavailable?

Yes. Fanatics marks unavailable sizes by graying them out on the product page, so finding a listing does not establish availability in your size.

Do Fanatics' terms permit commercial extraction of storefront data?

Fanatics lists automated extraction for commercial purposes, including screen scraping, among unauthorized uses. Public visibility should not be treated as permission for commercial extraction.

Get started

Start using Fanatics product 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