# Walmart Product API — Prices, Stock & Specs (`gauravlabs/walmart-product-api`) Actor

Extract Walmart US product details by item ID or URL, scoped to a store or ZIP: prices, availability, sellers, UPC, descriptions, images and specifications.

- **URL**: https://apify.com/gauravlabs/walmart-product-api.md
- **Developed by:** [Gaurav Kumar Choudhary](https://apify.com/gauravlabs) (community)
- **Categories:** E-commerce, Developer tools
- **Stats:** 1 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 successful product requests

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

## Walmart Product API — Prices, Stock & Specs

### At a glance

- Collect: One product record per item, with available store price, stock text and specifications.
- Input: use the runnable example below or the prefilled Input form.
- Output: the default dataset supports JSON/CSV/Excel export; see output modes below.
- Billing: $2 per 1,000 successful product requests. Optional missing fields do not turn a valid product into a failed request. No startup fee. Platform usage may be additional.
- Limits: No verified inventory quantities, checkout-price guarantee or automatic cross-run price alerts.

Extract Walmart US product details by item ID or URL, scoped to a store or ZIP: prices, availability, sellers, UPC, descriptions, images and specifications.

### Quick start

```json
{
  "products": [
    "18611919209"
  ],
  "storeId": "1735",
  "maxRequests": 1
}
```

Provide exactly one of storeId or zipcode. Keep ZIP codes as strings. Inputs are validated before any request. Duplicate inputs are skipped, and maxRequests caps unique requests per run.

### Output and exports

Results are stored in the default dataset, exportable as JSON, CSV or Excel. Store context and UTC fetch timestamps accompany records. SUMMARY in the key-value store reports successful requests, results, safe failures and budget stops. Partial batches retain completed results.

### Billing

Launch price: **$2 per 1,000 successfully validated product records. Optional missing fields do not make a product request free**. No startup fee or monthly rental. Failed or invalid responses are not billed. Consult the live Pricing tab for current pricing and platform terms. Set a maximum total charge per run to control spending.

### Limitations

US Walmart product details only. No keyword search, pagination or individual review text. Optional fields may be absent or null; no prices or inventory quantities are invented. Descriptions may contain HTML and must be sanitized before rendering.

Prices and availability are point-in-time signals for the returned store context, not guaranteed checkout prices or verified stock quantities. Availability depends on Walmart and supported store coverage. No Walmart login or customer API key is required.

### Support

Open an issue with your run ID, input example and expected behavior—never include credentials. For custom integrations or other data needs, contact the developer through the profile contact details.

Independent tool, not affiliated with or endorsed by Walmart.

### Minimal API example

Store your own Apify token in `APIFY_TOKEN`; never paste it into public input or code. This example uses the same small input as the prefilled form.

```python
import os
import requests

response = requests.post(
    "https://api.apify.com/v2/acts/gauravlabs~walmart-product-api/run-sync-get-dataset-items",
    headers={"Authorization": "Bearer " + os.environ["APIFY_TOKEN"]},
    json={"products":["18611919209"],"storeId":"1735"},
    timeout=300,
)
response.raise_for_status()
print(response.json())
```

For large batches, start an asynchronous run with `/runs`, wait for its final status, and retrieve its default dataset. HTTP success when starting a run does not prove the extraction succeeded.

#### Minimal output shape (illustrative)

The following shows one documented field, not a fresh result or a promised yield. Inspect the output reference above for the complete schema.

```json
{
  "stockStatus": "unknown"
}
```

### Practical workflow and accuracy notes

`priceStatus` distinguishes a numeric quote from missing price. `stockStatus` is inStock/outOfStock only for recognized source states; otherwise unknown. Missing price is not evidence of out-of-stock. Explicit store mismatches are rejected. Schedule fixed product/store inputs and compare exported timestamps and prices to build a monitoring workflow. `requestRetries` defaults to one bounded retry; successful input items are charged once.

# Actor input Schema

## `products` (type: `array`):

Numeric Walmart item IDs or HTTPS walmart.com/ip/ URLs. Duplicates are skipped.

## `storeId` (type: `string`):

Provide this OR zipcode, not both. Example 1735. Clear this example when using zipcode.

## `zipcode` (type: `string`):

Provide this OR storeId, not both. Keep leading zeros.

## `maxRequests` (type: `integer`):

Hard cap on unique billable input requests, not dataset rows.

## `requestTimeoutSecs` (type: `integer`):

Timeout per attempt. A retry can approximately double a single input request duration.

## `requestRetries` (type: `integer`):

Retry at most once for unavailable or unusable responses. Each successful input is charged once. Set 0 to disable Actor retries.

## Actor input object example

```json
{
  "products": [
    "18611919209"
  ],
  "storeId": "1735",
  "maxRequests": 10,
  "requestTimeoutSecs": 90,
  "requestRetries": 1
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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 = {
    "products": [
        "18611919209"
    ],
    "storeId": "1735"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gauravlabs/walmart-product-api").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 = {
    "products": ["18611919209"],
    "storeId": "1735",
}

# Run the Actor and wait for it to finish
run = client.actor("gauravlabs/walmart-product-api").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 '{
  "products": [
    "18611919209"
  ],
  "storeId": "1735"
}' |
apify call gauravlabs/walmart-product-api --silent --output-dataset

```

## MCP server setup

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

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/bXccXPgv6kKcbSKhC/builds/7CTyDW53Pp1XsQbcE/openapi.json
