# Walmart Product Scraper (`pratikdani/walmart-product-scraper`) Actor

A data extraction actor specializing in Walmart's product catalog. Efficiently retrieves product details, pricing, availability, and reviews, providing structured data for market analysis, competitor monitoring, and e-commerce applications, ensuring accurate and up-to-date information.

- **URL**: https://apify.com/pratikdani/walmart-product-scraper.md
- **Developed by:** [Pratik Dani](https://apify.com/pratikdani) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 93 total users, 9 monthly users, 99.5% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $15.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Walmart Product Data Extractor

This Walmart Product Data Scraper actor meticulously extracts comprehensive product information directly from Walmart's website, gathering crucial details such as product name, brand, price, availability, detailed descriptions, high-resolution images, customer reviews, ratings, key product specifications, UPC/GTIN codes, variant details (size, color, etc.), seller information (when applicable), and category classifications. This data is invaluable for e-commerce businesses for competitive price monitoring, market research, product assortment optimization, identifying trending products, enriching product catalogs, improving SEO strategies, monitoring customer sentiment, and ultimately making data-driven decisions to enhance profitability and market share within the competitive retail landscape.

### Features

- **Comprehensive Data Extraction:** Captures essential product details like name, price, images, description, availability, and ratings to inform business decisions.
- **Category & Search Term Targeting:** Allows focused data collection based on specific product categories or keywords, saving time and resources.
- **Inventory Monitoring:** Enables tracking of product stock levels to optimize purchasing and avoid missed sales opportunities.
- **Competitor Price Tracking:** Provides insights into competitor pricing strategies for making data-driven adjustments to pricing models.
- **Product Trend Identification:** Facilitates the spotting of popular or trending products on Walmart, informing product development and marketing.
- **Automated Data Delivery:** Streamlines data delivery to preferred platforms (e.g., spreadsheets, databases) for efficient analysis and utilization.

### Output Fields

| Field Name | Type | Description |
|---|---|---|
| `tiktokProfileUrl` | `String` | The URL of the TikTok profile being scraped. |
| `walmartProducts` | `Array<Object>` | An array of Walmart product objects extracted from the profile. |
| `walmartProducts[].productId` | `String` | The unique identifier for the product on Walmart.com. |
| `walmartProducts[].productName` | `String` | The name of the product. |
| `walmartProducts[].productUrl` | `String` | The URL of the product page on Walmart.com. |
| `walmartProducts[].imageUrl` | `String` | The URL of the product image. |
| `walmartProducts[].price` | `Number` | The current price of the product. |
| `walmartProducts[].currency` | `String` | The currency of the price (e.g., "USD"). |
| `walmartProducts[].rating` | `Number` | The average customer rating for the product. |
| `walmartProducts[].reviewCount` | `Number` | The number of customer reviews for the product. |
| `walmartProducts[].availability` | `String` | Indicates whether the product is in stock or out of stock. Possible values might include "In Stock", "Out of Stock", etc. |
| `walmartProducts[].sponsored` | `Boolean` | Indicates whether the product mention/placement on TikTok was sponsored.  |
| `tiktokVideos` | `Array<Object>` | Array of TikTok video metadata where the product appeared |
| `tiktokVideos[].videoId` | `String` | The unique identifier for the TikTok video. |
| `tiktokVideos[].videoUrl` | `String` | The URL of the TikTok video. |
| `tiktokVideos[].views` | `Number` | The number of views on the TikTok video. |
| `tiktokVideos[].likes` | `Number` | The number of likes on the TikTok video. |
| `tiktokVideos[].comments` | `Number` | The number of comments on the TikTok video. |
| `tiktokVideos[].shares` | `Number` | The number of shares on the TikTok video. |
| `tiktokVideos[].description` | `String` | The description/caption of the TikTok video. |
| `tiktokVideos[].uploadDate` | `String` | The date the TikTok video was uploaded (ISO 8601 format). |
| `extractedAt` | `String` | The date and time the data was extracted (ISO 8601 format). |

### Possible Usage of the Actor

- **Optimizing Inventory Management:** Predict demand for specific products in different regions to minimize stockouts and overstocking.
- **Personalized Recommendations:** Develop targeted product recommendations based on customer purchase history, browsing behavior, and demographic data to increase sales and customer loyalty.
- **Competitive Pricing Analysis:** Monitor competitor pricing for similar products in real-time to adjust Walmart's pricing strategies and maintain a competitive edge.
- **Identifying Emerging Trends:** Analyze sales data to identify emerging product trends and consumer preferences to inform product development and merchandising decisions.
- **Supply Chain Optimization:** Identify bottlenecks and inefficiencies in the supply chain by analyzing product sales and inventory data to improve delivery times and reduce costs.
- **Store Placement and Optimization:** Analyze sales data by location to determine the optimal placement of new stores and optimize product assortment within existing stores to meet local demand.

### Example Output

```json
{
  "timestamp": "2025-02-07",
  "url": "https://www.walmart.com/ip/Maple-Leaf-Farms-All-Natural-Whole-Duck-with-Orange-Sauce-Vacuum-Packed-4-7-lbs-Frozen/10451096",
  "final_price": 20.89,
  "sku": "10451096",
  "currency": "USD",
  "gtin": "270935000004",
  "specifications": [
    {
      "name": "Poultry Cut",
      "value": "Whole Chicken"
    },
    {
      "name": "Food Form",
      "value": "Whole"
    },
    {
      "name": "Food Condition",
      "value": "Frozen"
    },
    {
      "name": "Container Type",
      "value": "Vacuum Pack"
    },
    {
      "name": "Size",
      "value": "4 - 7 lbs"
    },
    {
      "name": "Assembled Product Dimensions (L x W x H)",
      "value": "5.00 x 6.50 x 12.00 Inches"
    }
  ],
  "image_urls": [
    "https://i5.walmartimages.com/seo/Maple-Leaf-Farms-All-Natural-Whole-Duck-with-Orange-Sauce-Vacuum-Packed-4-7-lbs-Frozen_d955ab57-5a50-4139-9114-55c07e9a2c83.123957f02fe96015089f2ef99aad62d8.jpeg",
    "https://i5.walmartimages.com/asr/ea7a8cf1-95b1-474b-8ec5-d4a76568c453.dd47f865c316a64673d5984759c4ed5f.jpeg",
    "https://i5.walmartimages.com/asr/02eb89ed-6911-4442-9bbc-9cc50717e738.169076fcf138d6432a14ce5f3017d60f.jpeg",
    "https://i5.walmartimages.com/asr/2a2ad7f2-bc85-4cf4-b02e-89dea42d8c53.66a2dc0f59a3ab7ba5d69e675aa38050.jpeg",
    "https://i5.walmartimages.com/asr/c5ab94ce-d2f3-40f7-9f35-e6e3603fdaf9.6e77477ddb6b931b94d54ba3efe670b2.jpeg",
    "https://i5.walmartimages.com/asr/5193d5b5-76e0-4075-a715-61fa9a0cd59a.32453cfa2a3e6e3e697377cb599118cb.jpeg",
    "https://i5.walmartimages.com/asr/547f2e47-b2b1-43b7-99e3-c749df2fa4e1.fd1d544715d9785aae7ef886967585d3.jpeg"
  ],
  "top_reviews": {
    "negative": {
      "rating": 1,
      "review": "Didn't get my duckling after ordering it after paid for it"
    },
    "positive": {
      "rating": 4,
      "review": "I'm a big fan of duck. There isn't much choice besides this brand locally and they are nice, but a bit on the small size. Nicely packaged, includes necks, giblets, and liver for stock.  It also includes a packet of orange sauce, which I suppose is nice, but I don't use it (like to make my own) so you are paying $3.50/lb for sugar water, flavoring and preservatives. Used to raise my own, probably will go back to that."
    }
  },
  "rating_stars": {
    "five_stars": 15,
    "four_stars": 3,
    "one_star": 11,
    "three_stars": 1,
    "two_stars": 1
  },
  "related_pages": [
    "https://www.walmart.com/browse/food/beef-patties/976759_9569500_5667623_1405603",
    "https://www.walmart.com/browse/food/ground-beef-patties/976759_9569500_1730435_7586253",
    "https://www.walmart.com/c/kp/haitian-patties",
    "https://www.walmart.com/browse/food/ribeye-rich-juicy-flavorful/976759_9569500_6677247_7958330",
    "https://www.walmart.com/browse/food/ground-beef/976759_9569500_5667623_3481824",
    "https://www.walmart.com/c/kp/ground-family",
    "https://www.walmart.com/c/kp/whole-ducks",
    "https://www.walmart.com/browse/food/beef-steaks/976759_9569500_1730435_3846672",
    "https://www.walmart.com/c/kp/ground-beef-patties-halal",
    "https://www.walmart.com/c/kp/frichik",
    "https://www.walmart.com/c/kp/beef-eye"
  ],
  "available_for_delivery": false,
  "available_for_pickup": true,
  "brand": "Maple Leaf Farms",
  "breadcrumbs": [
    {
      "name": "Food",
      "url": "https://www.walmart.com/cp/food/976759"
    },
    {
      "name": "Meat & Seafood",
      "url": "https://www.walmart.com/cp/meat-seafood/9569500"
    },
    {
      "name": "Chicken",
      "url": "https://www.walmart.com/browse/food/chicken/976759_9569500_1001443"
    },
    {
      "name": "Whole Chicken",
      "url": "https://www.walmart.com/browse/food/whole-chicken/976759_9569500_1001443_4759356"
    }
  ],
  "category_ids": "0:976759:9569500:1001443:4759356",
  "review_count": 31,
  "description": "Our All Natural Frozen Whole Duck with Orange Sauce is lightly marinated in water &amp; sea salt to keep it moist for cooking. Easy to get creative with, you can roast whole, cut up, or save the carcass for duck stock. Use the convenient orange sauce as a glaze or on the side for dipping. Maple Leaf Farms duck is cared for in a free-to-roam environment on small family duck farms throughout Northern Indiana according to our Trident Stewardship program guidelines for duck well-being.",
  "product_id": "10451096",
  "product_name": "Maple Leaf Farms All Natural Whole Duck with Orange Sauce, Vacuum Packed Bag , 4-7 lbs (Frozen)",
  "review_tags": [
    "Taste (5)",
    "Price (3)"
  ],
  "category_url": "https://www.walmart.com/browse/food/whole-chicken/976759_9569500_1001443_4759356",
  "category_name": "Whole Chicken",
  "category_path": "/cp/whole-chicken/4759356",
  "root_category_url": "https://www.walmart.com/cp/food/976759",
  "root_category_name": "Food",
  "upc": "270935000004",
  "tags": [
    "Popular pick"
  ],
  "main_image": "https://i5.walmartimages.com/seo/Maple-Leaf-Farms-All-Natural-Whole-Duck-with-Orange-Sauce-Vacuum-Packed-4-7-lbs-Frozen_d955ab57-5a50-4139-9114-55c07e9a2c83.123957f02fe96015089f2ef99aad62d8.jpeg",
  "rating": 3.3,
  "unit_price": 3.47,
  "unit": "lb",
  "aisle": "A35",
  "free_returns": "Free 90-day returns",
  "sizes": [],
  "colors": [],
  "seller": "Wal***t.c***",
  "other_attributes": [
    {
      "name": "Instructions",
      "value": "Thaw duck in refrigerator 36-48 hours. Preheat oven to 375 degrees Fahrenheit. Strip bag off duck. Remove neck, giblets, and orange sauce packet form body cavity. Rinse duck under cool water. Season to taste. Roast uncovered breast up, on rack in roasting pan for 26 min per lb."
    },
    {
      "name": "Safe Handling Instructions",
      "value": "Keep refrigerated or frozen."
    }
  ],
  "customer_reviews": [
    {
      "name": "******",
      "rating": 5,
      "review": "Super good my first time trying it and I love it so crispy."
    },
    {
      "name": "******",
      "rating": 5,
      "review": "Love to cook but shy away from specialty dishes like duck, lamb, rabbit, etc; (fur friends I cuddle in my mind :), plus, too expensive to risk a flub! After seeing Walmart offer Maple Leaf Duck for a fair price, I decided it's now or never to check this one off my 'bucket list'. But before I could take the plunge, I researched Maple Leaf to see how they raise and process their ducks. I had to weigh this 'checking of the wish' off my bucket list, with knowing one of these beautiful feathery friends were harvested at the ripe ol' age of seven weeks - could I do it? I mean, I'm not a vegetarian, but gee-wiz, just\u00a0 thinking about the adorable AFLAC Duck quacking, was messing me all up, lol!! I never researched the harvesting of my burger buddies, pork pals or bass besties? So why all this comtemplating? Was it conviction, compassion... what for heavens sake?And then it came to me, like a light bulb moment! Heaven... yes! Whatever duck I cook has already met it's Maker and most likely enjoying a much greater life. I was satisfied my reasoning and the information provided by Maple Leaf Farms.  I knew I would do right by the little guy to honor its life, so I placed the order.  I followed a chef's recipe for Duck Ala' Orange after brining the bird in 4 cups of my homemade cajun chicken stock, and 1 cup each of pineapple and orange juice; then roasted accordingly. It was delicious! Perfectly cooked, moist, tender and full of flavor. Not gamey in the least, and actually tasted better than chicken to me (a lil' high-five to our feathered  friend ;) . I also made a savory duck stock from the juices and bits with a splash of merlot, yum! All in all, this was one of my favorite bucket list adventures and a great overall experience. So glad I did it! Now, we forge ahead to next on our list, lamb! Wait... lamb? As in, 'mary had a little lamb'... that snuggly wooley friend?? Oh deer!",
      "title": "Roasting My First Duck"
    },
    {
      "name": "******",
      "rating": 5,
      "review": "I always cook duck for Christmas. It comes out fantastic and flavorful marinade in advance and slow cook it and it will be the best duck you ever had.",
      "title": "Quack quack"
    },
    {
      "name": "******",
      "rating": 4,
      "review": "I'm a big fan of duck. There isn't much choice besides this brand locally and they are nice, but a bit on the small size. Nicely packaged, includes necks, giblets, and liver for stock.  It also includes a packet of orange sauce, which I suppose is nice, but I don't use it (like to make my own) so you are paying $3.50/lb for sugar water, flavoring and preservatives. Used to raise my own, probably will go back to that.",
      "title": "Nice product for roast duck fans"
    },
    {
      "name": "******",
      "rating": 3,
      "review": "I bought the whole duck with orange sauce and although the duck was great the orange sauce didn't go well with the duck at all"
    },
    {
      "name": "Bea***ce",
      "rating": 1,
      "review": "Didn't get my duckling after ordering it after paid for it"
    },
    {
      "name": "NaV***302***",
      "rating": 1,
      "review": "Duck is a special treat for Christmas dinner. This one was TERRIBLE. It was tough even though I cooked it exactly as the package directions. It was so tough that the only way to eat it was to pick up the bone and chew pieces off. And it had very little flavor. It was so terrible that we threw away half of the duck. Never EVER will I buy this product again.",
      "title": "Awful duck, little flavor."
    },
    {
      "name": "Ken***h",
      "rating": 1,
      "review": "i ordered duck not duck suace i want a refund",
      "title": "i want a refund"
    },
    {
      "name": "Sam***ha",
      "rating": 1,
      "review": "she delivered my duck to the wrong address",
      "title": "Bad"
    },
    {
      "name": "Ben***in",
      "rating": 1,
      "review": "Please do not send any Ducks."
    }
  ],
  "ingredients": "Duck, Water, and Sea Salt. Orange Sauce Packet: Orange juice (water, concentrated orange juice), water, turbinado sugar, corn starch, citric acid, sea salt, canola oil, dried torula yeast, guar gum, natural flavor, spice, dehydrated onion.",
  "initial_price": null,
  "discount": null,
  "ingredients_full": [
    {
      "type": "Ingredients",
      "values": "Duck, Water, and Sea Salt. Orange Sauce Packet: Orange juice (water, concentrated orange juice), water, turbinado sugar, corn starch, citric acid, sea salt, canola oil, dried torula yeast, guar gum, natural flavor, spice, dehydrated onion."
    }
  ],
  "categories": [
    "Food",
    "Meat & Seafood",
    "Chicken",
    "Whole Chicken"
  ]
}
```

# Actor input Schema

## `url` (type: `string`):

Walmart product page URL.

## Actor input object example

```json
{
  "url": "https://www.walmart.com/ip/Starburst-Pink-Yellow-Mix-Chewy-Fruit-Candy-3-lbs-Original-Strawberry-Lemon-Soft-Chew-Candies-Bulk-Family-Size-Assortment-Pack-Individually-Wrapped-4/1016450755"
}
```

# 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 = {
    "url": "https://www.walmart.com/ip/Starburst-Pink-Yellow-Mix-Chewy-Fruit-Candy-3-lbs-Original-Strawberry-Lemon-Soft-Chew-Candies-Bulk-Family-Size-Assortment-Pack-Individually-Wrapped-4/1016450755"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pratikdani/walmart-product-scraper").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 = { "url": "https://www.walmart.com/ip/Starburst-Pink-Yellow-Mix-Chewy-Fruit-Candy-3-lbs-Original-Strawberry-Lemon-Soft-Chew-Candies-Bulk-Family-Size-Assortment-Pack-Individually-Wrapped-4/1016450755" }

# Run the Actor and wait for it to finish
run = client.actor("pratikdani/walmart-product-scraper").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 '{
  "url": "https://www.walmart.com/ip/Starburst-Pink-Yellow-Mix-Chewy-Fruit-Candy-3-lbs-Original-Strawberry-Lemon-Soft-Chew-Candies-Bulk-Family-Size-Assortment-Pack-Individually-Wrapped-4/1016450755"
}' |
apify call pratikdani/walmart-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pratikdani/walmart-product-scraper"
        }
    }
}

```

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/sgNWmgYljZ24i2CGY/builds/LsFVi7MTufMRMlhUf/openapi.json
