Learn how to get Walmart product page data using the Web Scraper API. Find out more about its request parameters and structured data output.
The walmart_product source is designed to retrieve Walmart product result pages. We can return the HTML for any Walmart page you like. Additionally, we can deliver structured (parsed) output for Walmart product pages.
Request samples
The example below illustrates how you can get a parsed Walmart product page result.
import requestsfrom pprint import pprint# Structure payload.payload ={'source':'walmart_product','product_id':'15296401808','parse':True,}# Get response.response = requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('USERNAME','PASSWORD'),json=payload,)# Instead of response with job status and results url, this will return the# JSON response with the result.pprint(response.json())
You can also find the official page of Walmart Stores here.
Parameter
Description
Type
domain
Domain localization for Walmart.
String
delivery_zip
Set the shipping to location.
String
store_id
Set the store location.
String
If target store is too far away from the given postal code - we will attempt to use the postal code of the target store, otherwise the location will not be set properly. In the case we can't set the delivery_zip - Walmart will return their default results without store targeting.
Structured data
In the following sections, parsed JSON code snippets are shortened where more than one item for the result type is available.
Walmart product page structured output
Output data dictionary
HTML example
JSON structure
The table below presents a detailed list of each product page element we parse, along with its description and data type. The table also includes some metadata.
Key
Description
Type
general
An object with general product page result details.
object
price
Object contains details on product pricing.
object
rating
Rating information for the product.
object
seller
Information about the seller.
object
variations (optional)
List of variations of the product.
array
breadcrumbs
Hierarchy of categories leading to the product.
object
location
Provides information on the location in which the request was run in.
object
fulfillment
Object contains information on product fulfillment options.
object
specifications
Array of key-value pairs detailing specific attributes or features of the product.
array
parse_status_code
The status code of the parsing job. You can see the parser status codes described here.
integer
created_at
The timestamp when the scraping job was created.
timestamp
updated_at
The timestamp when the scraping job was finished.
timestamp
page
Page number from which the product data was extracted
integer
url
URL of the product page on Walmart's website
string
job_id
The ID of the job associated with the scraping job.
string
status_code
The status code of the scraping job. You can see the scraper status codes described here.
integer
is_render_forced
Identifies whether rendering has been forced for this request.
boolean
parser_type
Type of parser used for extracting the data (e.g., "walmart_product_new").
string
General
Key (general)
Description
Type
url
The URL of the product.
string
main_image
The URL of the main product image
integer
images
Array of URLs to images of the product.
array
title
Title or name of the product.
string
description
Detailed description of the product.
string
brand
The brand of the product.
string
badge
Indicator of specific attributes such as promotions, product features, certifications, or brand affiliations.
list of strings
meta
Metadata of the product.
object
meta.sku
Stock Keeping Unit (SKU) of the product.
string
meta.gtin
Global Trade Item Number (GTIN) of the product.
string
Price
Key (price)
Description
Type
price
The current price of the product without any deductions.
float
price_strikethrough
The strikethrough price is either a Was Price, a Bundle Price, or a List Price.
float
currency
The ISO 4217 three-letter currency code for the product price.
string
Rating
Key (rating)
Description
Type
rating
Average rating of the product.
float
count
Number of ratings for the product.
integer
Seller
Key (seller)
Describtion
Type
name
Name of the seller.
string
official_name
Official registered name of the seller entity.
string
id
Unique identifier assigned to the seller by the platform.
string
url
The URL that leads to the seller's official website or storefront.
string
catalog_id
ID of catalog.
string
Specifications
Key (specifications)
Description
Type
key
Specific attribute or characteristic of the product.
string
value
Corresponding value or description of the attribute specified by the specifications key.
string
Fulfillment
Key (fulfillment)
Description
Type
pickup
Indicates if the product is available to be fulfilled via in-store pickup.
boolean
pickup_information
The pickup message, when pickup = true.
string
delivery
Indicates if the product is available to be fulfilled via delivery from local store.
boolean
delivery_information
The delivery from local store message, when delivery = true.
string
shipping
Indicates if the product is available to be fulfilled via home shipping.
boolean
shipping_information
The shipping message, if shown.
string
free_shipping
Indicates if shipping is free of charge.
boolean
out_of_stock
Indicates if the product is currently out of stock.
boolean
Variations
Key (variations)
Description
Type
state
Availability state of the product variation.
string
product_id
Unique identifier for each product variation.
string
selected_options
Array containing selected options that define the variation.
# The whole string you submit has to be URL-encoded.
https://realtime.oxylabs.io/v1/queries?source=walmart_product&product_id=15296401808&parse=true&access_token=12345abcde
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;
namespace OxyApi
{
class Program
{
static async Task Main()
{
const string Username = "USERNAME";
const string Password = "PASSWORD";
var parameters = new {
source = "walmart_product",
product_id = "15296401808",
parse = true
};
var client = new HttpClient();
Uri baseUri = new Uri("https://realtime.oxylabs.io");
client.BaseAddress = baseUri;
var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
requestMessage.Content = JsonContent.Create(parameters);
var authenticationString = $"{Username}:{Password}";
var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);
var response = await client.SendAsync(requestMessage);
var contents = await response.Content.ReadAsStringAsync();
Console.WriteLine(contents);
}
}
}
package org.example;
import okhttp3.*;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;
public class Main implements Runnable {
private static final String AUTHORIZATION_HEADER = "Authorization";
public static final String USERNAME = "USERNAME";
public static final String PASSWORD = "PASSWORD";
public void run() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("source", "walmart_product");
jsonObject.put("product_id", "15296401808");
jsonObject.put("parse", true);
Authenticator authenticator = (route, response) -> {
String credential = Credentials.basic(USERNAME, PASSWORD);
return response
.request()
.newBuilder()
.header(AUTHORIZATION_HEADER, credential)
.build();
};
var client = new OkHttpClient.Builder()
.authenticator(authenticator)
.readTimeout(180, TimeUnit.SECONDS)
.build();
var mediaType = MediaType.parse("application/json; charset=utf-8");
var body = RequestBody.create(jsonObject.toString(), mediaType);
var request = new Request.Builder()
.url("https://realtime.oxylabs.io/v1/queries")
.post(body)
.build();
try (var response = client.newCall(request).execute()) {
if (response.body() != null) {
try (var responseBody = response.body()) {
System.out.println(responseBody.string());
}
}
} catch (Exception exception) {
System.out.println("Error: " + exception.getMessage());
}
System.exit(0);
}
public static void main(String[] args) {
new Thread(new Main()).start();
}
}
{
"results": [
{
"content": {
"price": {
"price": 157.97,
"currency": "USD",
"price_strikethrough": 199.99
},
"rating": {
"count": 94,
"rating": 4.5
},
"seller": {
"id": "ED6F630F4BA94318A00A1D0BAACD0A48",
"url": "/seller/7648?itemId=701606028&pageName=item&returnUrl=%2Fip%2FApple-iPhone-Xs-64GB-Unlocked-GSM-CDMA-4G-LTE-Phone-w-Dual-12MP-Camera-Gold-Fair-Cosmetics-Fully-Functional%2F701606028",
"name": "Kiss Electronics Inc",
"catalog_id": "7648",
"official_name": "Kiss Electronics Inc"
},
"general": {
"url": "https://www.walmart.com/ip/Apple-iPhone-Xs-64GB-Unlocked-GSM-CDMA-4G-LTE-Phone-w-Dual-12MP-Camera-Gold-Fair-Cosmetics-Fully-Functional/701606028",
"meta": {
"sku": "701606028",
"gtin": "683346585136"
},
"badge": "Best seller",
"brand": "Apple",
"title": "Pre-Owned Apple iPhone XS - Carrier Unlocked - 64GB Gold",
"images": [
"https://i5.walmartimages.com/seo/Apple-iPhone-Xs-64GB-Unlocked-GSM-CDMA-4G-LTE-Phone-w-Dual-12MP-Camera-Gold-Fair-Cosmetics-Fully-Functional_d6dacc88-10c1-46e0-b528-c626915adadc.4c6907ee5896ccbc68382cb59470a6d8.jpeg?odnHeight=117&odnWidth=117&odnBg=FFFFFF"
],
"main_image": "https://i5.walmartimages.com/seo/Apple-iPhone-Xs-64GB-Unlocked-GSM-CDMA-4G-LTE-Phone-w-Dual-12MP-Camera-Gold-Fair-Cosmetics-Fully-Functional_d6dacc88-10c1-46e0-b528-c626915adadc.4c6907ee5896ccbc68382cb59470a6d8.jpeg?odnHeight=640&odnWidth=640&odnBg=FFFFFF",
"description": "<p>Super Retina. In Big and Bigger. An all-screen design gives you a large, beautiful canvas for everything you love to do. Custom-built OLED. The OLED panels in iPhone Xs allow for an HDR display with the industry's best color accuracy, true blacks, and remarkable brightness and contrast. They're the sharpest displays, with the highest pixel density, on any Apple device. A new level of water resistance. The most durable glass in a smartphone, sealed and precision-fitted with surgical-grade stainless steel band, helps create a more water-resistant enclosure - up to 2 meters for 30 minutes. iPhone Xs even resists spills from Coffee, Tea, Soda, and more. A whole new level of intelligence. The A12 Bionic, with our next-generation Neural Engine, delivers incredible performance. It uses real-time machine learning to transform the way you experience photos, gaming, augmented reality, and more. Sensors, processors, algorithms, and you. An innovative dual-camera system integrates the ISP, the Neural Engine, and advanced algorithms to unlock new creative possibilities and help you capture incredible photos. A picture is worth a trillion operations. The iPhone Xs dual-camera system harnesses the unprecedented power of the Neural Engine and its ability to perform five trillion operations per second. Together with the Apple-designed ISP, it works like the world's fastest photographer's assistant to help turn your pictures into showstoppers. Security made simple. Face ID reinvent the way we unlock, log in, and pay. Some of our most sophisticated technologies - the True Depth camera system, the Secure Enclave, and the Neural Engine - make it the most secure facial authentication ever in a smartphone. And even faster and easier to use.</p><ul> <li>Phone is tested, working and functional. May have scruff, scratched, cracks or other minor issues that don't affect the functionality of phone.</li> <li>5.8-inch Super AMOLED Capacitive Touchscreen, 1125 x 2436 pixels</li> <li>iOS, Apple A12 Bionic, Hexa-Core, Apple GPU (4-Core Graphics)</li> <li>Dual 12MP(f/1.8, 28mm, OIS) & 12MP(f/2.4, 52mm, 2x optical Zoom) Cameras with Quad-LED Dual-Tone Flash & 7MP Front Camera with f/2.2, 32mm</li> <li>Internal Memory: 64GB, 4GB RAM</li> <li>IP68 Dust/Water Resistant (Up to 2m for 30 mins), Scratch-Resistant Glass, Oleophobic Coating</li> <li>Dimensions: 5.65 x 2.79 x 0.30 inches, Weight: 6.24 oz</li> </ul>"
},
"location": {
"city": "Sacramento",
"state": "CA",
"store_id": "3081",
"zip_code": "95829"
},
"variations": [
{
"state": "IN_STOCK",
"product_id": "7328JAQF0Y2S",
"selected_options": [
{
"key": "Carrier",
"value": "Verizon"
},
{
"key": "Capacity",
"value": "256GB"
},
{
"key": "Color",
"value": "Desert Titanium"
}
]
},
"breadcrumbs": [
{
"url": "/cp/cell-phones/1105910",
"category_name": "Cell Phones"
},
{
"url": "/cp/unlocked-phones/1073085",
"category_name": "Unlocked Phones"
},
{
"url": "/cp/gsm-unlocked/8230659",
"category_name": "GSM Unlocked"
}
],
"fulfillment": {
"pickup": false,
"delivery": false,
"shipping": true,
"out_of_stock": false,
"free_shipping": true,
"pickup_information": "Pickup, Not available",
"delivery_information": "Delivery, Not available",
"shipping_information": "Shipping, Arrives Oct 18, Free"
},
"specifications": [
{
"key": "Processor Brand",
"value": "Apple"
},
{
"key": "Display Technology",
"value": "Retina Display"
},
{
"key": "Phone Feature",
"value": "Wireless Charging"
},
...
],
"parse_status_code": 12000
},
"created_at": "2024-09-16 08:09:03",
"updated_at": "2024-09-16 08:09:06",
"page": 1,
"url": "https://www.walmart.com//ip/Apple-iPhone-Xs-64GB-Unlocked-GSM-CDMA-4G-LTE-Phone-w-Dual-12MP-Camera-Gold-Fair-Cosmetics-Fully-Functional/701606028",
"job_id": "7253339040034008521",
"is_render_forced": false,
"status_code": 200,
"parser_type": "walmart_product_new"
}
]
}