costco

A scraping guide for collecting product listings from Costco category pages. Costco is a membership retailer, and its product grid is supplied by a separate public search service rather than the protected page itself.

In plain words
What is it for?
Use it to send catalog searches and collect Costco product-listing data as JSON. It applies to categories such as laptops and computers and does not require login credentials according to the input.
Why use it?
It avoids the 403 error returned by Costco’s protected HTML pages. It also avoids waiting for an empty browser-rendered product grid when the catalog search service can provide the data directly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agentcomputerai/torch/costco
Any agent
npx skills add AgentComputerAI/torch --skill costco
Clone the repo
git clone --depth 1 https://github.com/AgentComputerAI/torch

Made for: Claude Code, Codex.

Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,376 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.02376
Opus 5 $0.00049 $0.01188
Sonnet 5 $0.00020 $0.00475
Haiku 4.5 $0.00010 $0.00238

Measured 2d ago against content hash cd1e507152b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

costco scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const res = await fetch("https://gdx-api.costco.com/catalog/search/api/v1/search", { method: "POST",

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Proven scraping playbook for costco.com category listings (e.g. /laptops.html, /computers.html). Akamai Bot Manager hard-blocks bare curl with HTTP 403 on the HTML pages, but Costco's internal catalog API at
skills/sites/costco/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Costco (costco.com)

Costco's category HTML pages (/laptops.html, /computers.html, etc.) sit behind Akamai Bot Manager and return 403 to anything that doesn't look like a fully-warmed browser. The actual product grid is rendered client-side by a Next.js app at /consumer-web/search/prd/catalog-usbc/ that POSTs to a backend search API. That backend API is public — no cookies, no tokens, no bot manager — so the correct strategy is to replay it directly with fetch and ignore the HTML page entirely.

Detection

Signal Value
CDN / WAF Akamai (server: AkamaiGHost, bm_ss/bm_s/akavpau_* cookies)
Frontend Next.js SPA at /consumer-web/search/prd/catalog-usbc/
Bare curl on HTML 403 Forbidden (384-byte Akamai challenge body)
Real Chrome (127.0.0.1:9222) on HTML 200, but product DOM is empty until hydration
Backend API https://gdx-api.costco.com/catalog/search/api/v1/search (POST)
API auth None — no cookies, no tokens
API bot manager None — plain fetch with a UA and 3 client headers works

Architecture

  1. GET /laptops.html returns an Akamai-protected Next.js shell. The DOM has zero product tiles at domcontentloaded.
  2. The shell hydrates and fires a single POST https://gdx-api.costco.com/catalog/search/api/v1/search with a JSON body containing filterBy: ["attributes.category_uri: ANY(\"laptops\")"] and pageCategories: ["laptops"].
  3. The response is a full search result with searchResult.results[] (each containing product, variantRollupValues, rating) plus facets and pagination (totalSize, nextPageToken).
  4. Individual tile hydration additionally fires per-item gdx-api.costco.com/catalog/product/product-api/v1/products/summary?items=... calls — skip those, everything you need is already in the search response.

Strategy used

  • Phase 0 (curl): 403 on /laptops.html. Akamai. Noted.
  • Phase 1 (framework): Next.js, but the initial HTML has no __NEXT_DATA__ product payload and no /_next/data/ JSON routes for this sub-app. Skipped.
  • Phase 2 (browser recon only): Connected to real Chrome via 127.0.0.1:9222, navigated to /laptops.html, captured network. Found gdx-api.costco.com/catalog/search/api/v1/search with the POST body and headers. Immediately abandoned the browser.
  • Phase 3: Replayed the API directly with fetch. No cookies. No browser. ~1.7s for the whole category.

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 153 lines · 99 tokens per session scan B cd1e507152b7

Subscribe to this mod's changes

costco is a skill published in the GitHub repository AgentComputerAI/torch (5 stars, last pushed 4mo ago), licensed MIT. It adds 99 tokens to every session and 2,376 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

tiny-web-crawler

Crawl from one or more starting web pages, fetch readable content, search within pages, follow relevant links, and stop when the requested information is found or a bounded limit is reached.

leon-ai/leon · 42 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens

computer-use

Read and drive native desktop applications through the accessibility layer — list on-screen apps, snapshot one window as a numbered element tree, then click / type / set a value / scroll / drag / run a named action, by element index or by screen coordinates. Use for work in a desktop app rather than a web page. Full…

kirodotdev/KiroCrew · 105 tokens

feature-demo-recording

Record a demo video of a web feature from a real browser. Two modes -- a NARRATED film where measured voiceover drives the timeline (designed slides, subtitles, punch-in camera, rendered from an HTML timeline), and a SILENT evidence clip for a PR or a QA pass. Use when the user asks to record a video, demo, or screen…

kirodotdev/KiroCrew · 90 tokens

browserstack

../../../engineering-team/playwright-pro/skills/browserstack/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

browser-recording

Record a browser flow as a video/GIF for evidence — animations, transitions, and multi-step interactions that a still screenshot cannot prove. Drives the project's own Playwright through a bundled runner, then converts to mp4 + GIF via ffmpeg. Use when the user asks to record a demo, capture a GIF or video of the UI…

kirodotdev/KiroCrew · 85 tokens