Browse a Category
curl --request GET \
--url https://scrapebadger.com/v1/walmart/category \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/walmart/category"
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/category', 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/category",
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/category"
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/category")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/walmart/category")
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_bodySearch
Browse a Category
Browse any walmart.com category or department path — same result shape as search.
GET
/
v1
/
walmart
/
category
Browse a Category
curl --request GET \
--url https://scrapebadger.com/v1/walmart/category \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/walmart/category"
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/category', 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/category",
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/category"
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/category")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/walmart/category")
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_bodyBrowse a Walmart category by its browse path. Returns the same
SearchResponse shape as
/search.
Credits: 5
No
sort parameter. Walmart’s browse pages ignore it — sorted and
unsorted requests returned 34/38 identical item ids with identical leading
results, and Walmart does not echo the parameter back. Sort on
/search instead.Authorization
Query Parameters
Walmart browse path ending in its category id, taken from a
walmart.com/browse/... URL. All of electronics/3944, browse/electronics/3944
and cp/3944 work. A sub-category id is the full underscore-joined path
of ids: Toys › Action Figures is toys/action-figures/4171_4172, not
action-figures/4172.Minimum price in USD. Walmart filters on whole dollars only, so the value is
rounded down (
99.50 is sent as 99).Hub departments
Some top-level departments, such as Toys (toys/4171), render on
walmart.com as a curated hub page rather than a product grid. For those,
/category returns the department’s full product grid from Walmart’s
category-scoped search instead. The result shape is the same, title is the
department name and url is the page actually scraped. page, min_price,
max_price and facet all apply.
Errors
| Status | When | Credits |
|---|---|---|
400 | path does not end in a category id, e.g. toys (Walmart would otherwise return an unrelated, cross-department result set) | 0 |
404 | Walmart does not recognise the id, e.g. action-figures/4172 | 0 |
Response
Identical to/search:
query (null here), url, page, total_results_reported, max_page
(11), result_count, has_more_pages, title, breadcrumbs,
related_searches, and items[] of SearchItem.
Example
curl "https://scrapebadger.com/v1/walmart/category?path=electronics/3944&min_price=100" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/walmart/category?" +
new URLSearchParams({ path: "electronics/3944", min_price: "100" }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/walmart/category",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"path": "electronics/3944", "min_price": 100},
)
data = res.json()
Response
{
"query": null,
"url": "https://www.walmart.com/browse/electronics/3944",
"page": 1,
"total_results_reported": 900010,
"max_page": 11,
"result_count": 49,
"has_more_pages": true,
"sort": null,
"title": "Results for \"Electronics\"",
"breadcrumbs": [
{ "name": "Electronics", "url": "https://www.walmart.com/cp/3944" }
],
"related_searches": [],
"items": [
{
"us_item_id": "5689919121",
"name": "AirPods Pro (2nd generation) with MagSafe Case (USB-C)",
"brand": "Apple",
"url": "https://www.walmart.com/ip/AirPods-Pro-2nd-generation.../5689919121",
"price": 199.0,
"price_string": "$199.00",
"rating": 4.4,
"review_count": 44427,
"in_stock": true,
"availability_status": "IN_STOCK",
"fulfillment_type": "FC",
"seller_name": "Walmart.com",
"is_sponsored": false,
"position": 1
}
]
}
total_results_reported is Walmart’s own claim (900,010 above) and is not
reachable — browse stops returning products after page 11, roughly 500
products. Page on has_more_pages, and deduplicate on us_item_id:
consecutive pages overlap by about 20% because Walmart re-ranks between
requests. Segment by facet or price band to go deeper.
