jackwener/OpenCLI · error · CommandExecutionError
amazon search did not expose any product cards
Error message
amazon search did not expose any product cards
What it means
Thrown when the amazon search command fetched the search results page but found no product cards with both a valid ASIN and title after filtering. Since Amazon search always renders product cards for real queries, zero cards indicates the page changed, the query returned nothing usable, or a bot-detection interstitial replaced the results.
Source
Thrown at clis/amazon/search.js:81
},
{
name: 'limit',
type: 'int',
default: 20,
help: 'Maximum number of results to return (default 20)',
},
],
columns: ['rank', 'asin', 'title', 'price_text', 'rating_value', 'review_count'],
func: async (page, kwargs) => {
const query = String(kwargs.query ?? '');
const limit = Math.max(1, Number(kwargs.limit) || 20);
const payload = await readSearchPayload(page, query);
const sourceUrl = cleanText(payload.href) || buildSearchUrl(query);
const cards = (payload.cards ?? [])
.filter((card) => cleanText(card.asin) && cleanText(card.title))
.slice(0, limit);
if (cards.length === 0) {
throw new CommandExecutionError('amazon search did not expose any product cards', 'The search page may have changed or hit a robot check. Open the same query in Chrome, verify the page is visible, and retry.');
}
return cards.map((card, index) => normalizeSearchCandidate(card, index + 1, sourceUrl));
},
});
export const __test__ = {
normalizeSearchCandidate,
};
View on GitHub (pinned to 49907e53dc)
Solutions
- Open the same query in Chrome and verify product cards are visible, then retry
- Simplify or rephrase the search query
- Retry from a residential IP or after clearing the robot check
- Upgrade the library if Amazon changed search-result markup
Example fix
// before opencli amazon search 'q=#$%' // after opencli amazon search 'wireless earbuds'
Defensive patterns
Strategy: validation
Validate before calling
if (!query || !query.trim()) throw new Error('search query must be non-empty'); Type guard
const hasCards = (payload) => Array.isArray(payload?.cards) && payload.cards.some((c) => c?.asin && c?.title);
Try / catch
try {
const results = await amazonSearch({ query });
} catch (err) {
if (err.message.includes('did not expose any product cards')) {
// rephrase query or check for robot check, retry
} else throw err;
} Prevention
- Test the query in Chrome first to confirm visible results
- Use simple, marketplace-supported query strings
- Run from residential IPs
- Retry with backoff rather than hammering
When it happens
Trigger: `opencli amazon search <query>` where the rendered page has no cards passing the (asin && title) filter; robot check page; region redirect to a page with different markup; misspelled/unicode query that yields a no-results page styled differently.
Common situations: Running from a cloud/VPN IP flagged by Amazon; query in a language the marketplace doesn't support; Amazon markup update breaking card extraction; sponsored-only layouts the parser can't read.
Related errors
- amazon ${definition.commandName} did not expose any ranked i
- 1point3acres thread
- 1point3acres user
- amazon discussion page did not expose review summary (landed
- amazon product page did not expose product content (landed o
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/fa4f692f4797d7e3.
Report an issue: GitHub.