How to Use Affiliate.com product search in opencode
Search Affiliate.com’s merchant feeds for product listings with names, prices, currencies, availability, and links. Use it to build shopping shortlists or compare offers for the same barcode across merchants.
Prompts to try with Affiliate.com product search in opencode
Copy an example into opencode, or ask in your own words.
Use Affiliate.com product search to find Sony WH-1000XM5 listings. Add a comparison table to this project with merchant, barcode, final price, currency, availability, and direct link; group offers only when their barcodes match.
Use Affiliate.com product search for LEGO botanical sets. Build product cards in this project from returned names, descriptions, images, merchant links, and availability.
Use Affiliate.com product search for KitchenAid Artisan stand mixers. Create a report in this project comparing regular and final prices within each currency, with the merchant and product link beside each offer.
Use Affiliate.com product search for JBL Flip 6 speakers. Save the returned offer observations in this project and add a comparison routine that reports changed prices or availability on later runs.
Use Affiliate.com product search for Patagonia Black Hole backpacks. Add a review table showing each returned offer's merchant, availability, and feed update timestamp so editors can inspect freshness.
How to set up Affiliate.com product search in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- 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
- 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
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode 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 Affiliate.com 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": "affiliate-com/products/search", "input": { "keyword": "<keyword>" } }'
Then paste one of the prompts above: opencode finds Affiliate.com product search on Spiral, shows the price and runs it.
Affiliate.com product search providers and prices
Spiral runs Affiliate.com product search through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Page | a number from 1 | Page number, starting at 1. | |
| Sort by | relevance, id, barcode, ean, gtin, upc, isbn, asin and 19 more | Sort field: relevance, id, barcode, ean, gtin, upc, isbn, asin, name, currency, regular_price, final_price, sale_discount, stock_quantity, commissionable_status, brand, category, color, gender, size, author, network.id, network.name, merchant.id, merchant.name, added_at, updated_at. | |
| Per page | 1 to 50 | Products per page, 1 to 50. Defaults to 10 here. | |
| Sort order | asc or desc | Sort direction. | |
| Exact total | on or off | Count meta.total past 10,000 precisely, at some extra latency. |
Every API field of Affiliate.com · Search products is on its tool page: open its card above.
What can you do with Affiliate.com product search in opencode?
Build a shopping comparison in your project from merchant offers matched by barcode. Your coding agent can turn Affiliate.com listings into product cards and compare saved observations with later search results.
Compare merchant offers
Find listings for Sony WH-1000XM5 headphones, group matching barcodes, and compare each merchant's offer within the same currency.
Prepare a gift guide shortlist
Search for LEGO botanical sets and assemble an editorial shortlist with product names, descriptions, images, availability, and merchant links.
Review reported discounts
Find KitchenAid stand mixer listings and compare their regular and final prices to identify offers worth reviewing for a deal roundup.
Maintain a shopping comparison page
Repeat searches for featured JBL speakers and compare returned offers with saved observations to identify changes in price or availability.
Build product cards
Turn returned Patagonia backpack listings into shopping cards using the supplied names, descriptions, images, currencies, and merchant links.
Check feed freshness
Search for featured products and inspect their update timestamps to identify merchant offers that need a closer review before publication.
Find replacement recommendations
Search for OXO coffee makers when a featured offer becomes unavailable, then review returned descriptions and availability for replacement candidates.
More on Affiliate.com product search and opencode
Overview
Affiliate.com product search in other agents
Questions about Affiliate.com product search in opencode
Can opencode use Affiliate.com product search?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Affiliate.com product search like any built-in tool.
How much does Affiliate.com product search cost in opencode?
$0.043648 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 Affiliate.com product search in opencode?
No. Spiral runs Affiliate.com 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 Affiliate.com product search in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Affiliate.com product search runs?
Affiliate.com product search runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Does Affiliate.com cover every online store?
Its published coverage spans more than 20,000 merchant programs and more than 30 affiliate networks. That describes participating affiliate merchants, not a complete index of online retail.
How fresh are the product listings?
Product feeds update daily, with more frequent updates for certain merchants or networks. The product's update timestamp records a merchant-feed refresh, so a newer timestamp does not necessarily mean the price changed.
Why does a broad search show a total of 10,000?
The default total stops counting at 10,000 matches. An exact count takes an additional query, while retrieving results beyond 10,000 requires cursor pagination and permission for that depth.
Can I rely on the results for exact inventory counts?
Stock quantities are sparse: Affiliate.com's two samples found quantities on only 1% of headphone listings and 2% of jacket listings. Those were nonrandom samples of 100 results each, not a catalog-wide measurement.
How can I compare the same product across stores?
Use a barcode to identify the product, then keep the separate merchant offers for comparison. Affiliate.com supports exact barcode searches, so matching does not have to depend on similar product titles.
Start using Affiliate.com 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 https://spiral.ai/SKILL.md


