Walmart API Python Client

Extract Walmart data with our Walmart API Python client. Get programmatic access to seller information, reviews, brand details, images, prices, product details, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world

Integrate our Walmart API

The Apify API client for Python is the official library that allows you to use Walmart API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [{ "url": "https://walmart.com/search?q=tshirt" }],
10 "maxProductsPerStartUrl": 10,
11}
12
13# Run the Actor and wait for it to finish
14run = client.actor("tri_angle/walmart-product-detail-scraper").call(run_input=run_input)
15
16# Fetch and print Actor results from the run's dataset (if there are any)
17print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
18for item in client.dataset(run["defaultDatasetId"]).iterate_items():
19 print(item)
20
21# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Walmart API Python client

Use our Python API client to extract Walmart product data by providing search keywords, product URLs, categories, or postal codes for location-based scraping. The API returns structured data, including product names, prices, images, reviews, seller information, brand details, variants, and availability status in JSON format.

Input

{
"startUrls": [
{
"url": "<https://walmart.com/search?q=tshirt>"
}
],
"maxProductsPerStartUrl": 10
}

Output

{
"upc": "012005448848",
"url": "https://www.walmart.com/ip/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce/16935510",
"name": "BLANCA NIEVES Laundry Detergent, 70.54 Ounce",
"type": "VARIANT",
"badge": "Popular pick",
"brand": "BLANCA NIEVES",
"model": "12005448848",
"ebooks": null,
"gender": null,
"rhPath": "40000:44000:44003:44108:44237",
"offerId": "77D9405108C448BE94F58A6D7F36A6B0",
"brandUrl": "https://www.walmart.com/c/brand/blanca-nieves",
"itemType": "DetailProduct",
"sellerId": "F55CDC31AB754BB68FE0B39041159D63",
"usItemId": "16935510",
"allImages": [
"https://i5.walmartimages.com/seo/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce_f0d30ef9-3969-4d64-a259-b40d0eb6cae3.52e16f3ab81176f617e6900c5b0721fb.jpeg",
"https://i5.walmartimages.com/asr/c3a7d15b-42f7-4fb5-a0fe-b31372c19bd4.50c20bcc8241d73d2b9695fb836cb3af.jpeg"
],
"offerType": "ONLINE_AND_STORE",
"priceInfo": {
"price": "$4.48",
"wasPrice": null,
"unitPrice": "$1.02/lb",
"priceRange": null,
"priceDisplay": "$4.48"
},
"productId": "69L71KUFK8CM",
"orderLimit": 12,
"sellerName": "Walmart.com",
"description": "<p>Get your clothes super clean with BLANCA NIEVES Detergent, 70.54 Oz. It is bio-degradable and phosphate-free, so it's good for the climate and free of certain harmful chemicals. The BLANCA NIEVES Laundry Detergent makes your clothes clean and soft, so you can step out in confidence as you go about your day. It comes in powder form and has a delightfully fresh scent. It handles both colors and whites, so you don't need bleach.</p>",
"isSponsored": null,
"variantList": [
{
"url": "https://www.walmart.com/ip/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce/16935510",
"imageUrl": "https://i5.walmartimages.com/seo/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce_f0d30ef9-3969-4d64-a259-b40d0eb6cae3.52e16f3ab81176f617e6900c5b0721fb.jpeg",
"usItemId": "16935510",
"variants": [
"number_of_pieces-1"
],
"allImages": [
"https://i5.walmartimages.com/seo/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce_f0d30ef9-3969-4d64-a259-b40d0eb6cae3.52e16f3ab81176f617e6900c5b0721fb.jpeg"
],
"priceInfo": {
"price": "$4.48",
"wasPrice": null,
"unitPrice": "$1.02/lb",
"priceRange": null,
"priceDisplay": "$4.48"
},
"productId": "69L71KUFK8CM",
"buyBoxSuppression": false,
"availabilityStatus": "IN_STOCK",
"subscriptionEligible": true
}
],
"availability": "IN_STOCK",
"hasCarePlans": false,
"returnPolicy": {
"returnable": null,
"freeReturns": null,
"returnWindow": {
"value": null,
"unitType": "Day"
},
"returnPolicyText": null,
"holidayReturnEnabled": false
},
"thumbnailUrl": "https://i5.walmartimages.com/seo/BLANCA-NIEVES-Laundry-Detergent-70-54-Ounce_f0d30ef9-3969-4d64-a259-b40d0eb6cae3.52e16f3ab81176f617e6900c5b0721fb.jpeg",
"averageRating": 4.7,
"orderMinLimit": 1,
"buyNowEligible": false,
"personalizable": false,
"fulfillmentType": "STORE",
"numberOfReviews": 104,
"suppressReviews": false,
"ironbankCategory": "Home Decor, Kitchen, & Other",
"legalRestriction": false,
"shortDescription": "<p>Get your clothes super clean with BLANCA NIEVES Detergent, 70.54 Oz. It is bio-degradable and phosphate-free, so it's good for the climate and free of certain harmful chemicals. The BLANCA NIEVES Laundry Detergent makes your clothes clean and soft, so you can step out in confidence as you go about your day. It comes in powder form and has a delightfully fresh scent. It handles both colors and whites, so you don't need bleach.</p>",
"buyBoxSuppression": false,
"sellerReviewCount": null,
"giftingEligibility": false,
"secondaryOfferPrice": "$20.76",
"sellerAverageRating": null,
"shippingRestriction": false,
"additionalOfferCount": 1,
"subscriptionEligible": true,
"manufacturerProductId": "12005448848",
"transactableOfferCount": 2,
"showExploreOtherConditionsCTA": false
}

How to use Walmart API

Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Install Apify Python client02

Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Walmart API from your Python applications.

Get your Apify API token03

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate Walmart API04

Navigate to the Walmart API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Walmart API into your Python application.

Open Walmart Python API
Get your Walmart data via API05

The Walmart API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

No, Walmart does not provide an official Python API client for product data extraction. Since Walmart doesn't offer a Python API, this Walmart scraper actor serves as an alternative solution to retrieve comprehensive product information, search results, reviews, and category data from Walmart's website programmatically.

Yes, you can try the Walmart Python API client for free with Apify's free tier. New users receive free compute units to test the API client's capabilities. You can scrape product details, search results, and reviews without any upfront cost to evaluate if it meets your data extraction needs.

You can extract comprehensive product information including product names, prices, images, brand details, seller information, product variants, availability status, customer reviews and ratings, product IDs, descriptions, categories, and location-specific data using US postal codes through the Python API client. The API client also supports category browsing and search result extraction.

Getting started with our Walmart Python API is easy — simply create a free Apify account, get your API token, and start using the Walmart API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.

Get started with Walmart API Python client today

Get your first Walmart data in Python in less than 5 minutes. No credit card required. No commitment. Cancel anytime.