ScreenshotNeo

BlogHow-to

How to Scrape Walmart Product Data with an API

Use Walmart’s authorized affiliate and Marketplace APIs for product data, with OAuth examples, quotas, compliance rules, and production fixes.

By the ScreenshotNeo team1 October 20268 min read

Direct answer: use an approved Walmart API that matches your role. Affiliate publishers can request catalog-feed access through Walmart I/O. Marketplace sellers and solution providers should use Marketplace APIs such as Item Search. Walmart’s Terms of Use prohibit automated scraping or data mining of Walmart.com without Walmart’s express prior written consent, so a proxy, headless browser, or slower crawler does not make ordinary page scraping authorized.

This guide shows the compliant API paths, OAuth flow, feed filters, identifier search, production handling, and common failure fixes. It does not provide a way to bypass Walmart access controls or collect data without permission.

1. Choose the right Walmart data path

Your role Use Best for
Affiliate publisher Walmart I/O affiliate catalog APIs Advertising Walmart.com products and requesting catalog feeds
Marketplace seller or solution provider Walmart Marketplace APIs Your listings, inventory, orders, prices, and seller workflows
Unaffiliated researcher or crawler No public-page scraping without express written consent Request written approval before collecting Walmart.com materials

Walmart’s Terms of Use prohibit using a robot, spider, retrieval application, or other device to scrape, data-mine, index, or gather materials without express prior written consent, including product listings, descriptions, and prices. See Walmart’s current Terms of Use before designing a collection workflow.

Affiliate API access is restricted to approved Walmart I/O partners using the data to advertise Walmart.com products; Feed API access is requested through that program. Marketplace APIs are intended for sellers and solution providers and include sandbox support in Walmart’s workflow documentation.

2. Affiliate Product Catalog Snapshot API

The catalog flow has two requests:

  1. Obtain an OAuth bearer token with client credentials.
  2. Use that token to request the product feed.

Keep the client secret on your server. The documented example returns expires_in: 3600, so refresh the token when it expires instead of treating it as permanent.

2.1 Get an OAuth token with cURL

curl -X POST "YOUR_WALMART_IDENTITY_ENDPOINT" \
  -H "WM_CONSUMER.ID: YOUR_CONSUMER_ID" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "grant_type=client_credentials" \
  --data-urlencode "client_id=YOUR_CLIENT_ID" \
  --data-urlencode "client_secret=YOUR_CLIENT_SECRET"

Use the identity endpoint and credential names supplied for your approved Walmart I/O application. Do not place the client secret in browser code, a mobile app, a public repository, or a client-side request.

2.2 Request a catalog feed with cURL

curl -G "YOUR_WALMART_API_BASE/affil/catalog-api/v2/product/feeds/items" \
  -H "WM_CONSUMER.ID: YOUR_CONSUMER_ID" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-urlencode "categoryId=YOUR_CATEGORY_ID" \
  --data-urlencode "feedType=catalog" \
  -o walmart-feed.json

With no query parameters, the service returns Walmart offers. Use categoryId for a category-specific feed. Add feedType=catalog when your approved use requires Walmart and marketplace offers. The documentation describes these as daily snapshots, so design downstream refreshes around that behavior.

2.3 Python implementation

import os
import requests

identity_endpoint = os.environ["WALMART_IDENTITY_ENDPOINT"]
api_base = os.environ["WALMART_API_BASE"]
consumer_id = os.environ["WALMART_CONSUMER_ID"]

credentials = {
    "grant_type": "client_credentials",
    "client_id": os.environ["WALMART_CLIENT_ID"],
    "client_secret": os.environ["WALMART_CLIENT_SECRET"],
}

token_response = requests.post(
    identity_endpoint,
    headers={"WM_CONSUMER.ID": consumer_id},
    data=credentials,
    timeout=30,
)
token_response.raise_for_status()
token = token_response.json()["access_token"]

feed_response = requests.get(
    f"{api_base}/affil/catalog-api/v2/product/feeds/items",
    headers={
        "WM_CONSUMER.ID": consumer_id,
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json",
    },
    params={"categoryId": os.getenv("WALMART_CATEGORY_ID"), "feedType": "catalog"},
    timeout=90,
)
feed_response.raise_for_status()
with open("walmart-feed.json", "wb") as output:
    output.write(feed_response.content)

2.4 Node.js implementation

const identityEndpoint = process.env.WALMART_IDENTITY_ENDPOINT;
const apiBase = process.env.WALMART_API_BASE;
const consumerId = process.env.WALMART_CONSUMER_ID;

const tokenBody = new URLSearchParams({
  grant_type: 'client_credentials',
  client_id: process.env.WALMART_CLIENT_ID,
  client_secret: process.env.WALMART_CLIENT_SECRET
});

const tokenRes = await fetch(identityEndpoint, {
  method: 'POST',
  headers: {
    'WM_CONSUMER.ID': consumerId,
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: tokenBody
});
if (!tokenRes.ok) throw new Error(`Token request failed: ${tokenRes.status}`);
const { access_token: token } = await tokenRes.json();

const url = new URL(`${apiBase}/affil/catalog-api/v2/product/feeds/items`);
url.searchParams.set('feedType', 'catalog');
if (process.env.WALMART_CATEGORY_ID) {
  url.searchParams.set('categoryId', process.env.WALMART_CATEGORY_ID);
}
const feedRes = await fetch(url, {
  headers: {
    'WM_CONSUMER.ID': consumerId,
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  }
});
if (!feedRes.ok) throw new Error(`Feed request failed: ${feedRes.status}`);
require('node:fs').writeFileSync('walmart-feed.json', Buffer.from(await feedRes.arrayBuffer()));

Use Marketplace Item Search when your integration needs keyword or identifier lookups in Walmart’s global product catalog. Supported identifiers include UPC, GTIN, EAN, ISBN, and ASIN. Searches return published items and return up to 40 default matches.

3.1 cURL request pattern

curl -G "YOUR_WALMART_MARKETPLACE_ITEM_SEARCH_ENDPOINT" \
  -H "WM_CONSUMER.ID: YOUR_CONSUMER_ID" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --data-urlencode "query=coffee maker"

Use the exact endpoint, authentication headers, and parameter names assigned to your Marketplace application. Replace query with the documented keyword or identifier parameter for your API version when searching by UPC, GTIN, EAN, ISBN, or ASIN.

3.2 Python request

import os
import requests

response = requests.get(
    os.environ["WALMART_ITEM_SEARCH_ENDPOINT"],
    headers={
        "WM_CONSUMER.ID": os.environ["WALMART_CONSUMER_ID"],
        "Authorization": f"Bearer {os.environ['WALMART_ACCESS_TOKEN']}",
    },
    params={"query": "coffee maker"},
    timeout=30,
)
response.raise_for_status()
items = response.json()

3.3 Node.js request

const searchUrl = new URL(process.env.WALMART_ITEM_SEARCH_ENDPOINT);
searchUrl.searchParams.set('query', 'coffee maker');
const response = await fetch(searchUrl, {
  headers: {
    'WM_CONSUMER.ID': process.env.WALMART_CONSUMER_ID,
    'Authorization': `Bearer ${process.env.WALMART_ACCESS_TOKEN}`
  }
});
if (!response.ok) throw new Error(`Item search failed: ${response.status}`);
const items = await response.json();

4. Feed scope, freshness, and data semantics

  • Walmart offers: the default affiliate feed scope.
  • Walmart plus marketplace offers: request feedType=catalog when your approved use requires both.
  • Category filtering: pass categoryId to limit the snapshot.
  • Daily snapshots: treat feed data as a periodic snapshot rather than a real-time price or inventory stream.
  • Published-only Item Search: unpublished items do not appear; publication restrictions can also affect out-of-stock visibility.

Store the retrieval timestamp and source endpoint with every import. Prices, availability, publication state, and feed contents can change, so do not present an old snapshot as current without showing its age.

5. Quotas, licensing, and production design

The affiliate terms cited in the research specify a 5,000-call daily limit; request a higher limit in writing if your approved workload needs one. Marketplace terms allow Walmart to change limits, availability, fees, or access and to suspend or revoke keys.

  • Cache responses only as the applicable license permits.
  • Use exponential backoff for transient failures and stop retrying authentication failures until credentials are fixed.
  • Schedule category feeds once per documented snapshot period instead of polling continuously.
  • Queue identifier searches and deduplicate keys before sending requests.
  • Track HTTP status, request ID, token age, endpoint, query, and response timestamp.
  • Keep raw responses separate from normalized records so you can reprocess schema changes.
  • Do not redistribute Walmart materials as a standalone data service or use them to build a competing product where the license prohibits it.
  • Re-check current partner documentation before publishing a quota, fee, or endpoint as a permanent guarantee.

6. Common errors and fixes

Symptom Likely cause Fix
401 or 403 on token request Wrong client credentials, consumer ID, or application permissions Verify the approved application values and send the consumer ID in the required header.
401 on feed or search Missing, expired, or malformed bearer token Request a new token, send Authorization: Bearer ..., and avoid logging the token.
Empty category feed Invalid category ID, unsupported scope, or no records in the snapshot Try an approved category, remove the filter, and confirm the feed’s snapshot schedule.
Marketplace search returns fewer items than expected Only published items are returned and the default maximum is 40 Check publication state and use the documented pagination or filtering controls for your API version.
429 or quota error Daily limit or rate limit exceeded Back off, reduce polling, cache permitted results, and request a written limit increase when needed.
Data appears stale Daily snapshot behavior or cached response Record retrieval time, refresh on the documented cadence, and label snapshot age to users.
Access is suspended Terms, redistribution, volume, or credential violation Stop requests, review the applicable license, and contact Walmart through the approved partner channel.

7. When a rendered page capture is actually permitted

If Walmart has given your organization express written permission to capture specific pages for an approved workflow, a browser screenshot can document the rendered result. That permission does not change the API and licensing rules above, and a screenshot is not a substitute for authorized product-data access.

8. Or skip the browser setup

For permitted page captures, ScreenshotNeo provides a single screenshot request. Cookie and consent banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf.

See the ScreenshotNeo API documentation for all options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.walmart.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://www.walmart.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://www.walmart.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.

9. Compliance checklist

  • Confirm whether you are an affiliate publisher, Marketplace seller, supplier, or solution provider.
  • Obtain approval and credentials for the matching Walmart API.
  • Use HTTPS and keep client secrets server-side.
  • Document permitted fields, retention, redistribution, geography, and refresh frequency.
  • Stay within the applicable quota and retry policy.
  • Do not scrape Walmart.com pages without express written consent.
  • Review current Walmart terms before launching or materially changing the integration.

10. FAQ

Can I scrape Walmart product pages with Selenium or Playwright?

Only if Walmart has given express written consent covering that collection. Walmart’s Terms of Use prohibit unauthorized automated retrieval and data mining.

Which API gives marketplace seller data?

Marketplace APIs are designed for seller and solution-provider workflows. The affiliate catalog feed can include marketplace offers when requested with the documented catalog feed type.

Are affiliate catalog prices real time?

The Product Catalog Snapshot documentation describes daily feeds. Treat them as snapshots and record their age.

Why does Item Search return no result for a product?

Item Search returns published items. An item may be unpublished or excluded by publication and availability restrictions.

Can I redistribute the records I download?

Check the applicable Walmart license first. Marketplace terms prohibit unauthorized redistribution and competitive use, and the permitted use depends on your role and agreement.