[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Affiliate.com product search](https://spiral.ai/integrations/codex/affiliate-com-product-search)

# How to Use Affiliate.com product search in Codex

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.

|  |  |
| --- | --- |
| Model | Affiliate.com product search |
| Available through | Alexandria |
| Category | SEO |
| Price | $0.043648 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Affiliate.com product search in Codex

- 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 Codex

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

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
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.

```bash
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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Affiliate.com product search**: One request; the result comes back by polling or a webhook.

```bash
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: Codex finds Affiliate.com product search on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## Affiliate.com product search tools and prices

- [Affiliate.com · Search products](https://spiral.ai/tools/alexandria/affiliate-com/products/search) (Alexandria): $0.043648 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| page | 1 to … | — | Page number, starting at 1. |
| after |  | — | Deep-pagination cursor from the previous response's meta.after, for results past 10,000 on plans that allow it. |
| facets |  | — | Aggregations to include: network, merchant, final_price, or dotted sub-fields such as network.name. |
| fields |  | — | Product fields to return, for example `id`, `name`, `final_price`, `urls`. |
| keyword |  | — | Plain-text search such as `JBL speaker`; sent as the string form of `search`. |
| sort_by | 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 | — | 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. |

## What can you do with Affiliate.com product search in Codex?

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.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Codex guides](https://spiral.ai/integrations/codex)

## Affiliate.com product search in other agents

- [Amp](https://spiral.ai/integrations/amp/affiliate-com-product-search)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/affiliate-com-product-search)
- [Claude](https://spiral.ai/integrations/claude-desktop/affiliate-com-product-search)
- [Claude Code](https://spiral.ai/integrations/claude-code/affiliate-com-product-search)
- [Cline](https://spiral.ai/integrations/cline/affiliate-com-product-search)
- [Cursor](https://spiral.ai/integrations/cursor/affiliate-com-product-search)
- [Devin](https://spiral.ai/integrations/devin/affiliate-com-product-search)
- [dots](https://spiral.ai/integrations/dots/affiliate-com-product-search)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/affiliate-com-product-search)
- [Gemini](https://spiral.ai/integrations/gemini/affiliate-com-product-search)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/affiliate-com-product-search)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/affiliate-com-product-search)
- [goose](https://spiral.ai/integrations/goose/affiliate-com-product-search)
- [Grok](https://spiral.ai/integrations/grok/affiliate-com-product-search)
- [Grok Build](https://spiral.ai/integrations/grok-build/affiliate-com-product-search)
- [Hermes](https://spiral.ai/integrations/hermes/affiliate-com-product-search)
- [Instinct](https://spiral.ai/integrations/instinct/affiliate-com-product-search)
- [Manus](https://spiral.ai/integrations/manus/affiliate-com-product-search)
- [Muse](https://spiral.ai/integrations/muse/affiliate-com-product-search)
- [Muse Code](https://spiral.ai/integrations/muse-code/affiliate-com-product-search)
- [n8n](https://spiral.ai/integrations/n8n/affiliate-com-product-search)
- [Notion](https://spiral.ai/integrations/notion/affiliate-com-product-search)
- [OpenClaw](https://spiral.ai/integrations/openclaw/affiliate-com-product-search)
- [opencode](https://spiral.ai/integrations/opencode/affiliate-com-product-search)
- [Perplexity](https://spiral.ai/integrations/perplexity/affiliate-com-product-search)
- [Raycast](https://spiral.ai/integrations/raycast/affiliate-com-product-search)
- [VS Code](https://spiral.ai/integrations/vscode/affiliate-com-product-search)
- [Windsurf](https://spiral.ai/integrations/windsurf/affiliate-com-product-search)
- [Zapier](https://spiral.ai/integrations/zapier/affiliate-com-product-search)

## More Codex guides

- [Affiliate.com product URL to barcode](https://spiral.ai/integrations/codex/affiliate-com-product-url-to-barcode)
- [DataForSEO Google domain competitors](https://spiral.ai/integrations/codex/dataforseo-google-domain-competitors)
- [Affiliate.com network directory](https://spiral.ai/integrations/codex/affiliate-com-network-directory)
- [DataForSEO Google domain ranking overview](https://spiral.ai/integrations/codex/dataforseo-google-domain-ranking-overview)
- [Affiliate.com network details](https://spiral.ai/integrations/codex/affiliate-com-network-details)
- [DataForSEO Google ranking keywords](https://spiral.ai/integrations/codex/dataforseo-google-ranking-keywords)

## Questions about Affiliate.com product search in Codex

**Can Codex use Affiliate.com product search?**

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

**How much does Affiliate.com product search cost in Codex?**

$0.043648 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 Affiliate.com product search in Codex?**

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 Codex?**

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

**Does Codex wait while Affiliate.com product search runs?**

Affiliate.com product search runs in the background. Codex 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.

