← Back to Skills Marketplace
mikehankk

Amazon Search

by Wei Han · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
94
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install amazon-search
Description
Search Amazon product listings for a keyword and return structured JSON results. Results are cached by ASIN/uuid for incremental searches and saved automatic...
README (SKILL.md)

\r \r

Amazon Search Skill\r

Search Amazon for products matching a keyword query and return structured JSON results.\r \r

Prerequisites\r

\r Install Bun runtime:\r \r

curl -fsSL https://bun.sh/install | bash\r
```\r
\r
Install skill dependencies:\r
\r
```bash\r
cd skills/amazon-search\r
bun install\r
```\r
\r
Install Playwright browsers (required for Amazon search):\r
\r
```bash\r
cd skills/amazon-search/scripts\r
npm install\r
npx playwright install chromium\r
```\r
\r
## Cookie\r
\r
This skill uses **Playwright** to search Amazon directly in a headless browser. No manual cookie management is required.\r
\r
### Playwright Prerequisites\r
\r
Install npm dependencies and Playwright browsers:\r
\r
```bash\r
cd skills/amazon-search/scripts\r
npm install\r
npx playwright install chromium\r
```\r
\r
## Inputs\r
| Parameter       | Type | Description |\r
|-----------------|---|---|\r
| `keyword`         | string | Search keywords (e.g. `"t-shirt"`) |\r
| `proxy`         | string | Optional proxy URL. Can be set as argument value or via `--proxy` flag / `T2P_PROXY` env var. Supports HTTP/HTTPS and SOCKS5 proxies. |\r
| `price_min`    | number | Optional minimum price filter. Mapped to Amazon `low-price`. |\r
| `price_max`    | number | Optional maximum price filter. Mapped to Amazon `high-price`. |\r
| `--pages`      | number | Max number of pages to fetch (default: 1). Each page has ~20-60 results. |\r
| `--num-products` | number | Max number of products to fetch. Stops when limit is reached, even if more pages available. |\r
| `--incremental` | flag | Only output new results that haven't been cached before. |\r
| `--clear-cache` | flag | Clear cache for this keyword before searching. |\r
| `--output`      | string | Custom output directory for results (default: `results/`). |\r
| `--download`    | flag | Download product images after search using `@t2p/image-cache`. |\r
\r
## Output Format\r
Returns a JSON object containing search metadata and an array of Amazon product objects.\r
\r
Results are automatically saved to `results/\x3Ckeyword>_\x3Ctimestamp>_\x3Ccount>.json`.\r
\r
```json\r
{\r
  "keyword": "shirt",\r
  "timestamp": "2026-04-06T12:34:56.789Z",\r
  "count": 10,\r
  "items": [\r
    {\r
      "id_": "B09TPN9NJ6",\r
      "uuid": "418e2c7d-ccaa-4ca3-9d1b-6b4f3bd406b0",\r
      "original_image_url": "https://m.media-amazon.com/images/I/91YprRrDB4L._AC_UL960_FMwebp_QL65_.jpg",\r
      "title": "Amazon Essentials Men's Slim-Fit Crewneck T-Shirts, Short Sleeve",\r
      "item_page": "https://www.amazon.com/dp/B09TPN9NJ6",\r
      "rating": 4.4,\r
      "review_count": 1787,\r
      "price": "$19.99",\r
      "description": "Amazon Essentials Men's Slim-Fit Crewneck T-Shirts, Short Sleeve"\r
    }\r
  ]\r
}\r
```\r
\r
### Item Fields\r
\r
| Field | Type | Description |\r
|-------|------|-------------|\r
| `id_` | string | Amazon ASIN (Amazon Standard Identification Number) |\r
| `uuid` | string | Unique identifier from Amazon's data attributes |\r
| `original_image_url` | string | Product image URL (highest resolution from srcset) |\r
| `title` | string | Product title |\r
| `item_page` | string | Full URL to the product page |\r
| `rating` | number | Average rating (1-5) |\r
| `review_count` | number | Number of reviews |\r
| `price` | string | Price as displayed on Amazon (includes currency) |\r
| `description` | string | Product description (may be same as title if no separate description) |\r
\r
## Execution\r
\r
Use the script at `scripts/amazon_search.ts`.\r
\r
All TypeScript files must be run with **Bun**:\r
\r
```bash\r
# Simple search\r
bun run scripts/amazon_search.ts "shirt"\r
```\r
\r
### Configuration Tool\r
\r
Use `scripts/configure.ts` to generate environment variable commands and manage cache:\r
\r
```bash\r
# Generate proxy setting command (copy and run the output)\r
bun run scripts/configure.ts proxy "http://127.0.0.1:7890"\r
\r
# List cache files\r
bun run scripts/configure.ts listcache\r
\r
# Clear cache for specific keyword\r
bun run scripts/configure.ts clearcache "shirt"\r
\r
# Clear all caches\r
bun run scripts/configure.ts clearcache --all\r
```\r
\r
## Usage Notes\r
\r
- **Runtime**: All TypeScript files must be run with `bun run`\r
- **Search Method**: Uses **Playwright** to search Amazon directly in a headless browser (no manual cookie management needed)\r
- **Proxy Support**: Proxy is read from `T2P_PROXY` environment variable (or `--proxy` CLI flag). Supports both HTTP/HTTPS and SOCKS5 proxies (e.g., `socks5://127.0.0.1:1080`).\r
- **Cache & Deduplication**: Search results are cached to `resultscache/\x3CsanitizedQuery>_cache.md`. Each line is an ASIN/uuid used for deduplication.\r
- **Incremental Mode**: Use `--incremental` to output only items not present in the cache.\r
- **Clear Cache**: Use `--clear-cache` to delete this keyword cache before searching, or use `scripts/configure.ts clearcache`.\r
- **Custom Output**: Use `--output=/path/to/dir` to save results to a custom directory.\r
- **Download Images**: Use `--download` to automatically download product images using `@t2p/image-cache` after search completes.\r
\r
## Example\r
All commands use `bun run`:\r
\r
```bash\r
# Simple search\r
bun run scripts/amazon_search.ts "t-shirt"\r
\r
# Incremental search - only output new results not in cache\r
bun run scripts/amazon_search.ts "t-shirt" --incremental\r
\r
# Clear cache before searching\r
bun run scripts/amazon_search.ts "t-shirt" --clear-cache --incremental\r
\r
# Use proxy\r
bun run scripts/amazon_search.ts "t-shirt" --incremental --proxy "http://127.0.0.1:10809"\r
\r
# Multi-page search (fetch 2 pages, ~40-120 results)\r
bun run scripts/amazon_search.ts "t-shirt" --pages=2\r
\r
# Multi-page + incremental (only new items from all pages)\r
bun run scripts/amazon_search.ts "t-shirt" --pages=2 --incremental\r
\r
# Limit to specific number of products (stops early if limit reached)\r
bun run scripts/amazon_search.ts "t-shirt" --pages=5 --num-products=50\r
\r
# Specify custom output directory\r
bun run scripts/amazon_search.ts "t-shirt" --output=/path/to/custom/results\r
\r
# Download images after search\r
bun run scripts/amazon_search.ts "t-shirt" --download\r
\r
# Combined: search with download and custom output\r
bun run scripts/amazon_search.ts "t-shirt" --download --output=/path/to/results\r
```\r
\r
## Error Handling\r
| Situation | What to do |\r
|---|---|\r
| HTTP 4xx/5xx / Search blocked | Amazon may be rate-limiting; try again later with a different proxy, or wait before retrying |\r
| Parse errors / empty results | Page layout may have changed; try different keywords, pages, or filters |\r
| Playwright launch errors | Ensure Playwright browsers are installed: `cd scripts && npx playwright install chromium` |\r
Usage Guidance
This skill appears to do what it says: headless Playwright scraping of Amazon with local caching and optional image download. Before installing, consider: (1) the scripts will save Amazon cookies, HTML snapshots, screenshots, session JSON and cached images to the local project folders (resultscache, cache/sessions, results, debug files) — these can contain sensitive data; (2) SKILL.md recommends running a remote Bun install script (curl | bash) and Playwright will download browser binaries — perform these steps only on trusted machines or isolated environments; (3) the skill supports a proxy via T2P_PROXY — be cautious about pointing it at third-party proxies (they could see scraped traffic and cookies); (4) if you want to limit persistence, run in a disposable container and clear the resultscache/cache/sessions/results directories after use. If you need higher assurance, review the included files locally and/or run them in an isolated environment (container/VM) before granting broader access.
Capability Analysis
Type: OpenClaw Skill Name: amazon-search Version: 0.1.1 The skill bundle contains a critical shell injection vulnerability in `scripts/amazon_search.ts`, where the `keyword` input is directly interpolated into a shell command executed via `execSync`. This allows an attacker to achieve Remote Code Execution (RCE) by providing a crafted keyword (e.g., using command substitution or shell metacharacters). Additionally, `SKILL.md` promotes the risky practice of installing the Bun runtime via `curl | bash`. While the code appears to be a legitimate Amazon scraper using Playwright, these significant security flaws pose a high risk to the host environment.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
Name/description (Amazon search + caching + image download) matches the included files: Playwright search/get-cookie scripts, a coordinator script (amazon_search.ts), and an image-cache module. Required tools (Playwright, Node/Bun) are consistent with scraping and image handling.
Instruction Scope
Instructions stay within the stated purpose: they tell the agent/user how to run the Playwright-based search, manage cache, and download images. Notable behaviours the user should expect: the Playwright scripts capture cookies, save debug_screenshot.png and debug_page.html, and persist session JSON files (cookies and UA) under cache/sessions and search caches under resultscache/results. These are expected for a scraper but are sensitive (contain cookies and saved HTML).
Install Mechanism
No formal registry install spec (instruction-only), but SKILL.md asks the user to install Bun via a curl | bash installer and to run npm install + npx playwright install chromium. Those are expected for this skill, but running remote install scripts (curl https://bun.sh/install | bash) and Playwright's browser downloads carry the usual supply-chain/network risks and should be done from a trusted environment.
Credentials
The skill does not request secrets or credentials. It documents two optional env vars (T2P_PROXY and T2P_IMAGE_DIR) which the code uses. No unrelated credentials, config paths, or unexpected env variables are requested.
Persistence & Privilege
The skill does not request always:true and is user-invocable only. It persists only its own data (sessions, caches, results, debug files) under the project directory; this is consistent with its purpose and does not modify other skills or global agent configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install amazon-search
  3. After installation, invoke the skill by name or use /amazon-search
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
- Initial release of amazon-search skill for structured Amazon product searches. - Supports keyword queries, price filters, paging, proxy configuration, image downloading, and incremental result output. - Provides output as structured JSON and saves results automatically to the results directory. - Includes robust caching, cache clearing commands, and deduplication for incremental searches. - Full documentation for installation, configuration, usage examples, and troubleshooting.
Metadata
Slug amazon-search
Version 0.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Amazon Search?

Search Amazon product listings for a keyword and return structured JSON results. Results are cached by ASIN/uuid for incremental searches and saved automatic... It is an AI Agent Skill for Claude Code / OpenClaw, with 94 downloads so far.

How do I install Amazon Search?

Run "/install amazon-search" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Amazon Search free?

Yes, Amazon Search is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Amazon Search support?

Amazon Search is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Amazon Search?

It is built and maintained by Wei Han (@mikehankk); the current version is v0.1.1.

💬 Comments