# Walmart Data Extractor

Extract product information from Walmart, fields include Product_name, Product_ID, Product_link, etc.

- Template page: [https://www.octoparse.com/template/walmart-data-extractor](https://www.octoparse.com/template/walmart-data-extractor)
- Categories: E-Commerce
- Status: `PUBLISHED`
- Run mode: `CLOUD`

## Pricing

Current price: **$1/1,000 lines**. Billing is based on output rows; an Octoparse subscription may be required.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from detail pages.

## Output

The current workflow extracts 13 fields, including `availability`, `averageRating`, `brand`, `category`, `itemType`, `name`, `priceInfo.price`, `productUrl`, `rating`, `sellerName`, `text`, `title`, `usItemId`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Walmart URLs or Item IDs, Search Keywords, Collect Reviews and start the template in cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

At least one of the following input combinations is required:

- **Walmart URLs or Item IDs**
- **Search Keywords**

### Walmart URLs or Item IDs

Required when using its input combination. Walmart URLs or Item IDs (MainKeys) Constraints: minItems=1; maxItems=100000; items.minLength=1; items.maxLength=50000.

### Search Keywords

Required when using its input combination. Search Keywords (MainKeys1) Constraints: minItems=1; maxItems=100000; items.minLength=1; items.maxLength=5000.

### Collect Reviews

Optional. Collect Reviews (includeReviews) Constraints: default=false.

### Listing/Search Pages (pageSize)

Optional. Listing/Search Pages (pageSize) Constraints: minimum=1, maximum=100000.

### Review Pages per Product (reviewPageSize)

Optional. Review Pages per Product (reviewPageSize) Constraints: minimum=1, maximum=100000.

## How to Use

## Walmart Data Extractor

Walmart Data Extractor is a ready-made Walmart product scraper for Walmart US. It collects product and review data from product pages, listing pages, search pages, item IDs, or keywords. It runs in Octoparse Cloud.

It creates a product row for each discovered item. When review collection is enabled, it also creates separate review rows and copies the related product context into each review row. `itemType` distinguishes `Product` rows from `Review` rows; `usItemId` and `productUrl` tie both row types to the same Walmart item. Product and review rows share the same 13 fields.

## Pricing

Charges by output lines:

- Free and Standard users: $1.00 per 1,000 output lines.
- Professional users: $0.80 per 1,000 output lines.
- Enterprise users: $0.60 per 1,000 output lines.

## Output

Product rows include fields such as `availability`, `priceInfo.price`, `name`, `averageRating`, `sellerName`, `category`, and `brand`. Review rows include `rating`, `title`, and `text` while retaining the matching product context.

## Input

- **Walmart URLs or Item IDs (MainKeys)**: Required. Enter at least one Walmart US product-detail URL, listing URL, search URL, or bare item ID. Multiple entries are supported. At least one MainKeys value is required even when using SearchKeys.
- **Search Keywords (SearchKeys)**: Optional Walmart search keywords. Multiple keywords are supported; products discovered from them are added to the same run.
- **Collect Reviews (includeReviews)**: Choose whether to create individual review rows. Enabled by default.
- **Listing/Search Pages (pageSize)**: Number of listing or search-result pages to collect for each listing or keyword input. Leave blank to continue until a natural stop, subject to the template's 100-page safety limit.
- **Review Pages per Product (reviewPageSize)**: Number of review-list pages to collect for each product. Leave blank to continue until a natural stop, subject to the template's 100-page-per-product safety limit.

## How to Use

1. Open Walmart Data Extractor and click **Try it!**.
2. Enter one or more Walmart US URLs or item IDs in **Walmart URLs or Item IDs (MainKeys)**, then add optional values in **Search Keywords (SearchKeys)**.
3. Choose whether to collect reviews and set the two page-count controls when you want a bounded run.
4. Start the task in Octoparse Cloud.
5. Review `Product` and `Review` rows in Data Preview, then export the results in the needed format.

## Limitations

- Targets the US marketplace at `www.walmart.com`; it does not switch to other Walmart country sites.
- Stops listing or search pagination after 100 pages per input, even when **Listing/Search Pages (pageSize)** is blank or set above that limit.
- Stops review pagination after 100 pages per product, even when **Review Pages per Product (reviewPageSize)** is blank or set above that limit.
- Omits empty review shells and rating-only entries that contain neither a review title nor review text.

## Tips

- Start with one known Walmart product URL and a small review-page value, then confirm the product and review rows before expanding the batch.
- Use `usItemId` as the stable product key and `itemType` to separate product rows from review rows after export.
- Set explicit page values for repeatable scheduled runs; leaving either page control blank can produce a larger dataset as Walmart's result count changes.
- Deduplicate repeated products by `usItemId` when URLs, list pages, and keywords may discover the same Walmart item.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [Google Maps Email Scraper & Extractor](https://www.octoparse.com/template/google-maps-contact-scraper)
- [Scrape Deldure Data](https://www.octoparse.com/template/scrape-deldure-data)
- [Leboncoin Data Scraper](https://www.octoparse.com/template/leboncoin-data-scraper)
- [North Data Scraper](https://www.octoparse.com/template/north-data-scraper)
- [Kompass Data Scraper](https://www.octoparse.com/template/kompass-scraper)

## Input Schema

```json
{
  "title": "Walmart Data Extractor input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "walmart_URLs_or_Item_IDs": {
      "title": "Walmart URLs or Item IDs",
      "description": "Walmart URLs or Item IDs (MainKeys)",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50000
      },
      "minItems": 1,
      "maxItems": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "search_Keywords": {
      "title": "Search Keywords",
      "description": "Search Keywords (MainKeys1)",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 5000
      },
      "minItems": 1,
      "maxItems": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "collect_Reviews": {
      "title": "Collect Reviews",
      "description": "Collect Reviews (includeReviews)",
      "type": "boolean",
      "default": false,
      "x-octoparse": {
        "apiEnabled": false
      }
    },
    "listing/Search_Pages": {
      "title": "Listing/Search Pages (pageSize)",
      "description": "Listing/Search Pages (pageSize)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "review_Pages_per_Product": {
      "title": "Review Pages per Product (reviewPageSize)",
      "description": "Review Pages per Product (reviewPageSize)",
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [],
  "anyOf": [
    {
      "title": "Walmart URLs or Item IDs",
      "required": [
        "walmart_URLs_or_Item_IDs"
      ]
    },
    {
      "title": "Search Keywords",
      "required": [
        "search_Keywords"
      ]
    }
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "listing/Search_Pages": 1,
  "search_Keywords": [
    "pillow"
  ]
}
```

Example 2

```json
{
  "listing/Search_Pages": 1,
  "walmart_URLs_or_Item_IDs": [
    "https://www.walmart.com/ip/3086199839"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "availability": {
      "type": "string",
      "description": ""
    },
    "averageRating": {
      "type": "string",
      "description": ""
    },
    "brand": {
      "type": "string",
      "description": ""
    },
    "category": {
      "type": "string",
      "description": ""
    },
    "itemType": {
      "type": "string",
      "description": ""
    },
    "name": {
      "type": "string",
      "description": ""
    },
    "priceInfo.price": {
      "type": "string",
      "description": ""
    },
    "productUrl": {
      "type": "string",
      "description": ""
    },
    "rating": {
      "type": "string",
      "description": ""
    },
    "sellerName": {
      "type": "string",
      "description": ""
    },
    "text": {
      "type": "string",
      "description": ""
    },
    "title": {
      "type": "string",
      "description": ""
    },
    "usItemId": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Walmart Data Extractor output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "availability": "IN_STOCK",
  "averageRating": "4.4",
  "brand": "Mainstays",
  "category": "Home > Bedding > Bed Pillows > Side Sleeper Pillows",
  "itemType": "Product",
  "name": "(2 pack) Mainstays Comfort Complete Bed Pillow, Standard/Queen",
  "priceInfo.price": "$6.88",
  "productUrl": "https://walmart.com/ip/2-pack-Mainstays-Comfort-Complete-Bed-Pillow-Standard-Queen/3086199839",
  "rating": "",
  "sellerName": "Walmart.com",
  "text": "",
  "title": "",
  "usItemId": "3086199839"
}
```

Example 2

```json
{
  "availability": "IN_STOCK",
  "averageRating": "4.4",
  "brand": "Mainstays",
  "category": "Home > Bedding > Bed Pillows > Side Sleeper Pillows",
  "itemType": "Product",
  "name": "(2 pack) Mainstays Comfort Complete Bed Pillow, Standard/Queen",
  "priceInfo.price": "$6.88",
  "productUrl": "https://walmart.com/ip/2-pack-Mainstays-Comfort-Complete-Bed-Pillow-Standard-Queen/3086199839",
  "rating": "",
  "sellerName": "Walmart.com",
  "text": "",
  "title": "",
  "usItemId": "3086199839"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "walmart-data-extractor",
  "taskName": "Walmart Data Extractor",
  "parameters": "{\"listing/Search_Pages\":1,\"search_Keywords\":[\"pillow\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"listing/Search_Pages\":1,\"search_Keywords\":[\"pillow\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "walmart-data-extractor",
        "taskName": "Walmart Data Extractor",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "walmart-data-extractor",
  "taskName": "Walmart Data Extractor",
  "parameters": "{\"listing/Search_Pages\":1,\"search_Keywords\":[\"pillow\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `walmart-data-extractor`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/walmart-data-extractor.json)
- [Manifest](https://www.octoparse.com/templates/walmart-data-extractor-manifest.json)
