# US Retail Price Comparator (Amazon, Best Buy, Walmart, Newegg) (`lonwabo/us-retail-price-comparator`) Actor

Live multi-store price comparison across Amazon, Best Buy, Walmart, and Newegg. Concurrently queries all 4 US retail leaders, matches identical products using model and fuzzy spec alignment, and pinpoints the lowest price and price spread.

- **URL**: https://apify.com/lonwabo/us-retail-price-comparator.md
- **Developed by:** [Lonwabo Mfundisi](https://apify.com/lonwabo) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US Electronics & PC Price Comparator (Amazon, Best Buy, Walmart, Newegg)

A high-performance, multi-store price comparison and deal-finding Actor purpose-built for **Consumer Electronics, PC Hardware, and Gaming Tech**.

Instead of manually checking four separate browser tabs, this Actor simultaneously queries **Amazon**, **Best Buy**, **Walmart**, and **Newegg**, aligns identical products using a **Smart Entity Resolution & Spec Matcher**, and reveals the lowest available price, price spread, and direct purchase links.

***

### ⚡ What Does This Actor Do?

- 🔍 **Concurrent 4-Store Search:** Queries Amazon, Best Buy, Walmart, and Newegg in parallel to gather live pricing, availability, and specs in seconds.
- 🛡️ **Strict Model Relevance Guard:** Automatically blocks retail search engines from pushing unrelated models (e.g. searching `RTX 4070` strictly rejects alternative `RTX 5070` or `RTX 5060` cards).
- 🧩 **Intelligent Entity Resolution:** Matches products using exact Model Numbers, Manufacturer Part Numbers (MPN), VRAM/storage capacities, and spec tiers. Refurbished and open-box items are never lumped with brand-new products.
- 💰 **Live Savings & Price Spread Analytics:** Calculates `lowestPrice`, `highestPrice`, `lowestStore`, and `potentialSavings` for every product.
- 🖼️ **Direct Images & One-Click Buy Links:** Previews product thumbnails (`productImage`) and one-click purchase links (`bestDealUrl`) directly inside the Apify dataset table without digging through nested JSON.
- 🚦 **Unambiguous Stock Indicators:** Every retailer is clearly tagged as `In Stock ($price)` or `Not Found / Out of Stock`—no blank or mysterious fields.

***

### 🎯 Best Supported Categories

This scraper is tuned specifically for electronics, computing, and gaming gear:

| Category | Typical Search Examples | Stores with Highest Overlap |
| :--- | :--- | :--- |
| **PC Components** | `RTX 4070`, `RTX 5090`, `Ryzen 7 7800X3D`, `Samsung 990 Pro 2TB` | Amazon, Best Buy, Newegg |
| **Gaming Laptops & Desktops** | `ASUS ROG Strix G16`, `Lenovo Legion Pro 5`, `MacBook Pro M3 Max` | Amazon, Best Buy, Walmart, Newegg |
| **Consoles & Handhelds** | `PlayStation 5 Slim`, `Nintendo Switch OLED`, `Xbox Series X` | Amazon, Best Buy, Walmart, Newegg |
| **Headphones & Audio** | `Sony WH-1000XM5`, `Apple AirPods Pro 2`, `Bose QuietComfort Ultra` | Amazon, Best Buy, Walmart, Newegg |
| **Gaming Monitors & TVs** | `LG C3 OLED 55"`, `Samsung Odyssey G9`, `Dell Alienware AW3423DWF` | Amazon, Best Buy, Walmart, Newegg |
| **Peripherals & Streaming** | `Logitech MX Master 3S`, `Elgato Stream Deck`, `Razer BlackWidow V4` | Amazon, Best Buy, Walmart, Newegg |

> ⚠️ **Note on Non-Tech Queries:** Best Buy and Newegg are specialized technology retailers and do not carry groceries, apparel, or general home goods. For optimal 4-way matching, search for branded tech, hardware, and electronics.

***

### 🛠️ How It Works

```
                               ┌─────────────┐
                               │ User Search │ (e.g. "RTX 5090")
                               └──────┬──────┘
                                      │
            ┌──────────────┬──────────┴───────────┬──────────────┐
            ▼              ▼                      ▼              ▼
       ┌─────────┐   ┌──────────┐           ┌───────────┐   ┌──────────┐
       │ Amazon  │   │ Best Buy │           │  Walmart  │   │  Newegg  │
       └────┬────┘   └─────┬────┘           └─────┬─────┘   └────┬─────┘
            │              │                      │              │
            └──────────────┼──────────────────────┴──────────────┘
                           ▼
          ┌──────────────────────────────────┐
          │     Strict Relevance Filter      │ (Rejects mismatched models like 5070)
          └────────────────┬─────────────────┘
                           ▼
          ┌──────────────────────────────────┐
          │    Entity Resolution Engine      │ (Groups by Model/UPC/Specs/Tokens)
          └────────────────┬─────────────────┘
                           ▼
          ┌──────────────────────────────────┐
          │  Unified Comparison & Best Deal  │ (Lowest Price, Savings, Image, Buy Link)
          └──────────────────────────────────┘
```

***

### 🚀 How to Use

#### Method 1: Apify Console

1. Create a free or paid account on [Apify](https://apify.com).
2. Open **US Electronics & PC Price Comparator** in the Console.
3. Enter your target hardware or electronics keywords in **Search keywords or products** (e.g. `Sony WH-1000XM5`, `RTX 5090`).
4. Select which stores to query (default: all 4).
5. Click **Start** and download your results in **Excel, CSV, JSON, or HTML**.

#### Method 2: Apify API (Python, Node.js, cURL)

```bash
curl --request POST \
  --url "https://api.apify.com/v2/actors/lonwabo~us-retail-price-comparator/runs?token=YOUR_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "searchTerms": ["Sony WH-1000XM5", "RTX 5090"],
    "stores": ["amazon", "bestbuy", "walmart", "newegg"],
    "maxResultsPerStore": 5
  }'
```

***

### 🖥️ Interactive HTML Comparison Report (`report.html`)

In addition to exporting the structured Dataset in **JSON, CSV, Excel, or built-in HTML table (`format=html`)**, every run generates a standalone, self-contained **Interactive HTML Comparison Report (`report.html`)** directly inside the Apify Console **Output** tab (and via a shareable Key-Value Store link):

- **Horizontal View & Store Tabs** — Switch seamlessly between **Best Deals Cards**, **Side-by-Side Matrix**, and **4 dedicated individual store tabs** (**Amazon**, **Best Buy**, **Walmart**, **Newegg**), each displaying live matched item counts.
- **Deep-Linkable Tabs (`#tab=...`)** — Every tab updates the URL hash (e.g. `#tab=matrix`) so you can bookmark or share a specific merchant view directly.
- **Aligned Deal Cards & Specs** — Product thumbnails, uniform spec & brand badges, green cheapest-store highlights, spread savings pills, and clickable **View Best Deal** buttons.
- **Live Controls, Full Screen & Instant Exports** — Keyword search, multi-column sort (`Biggest Savings ($)`, `Lowest Price ($)`, `Highest Spread %`, `Most Stores Matched`), `2+ Stores Only` toggle, plus one-click **Download CSV**, **Download JSON**, **Print / PDF Quote**, and **Full Screen (`⛶`)** buttons.

![US Electronics & PC Price Comparison Report — Interactive HTML View](https://api.apify.com/v2/key-value-stores/44gjIna4ipGc3tD78/records/us-retail-price-comparator-v1.png?signature=1J9AuumHFJ4r4M6s1QFFP)

#### ⏰ Automated Schedules & Email / Slack Alerts (Apify Integrations)

Want daily or weekly price updates delivered automatically? Instead of storing credentials inside the Actor, use Apify's built-in **Schedules** and **Integrations**:

1. Save your preferred search terms and store toggles as a **Task**, then set a recurring **Schedule** (e.g., daily at 8:00 AM or every Monday morning).
2. Open the Actor/Task **Integrations** tab in Apify Console and connect **Send Email (`apify/send-mail`)**, **Slack (`apify/slack-alert`)**, **Google Sheets**, **Make**, **Zapier**, or a **Webhook** triggered on `Run succeeded`.
3. Include `{{links.apiDefaultKeyValueStoreUrl}}/records/report.html` or `{{links.apiDefaultDatasetUrl}}/items?format=csv` in your alert payload to receive the live HTML report or spreadsheet automatically after every scheduled run.

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :--- | :---: | :--- | :--- |
| `searchTerms` | `array` | **Yes** | `["Sony WH-1000XM5", "RTX 4070"]` | List of products, model numbers, or hardware keywords to compare. |
| `stores` | `array` | No | `["amazon", "bestbuy", "walmart", "newegg"]` | Retailers to search. You can uncheck any store you wish to exclude. |
| `maxResultsPerStore` | `integer` | No | `5` | Maximum number of candidate products to fetch per retailer. |
| `onlyMultiStoreMatches` | `boolean` | No | `false` | When set to `true`, filters out items found in only 1 store, focusing purely on direct price battles. |
| `minPrice` | `integer` | No | `10` | Filter out cheap accessories, cables, or small add-ons below this USD price. |
| `maxPrice` | `integer` | No | `5000` | Upper price ceiling in USD ($). |
| `includeFields` | `array` | No | `["productImage", "brand", "specs", "storeColumns", "dealVerdict"]` | Deselect optional dense fields to keep output lightweight. Core fields (Title, Lowest Price, Store, Spread, Link) are always included. |
| `proxyConfiguration` | `object` | No | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` | Apify Residential Proxy configuration (automatically routed to US IPs). |

***

### 📤 Output Dataset Format

Every record represents a unified product comparison with direct links and retailer statuses:

```json
{
  "productImage": "https://pisces.bbystatic.com/image2/BestBuy_US/images/products/...",
  "productName": "ZOTAC - SOLID OC GeForce RTX 5090 32GB GDDR7 Graphics Card (ZT-B50900J-10A)",
  "brand": "ZOTAC",
  "model": "ZT-B50900J-10A",
  "storeCount": 2,
  "lowestPrice": 4499.99,
  "highestPrice": 8198.00,
  "potentialSavings": 3698.01,
  "lowestStore": "Best Buy",
  "bestDealUrl": "https://www.bestbuy.com/site/...",
  "currency": "USD",
  "amazonStatus": "In Stock ($8,198.00)",
  "bestbuyStatus": "In Stock ($4,499.99)",
  "walmartStatus": "Not Found / Out of Stock",
  "neweggStatus": "Not Found / Out of Stock",
  "amazonPrice": 8198.00,
  "bestbuyPrice": 4499.99,
  "walmartPrice": null,
  "neweggPrice": null,
  "amazonUrl": "https://www.amazon.com/dp/B0...",
  "bestbuyUrl": "https://www.bestbuy.com/site/6620...",
  "walmartUrl": null,
  "neweggUrl": null,
  "offers": {
    "bestbuy": {
      "store": "Best Buy",
      "price": 4499.99,
      "inStock": true,
      "status": "In Stock",
      "url": "https://www.bestbuy.com/site/..."
    },
    "amazon": {
      "store": "Amazon",
      "price": 8198.00,
      "inStock": true,
      "status": "In Stock",
      "url": "https://www.amazon.com/dp/..."
    },
    "walmart": {
      "store": "Walmart",
      "price": null,
      "inStock": false,
      "status": "Not Found / Out of Stock"
    },
    "newegg": {
      "store": "Newegg",
      "price": null,
      "inStock": false,
      "status": "Not Found / Out of Stock"
    }
  },
  "searchTerm": "RTX 5090"
}
```

***

### 💡 Practical Use Cases

- 🎯 **Retail Arbitrage & Reselling:** Detect massive price disparities between MSRP store drops (e.g. Best Buy at $4,499) and marketplace resellers (e.g. Amazon at $8,198) in real-time.
- 🛍️ **Affiliate Deal Sites & Price Trackers:** Automatically power "Where to buy cheapest" comparison tables and price-drop alerts for tech blogs.
- 🏢 **Corporate Hardware Procurement:** Save corporate IT departments thousands of dollars on bulk monitor, workstation, and laptop purchases.
- 📊 **Market Intelligence & Price Monitoring:** Monitor competitor pricing, promotional campaigns, and stockouts across the top 4 US electronics retailers.

***

### ❓ Frequently Asked Questions (FAQ)

#### Why is a store marked "Not Found / Out of Stock"?

A store will be marked as *Not Found / Out of Stock* if:

1. The retailer does not carry that product.
2. The product is out of stock.
3. The store's search engine returned unrelated or newer models that were rejected by our **Relevance Filter** (e.g. returning an RTX 5070 when you searched for RTX 4070).

#### Do I need residential proxies?

Yes. Major US retailers (particularly Best Buy, Walmart, and Newegg) employ strict bot-mitigation and geolocation checks that block standard datacenter IPs. The Actor comes pre-configured to use **Apify Residential Proxies** with automatic US routing.

#### How does the Actor avoid comparing new items to refurbished items?

The entity resolution engine inspects titles for keywords like `refurbished`, `renewed`, `open box`, `reconditioned`, and `pre-owned`. Refurbished products are strictly partitioned and never compared against factory-sealed brand-new hardware.

#### Can I export the results to Google Sheets or Excel?

Yes. From the Apify Console, click **Export** on the dataset tab and choose **Excel**, **CSV**, or copy the **Live API URL** to sync automatically with Google Sheets using `=IMPORTDATA()`.

***

### 💡 Tips for Best Results

- **Use Specific Model Identifiers:** Searching for exact model numbers, MPNs, or series (e.g. `Sony WH-1000XM5`, `RTX 4070 Super`, `LG C3 OLED 55"`) produces the cleanest cross-store matches.
- **Filter Single-Store Noise:** Turn ON `onlyMultiStoreMatches` if you only want to see head-to-head price wars where 2 or more retailers carry the identical item.
- **Start with Moderate Batch Sizes:** Test with `maxResultsPerStore: 5` to verify your keywords before scaling up to large product catalogs.

***

### 🔌 Integrations & Export Formats

Apify datasets can be downloaded or synced automatically into your existing tech stack:

- **Spreadsheets:** Download structured records directly as **Excel (.xlsx)** or **CSV**.
- **Google Sheets:** Sync live pricing data continuously using `=IMPORTDATA(datasetUrl)`.
- **Workflow Automation (Make / Zapier):** Trigger automated inventory alerts or push notifications whenever a profitable price gap is found.
- **Developer API:** Query results via REST API in Python, Node.js, or cURL to power your custom e-commerce comparison widgets or procurement apps.

***

### 🎛️ Standardized Store Toggles, Filter Guards & Per-Store Tabs

This Actor includes unified comparison controls matching our full suite:

#### Individual Store Toggles (`ON` / `OFF`)

Turn any retailer on or off directly from the input form without editing JSON arrays:

- **Amazon** (`includeAmazon`): Include Amazon US consumer electronics & PC gear.
- **Best Buy** (`includeBestBuy`): Include Best Buy electronics & tech retail.
- **Walmart** (`includeWalmart`): Include Walmart US electronics & laptops.
- **Newegg** (`includeNewegg`): Include Newegg — GPUs, CPUs & PC components.

#### Smart Filter & Sort Controls

- **`excludeAccessories` (Default: `true`):** Filters out cases, stands, chargers, cables, skins, and adapters when searching for main hardware/products.
- **`brandNewOnly` (Default: `true`):** Excludes used, second-hand, pre-owned, and refurbished listings from skewing the lowest retail price.
- **`inStockOnly` (Default: `true`):** Excludes out-of-stock offers so only purchasable listings are compared.
- **`onlyMultiStoreMatches` (Default: `false`):** Toggle ON to isolate products matched across 2 or more stores.
- **`sortBy`:** Sort results by **Biggest Savings ($)** (`priceSpreadDesc`), **Lowest Price ($)** (`bestPriceAsc`), **Most Stores Matched** (`storesComparedDesc`), or **Highest Discount %** (`savingsPercentDesc`).
- **`minSimilarityScore`:** Fine-tune fuzzy cross-store matching sensitivity (`0.2` – `0.9`).

#### 📊 Dataset Views (7 Organized Tabs)

| Tab Name | What You See |
| :--- | :--- |
| **Best Deals Overview** | Winning prices, brand/category specs, spreads, deal verdicts & best deal links |
| **Side-by-Side Store Matrix** | Parallel pricing and direct links across all 4 retailers side-by-side |
| **Amazon** | Dedicated tab with Amazon image, title, price, list price, discount %, rating, reviews, stock & link |
| **Best Buy** | Dedicated tab with Best Buy image, title, price, list price, discount %, rating, reviews, stock & link |
| **Walmart** | Dedicated tab with Walmart image, title, price, list price, discount %, rating, reviews, stock & link |
| **Newegg** | Dedicated tab with Newegg image, title, price, list price, discount %, rating, reviews, stock & link |
| **All Fields** | Complete raw dataset payload including nested offers for JSON/CSV/Excel export |

***

### 🔗 Related Price Comparators & Scrapers

Explore the complete multi-store price intelligence and retail arbitrage suite from [Lonwabo Mfundisi](https://apify.com/lonwabo):

- **[US Beauty & Cosmetics Price Comparator](https://apify.com/lonwabo/us-beauty-price-comparator)** — Compare live prices across Sephora, Ulta Beauty, Target, Amazon, and Walmart.
- **[US Hardware & Home Improvement Comparator](https://apify.com/lonwabo/us-hardware-price-comparator)** — Compare tools and building materials across The Home Depot, Lowe's, Ace Hardware, and Amazon.
- **[US Outdoor Gear & Sporting Goods Comparator](https://apify.com/lonwabo/us-outdoor-gear-comparator)** — Real-time price battles across REI, Bass Pro Shops, Target, Amazon, Walmart, and Dick's.
- **[US Pet Supplies & Food Price Comparator](https://apify.com/lonwabo/us-pet-price-comparator)** — Track pet food and healthcare across Chewy, Petco, PetSmart, Amazon, and Walmart.
- **[US Book Price Comparator (6 Bookstores)](https://apify.com/lonwabo/us-book-price-comparator)** — Real-time book prices, formats, and remainder arbitrage across Amazon, Barnes & Noble, Bookshop.org, ThriftBooks, AbeBooks, and BookOutlet.
- **[US Supplements & Sports Nutrition Price Comparator](https://apify.com/lonwabo/us-supplement-price-comparator)** — Real-time price tracker for protein powders, creatine, nootropics, and vitamins across Amazon, Walmart, Target, Bodybuilding.com, iHerb, and Myprotein.
- **[US Retail Arbitrage & Deal Finder](https://apify.com/lonwabo/us-arbitrage-price-comparator)** — Cross-store arbitrage scanner finding high-spread margin opportunities for Amazon FBA & eBay sellers.
- **[US Beauty Arbitrage & Deal Alert Bot](https://apify.com/lonwabo/us-beauty-deal-alert-bot)** — Automated 24/7 watchdog sending instant Telegram & Discord push alerts for 20%+ beauty discounts.

* **[South Africa Retail Price Comparator (Takealot, Makro, Amazon ZA, Bob Shop, Game)](https://apify.com/lonwabo/south-africa-retail-price-comparator)** — Compare ZAR prices across South Africa's top 5 online retailers.

***

### 💬 Support & Feedback

Need a custom retailer added, feature request, or assistance?

- Use the **Issues** tab on this Actor's page in the Apify Console.
- Follow and contact [Lonwabo Mfundisi on Apify](https://apify.com/lonwabo).

# Actor input Schema

## `searchTerms` (type: `array`):

Products, model numbers, or keywords to compare across Amazon, Best Buy, Walmart, and Newegg (e.g., 'Sony WH-1000XM5', 'GeForce RTX 4070 Super', 'Apple AirPods Pro 2', 'Samsung 990 Pro 2TB').

## `includeAmazon` (type: `boolean`):

Include Amazon US consumer electronics & PC gear.

## `includeBestBuy` (type: `boolean`):

Include Best Buy electronics & tech retail.

## `includeWalmart` (type: `boolean`):

Include Walmart US electronics & laptops.

## `includeNewegg` (type: `boolean`):

Include Newegg — GPUs, CPUs & PC components.

## `maxItemsPerStore` (type: `integer`):

Number of candidate products to fetch from each store per search term.

## `minPrice` (type: `integer`):

Ignore cheap accessories, cables, or small add-ons below this USD price.

## `maxPrice` (type: `integer`):

Maximum item price ceiling in USD ($).

## `excludeAccessories` (type: `boolean`):

Automatically filters out stands, chargers, cases, covers, skins, and cables when searching for main hardware/products.

## `brandNewOnly` (type: `boolean`):

Excludes second-hand, used, pre-owned, and refurbished listings from skewing the lowest price comparison.

## `inStockOnly` (type: `boolean`):

Only include store offers currently available in stock.

## `onlyMultiStoreMatches` (type: `boolean`):

When enabled, filters out products that only appear in a single store, focusing strictly on direct cross-store price comparisons.

## `sortBy` (type: `string`):

Choose how the comparison dataset is ordered.

## `includeFields` (type: `array`):

Deselect optional dense fields to keep dataset lightweight. Core comparison fields (Product Name, Best Price, Lowest Store, Spread/Savings, Deal URL) are permanently included and cannot be removed.

## `minSimilarityScore` (type: `number`):

Similarity score (0.2 to 0.9) required to match products across different stores. Default 0.55 is calibrated for this category.

## `proxyConfiguration` (type: `object`):

Proxy configuration. Using Apify Residential proxies (groups: \['RESIDENTIAL']) is highly recommended to bypass US retailer bot mitigation.

## Actor input object example

```json
{
  "searchTerms": [
    "Sony WH-1000XM5",
    "GeForce RTX 4070"
  ],
  "includeAmazon": true,
  "includeBestBuy": true,
  "includeWalmart": true,
  "includeNewegg": true,
  "maxItemsPerStore": 10,
  "minPrice": 10,
  "maxPrice": 5000,
  "excludeAccessories": true,
  "brandNewOnly": true,
  "inStockOnly": true,
  "onlyMultiStoreMatches": false,
  "sortBy": "priceSpreadDesc",
  "includeFields": [
    "productImage",
    "brand",
    "specs",
    "storeColumns",
    "dealVerdict"
  ],
  "minSimilarityScore": 0.55,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `htmlReport` (type: `string`):

Interactive side-by-side comparison cards, store tabs, matrix view, search/sort controls, Full Screen toggle, and CSV/JSON/Print export.

## `results` (type: `string`):

Structured dataset containing matched multi-store prices, spreads, store columns, stock status, and direct buy links.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "Sony WH-1000XM5",
        "GeForce RTX 4070"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lonwabo/us-retail-price-comparator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searchTerms": [
        "Sony WH-1000XM5",
        "GeForce RTX 4070",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lonwabo/us-retail-price-comparator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "Sony WH-1000XM5",
    "GeForce RTX 4070"
  ]
}' |
apify call lonwabo/us-retail-price-comparator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lonwabo/us-retail-price-comparator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/e9LNggat6MwgpE79K/builds/vWeAhuGWySqgiJbxa/openapi.json
