$npx -y skills add browser-act/skills --skill ecommerce-listingExtract product list from any e-commerce category page, search results page, or keyword search with filters. Returns paginated product arrays with URL, name, price, currency, image, rating, review count per item. Supports URL input, keyword search, and site-scoped search with fil
| 1 | # E-commerce — Product Listing |
| 2 | |
| 3 | > Category/search URL or keyword + filters → paginated product list (URL, name, price, image, rating per item) |
| 4 | |
| 5 | ## Language |
| 6 | |
| 7 | All process output to user (progress updates, process notifications) follows the user's language. |
| 8 | |
| 9 | ## Objective |
| 10 | |
| 11 | Extract a structured list of products from any e-commerce category, search results, or keyword search page, with support for price/brand/rating filters and multi-page pagination. |
| 12 | |
| 13 | ## Prerequisites |
| 14 | |
| 15 | - Target browser is open and connected |
| 16 | - No login required for public listing pages |
| 17 | |
| 18 | ## Pre-execution Checks |
| 19 | |
| 20 | ### 1. Tool Readiness |
| 21 | |
| 22 | If browser-act has been confirmed available in the current session → skip this step. |
| 23 | |
| 24 | Invoke `browser-act` via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry. |
| 25 | |
| 26 | ## Capability Components |
| 27 | |
| 28 | > This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the user on the page. JS code is encapsulated in Python files under the `scripts/` directory, invoked via `eval "$(python scripts/xxx.py {params})"`. Use the bash tool for execution. |
| 29 | |
| 30 | ### DOM: Extract product list from current page |
| 31 | |
| 32 | Navigate to the listing/search page first, then extract: |
| 33 | |
| 34 | ```bash |
| 35 | eval "$(python scripts/extract-listing.py --max-results 20)" |
| 36 | ``` |
| 37 | |
| 38 | Parameters: |
| 39 | - `--max-results`: max items to return per page, default 20 |
| 40 | |
| 41 | Output example: |
| 42 | ```json |
| 43 | { |
| 44 | "count": 20, |
| 45 | "items": [ |
| 46 | { |
| 47 | "url": "https://www.amazon.com/dp/B09WNK39JN", |
| 48 | "name": "Amazon Echo Pop", |
| 49 | "price": 39.99, |
| 50 | "currency": "USD", |
| 51 | "image": "https://m.media-amazon.com/images/I/...jpg", |
| 52 | "rating": 4.7, |
| 53 | "review_count": 103789, |
| 54 | "asin": "B09WNK39JN" |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | ``` |
| 59 | |
| 60 | ### DOM: Get next page URL |
| 61 | |
| 62 | After extracting a page, get the URL to navigate to for the next page: |
| 63 | |
| 64 | ```bash |
| 65 | eval "$(python scripts/extract-listing-next-page.py)" |
| 66 | ``` |
| 67 | |
| 68 | Output example: |
| 69 | ```json |
| 70 | {"next_url": "https://www.amazon.com/s?k=headphones&page=2", "has_next": true, "method": "amazon"} |
| 71 | ``` |
| 72 | |
| 73 | When `has_next` is false, pagination is complete. |
| 74 | |
| 75 | ### Composite: Keyword search with filters → product list |
| 76 | |
| 77 | **Step 1 — Build search URL with filters:** |
| 78 | |
| 79 | Construct the URL based on target site and desired filters using the patterns below, then navigate: |
| 80 | |
| 81 | **Amazon** (`amazon.com`): |
| 82 | ``` |
| 83 | https://www.amazon.com/s?k={keyword_urlencoded}&s={sort}&rh={filter_params} |
| 84 | ``` |
| 85 | - Sort (`s`): `price-asc-rank` | `price-desc-rank` | `review-rank` | `date-desc-rank` (omit for relevance) |
| 86 | - Price filter: append `p_36:{min_cents}-{max_cents}` to `rh` (dollars × 100, e.g. $50–$200 → `p_36:5000-20000`) |
| 87 | - Rating filter: append `avg_customer_review:four-and-above` | `three-and-above` | `two-and-above` to `rh` |
| 88 | - In-stock: append `p_n_availability:1248801011` to `rh` |
| 89 | - Multiple `rh` values: comma-separate (e.g. `rh=p_36:5000-20000,avg_customer_review:four-and-above`) |
| 90 | |
| 91 | **eBay** (`ebay.com`): |
| 92 | ``` |
| 93 | https://www.ebay.com/sch/i.html?_nkw={keyword_urlencoded}&_udlo={min_price}&_udhi={max_price}&_sop={sort_num} |
| 94 | ``` |
| 95 | - Sort: `12`=BestMatch | `15`=PriceLow | `16`=PriceHigh | `24`=NewlyListed |
| 96 | |
| 97 | **Walmart** (`walmart.com`): |
| 98 | ``` |
| 99 | https://www.walmart.com/search?q={keyword_urlencoded}&min_price={min}&max_price={max}&sort={sort} |
| 100 | ``` |
| 101 | - Sort: `best_match` | `price_low` | `price_high` | `rating_high` |
| 102 | |
| 103 | **Google Shopping** (cross-site, no `--site`): |
| 104 | ``` |
| 105 | https://www.google.com/search?tbm=shop&q={keyword_urlencoded}&tbs=p_ord:{sort} |
| 106 | ``` |
| 107 | - Sort: `rv`=relevance | `pd`=price ascending | `prd`=price descending |
| 108 | |
| 109 | **Any site with `--site`** (generic): |
| 110 | ``` |
| 111 | https://{site}/search?q={keyword_urlencoded} |
| 112 | ``` |
| 113 | |
| 114 | **Step 2 — Navigate and extract:** |
| 115 | 1. `navigate {constructed_url}` → `wait stable` |
| 116 | 2. `eval "$(python scripts/extract-listing.py --max-results {n})"` |
| 117 | |
| 118 | **Step 3 — Paginate (repeat until done):** |
| 119 | 1. `eval "$(python scripts/extract-listing-next-page.py)"` |
| 120 | 2. If `has_next` is true: `navigate {next_url}` → `wait stable` → re-run extract-listing.py |
| 121 | 3. If `has_next` is false: stop |
| 122 | |
| 123 | ## Pagination |
| 124 | |
| 125 | **URL Pagination**: `extract |