Search Products
curl --request GET \
--url https://scrapebadger.com/v1/walmart/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/walmart/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/walmart/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/walmart/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/walmart/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/walmart/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/walmart/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"url": "<string>",
"page": 123,
"total_results_reported": 123,
"max_page": 123,
"result_count": 123,
"has_more_pages": true,
"sort": "<string>",
"title": "<string>",
"breadcrumbs": [
{}
],
"related_searches": [
"<string>"
],
"spelling_correction": "<string>",
"items": [
{
"us_item_id": "<string>",
"item_id": "<string>",
"product_id": "<string>",
"offer_id": "<string>",
"name": "<string>",
"brand": "<string>",
"manufacturer_name": "<string>",
"url": "<string>",
"canonical_url": "<string>",
"image_url": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"price": 123,
"price_string": "<string>",
"was_price": 123,
"price_info": {},
"price_per_unit": "<string>",
"rating": 123,
"review_count": 123,
"in_stock": true,
"availability_status": "<string>",
"fulfillment_type": "<string>",
"fulfillment_badges": [
"<string>"
],
"fulfillment_speed": [
"<string>"
],
"seller_id": "<string>",
"seller_name": "<string>",
"seller_type": "<string>",
"is_sponsored": true,
"is_two_day_shipping": true,
"badges": [
{}
],
"variants": [
{}
],
"condition": "<string>",
"is_preowned": true,
"snap_eligible": true,
"position": 123
}
]
}Search
Search Products
Search walmart.com by keyword with sort, price band and facet filters.
GET
/
v1
/
walmart
/
search
Search Products
curl --request GET \
--url https://scrapebadger.com/v1/walmart/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/walmart/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/walmart/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/walmart/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/walmart/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/walmart/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/walmart/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"url": "<string>",
"page": 123,
"total_results_reported": 123,
"max_page": 123,
"result_count": 123,
"has_more_pages": true,
"sort": "<string>",
"title": "<string>",
"breadcrumbs": [
{}
],
"related_searches": [
"<string>"
],
"spelling_correction": "<string>",
"items": [
{
"us_item_id": "<string>",
"item_id": "<string>",
"product_id": "<string>",
"offer_id": "<string>",
"name": "<string>",
"brand": "<string>",
"manufacturer_name": "<string>",
"url": "<string>",
"canonical_url": "<string>",
"image_url": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"price": 123,
"price_string": "<string>",
"was_price": 123,
"price_info": {},
"price_per_unit": "<string>",
"rating": 123,
"review_count": 123,
"in_stock": true,
"availability_status": "<string>",
"fulfillment_type": "<string>",
"fulfillment_badges": [
"<string>"
],
"fulfillment_speed": [
"<string>"
],
"seller_id": "<string>",
"seller_name": "<string>",
"seller_type": "<string>",
"is_sponsored": true,
"is_two_day_shipping": true,
"badges": [
{}
],
"variants": [
{}
],
"condition": "<string>",
"is_preowned": true,
"snap_eligible": true,
"position": 123
}
]
}Search
To collect more than ~500 products for a term, segment the query rather than
paging deeper: repeat it per brand (
walmart.com for products. Returns ~40–60 organic products per page.
Sponsored ad tiles are dropped; sponsored products are returned and flagged
is_sponsored.
Credits: 5
Authorization
string
required
Your ScrapeBadger API key.
Query Parameters
string
required
Search keywords, e.g.
laptop.integer
default:"1"
Result page,
1–10. Results dry up after page 10 — see
Pagination.string
Result ordering. One of
best_match, best_seller, price_low,
price_high, rating_high, new.number
Minimum price in USD.
number
Maximum price in USD.
string
Walmart facet filter, e.g.
brand:HP. Facets can be applied but not
enumerated — Walmart renders the filter rail client-side, so there is no
endpoint that lists them.Response
string
Echo of the requested query.
string
The walmart.com URL that was fetched.
integer
The page returned.
integer
Walmart’s own claim, not a reachable count — it reports ~14,700 for a
query that stops returning products after page 10. It moves correctly when a
filter is applied, so it is a useful relative signal only.
integer
Measured page ceiling for this surface (
10 for search).integer
Products on this page.
boolean
Page on this, not on
total_results_reported.string
The sort that was applied.
string
Walmart’s result heading, e.g.
Results for "laptop".Breadcrumb[]
name, url.string[]
Walmart’s related query suggestions.
string
Set when Walmart corrected the query.
SearchItem[]
Product cards.
Show SearchItem
Show SearchItem
string
Walmart’s item id — use it for
/products/{item_id} and to deduplicate.string
string
string
string
string
string
string
string
string
string[]
string
number
string
number
object
Full price block —
current_price, was_price, price_range, savings_amount.string
number
integer
boolean
string
e.g.
IN_STOCK, OUT_OF_STOCK.string
e.g.
FC, MARKETPLACE.string[]
string[]
string
string
string
boolean
boolean
Badge[]
id, text, type, key.Variant[]
string
boolean
boolean
integer
Example
curl "https://scrapebadger.com/v1/walmart/search?query=laptop&sort=price_low&max_price=500" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/walmart/search?" +
new URLSearchParams({
query: "laptop",
sort: "price_low",
max_price: "500",
}),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/walmart/search",
headers={"X-API-Key": "YOUR_API_KEY"},
params={
"query": "laptop",
"sort": "price_low",
"max_price": 500,
},
)
data = res.json()
Response
{
"query": "laptop",
"url": "https://www.walmart.com/search?q=laptop",
"page": 1,
"total_results_reported": 14714,
"max_page": 10,
"result_count": 52,
"has_more_pages": true,
"sort": null,
"title": "Results for \"laptop\"",
"breadcrumbs": [{ "name": "laptop", "url": null }],
"related_searches": ["hp laptop", "macbook", "gaming laptop", "chromebook"],
"spelling_correction": null,
"items": [
{
"us_item_id": "20353606354",
"item_id": "20353606354",
"product_id": "4W9K25QVD1IR",
"offer_id": "CFD877430F6D3E37B5678F4880EC10C8",
"name": "HP Essential 14\" Laptop, Intel N150, 8GB RAM, 128GB eMMC, Windows 11 Home, Pink",
"brand": "HP",
"url": "https://www.walmart.com/ip/HP-Essential-14-Laptop.../20353606354",
"image_url": "https://i5.walmartimages.com/seo/HP-Essential-14-Laptop....jpeg",
"price": 298.96,
"price_string": "$298.96",
"price_info": {
"current_price": { "price": 298.96, "price_string": "$298.96", "price_display": "$298.96" },
"price_range": { "min_price": 269.0, "price_string": "Options from $269.00" },
"savings_amount": 0.0
},
"rating": 4.0,
"review_count": 4,
"in_stock": true,
"is_out_of_stock": false,
"availability_status": "IN_STOCK",
"fulfillment_type": "FC",
"fulfillment_badges": ["Free shipping, arrives in 3+ days"],
"seller_id": "E3AC3CCD80E94D77A876ADE3B17D7B89",
"seller_name": "PCOnline US",
"is_sponsored": true,
"is_two_day_shipping": false,
"badges": [{ "id": "L1600", "text": "Best seller", "type": "flag", "key": "BEST_SELLER" }],
"position": 1
}
]
}
Pagination
total_results_reported is not reachable. Search dries up after page 10 —
roughly 500 products per query. Page on has_more_pages; page 11 returns
HTTP 200 with result_count: 0.Consecutive pages overlap by roughly 20% — Walmart re-ranks between
requests. Deduplicate on
us_item_id.facet=brand:HP) or across price bands
(min_price / max_price).
Searching by UPC does not work — Walmart returns zero results for a bare
UPC. Search by keyword and read
upc off
/products/{item_id} instead.Prices and availability are store-specific, resolved from the request IP
and not pinnable by parameter. Fetch a product to see which store answered
(its
location block).
