Skip to content

Walmart API

The TrueScrape Walmart API exposes 4 public endpoints covering Browse a Walmart category, Walmart product details and Walmart product reviews. Every call is a GET against public, logged-out pages and returns the same unified schema as every other platform here. Calls cost 3 credits each. A cache hit is free, and a failed or empty response is never charged.

Endpoints

EndpointReturnsCreditsCacheableBatchable
/v1/walmart/categoryBrowse a Walmart category3yesyes
/v1/walmart/productWalmart product details3yesyes
/v1/walmart/reviewsWalmart product reviews3yesyes
/v1/walmart/searchSearch Walmart3yesyes

Reference

GET/v1/walmart/category3 creditscacheablebatchable

Browse a Walmart category

Public Walmart category listing: the same shape as walmart.search, keyed by category id instead of a query.

ParameterTypeRequiredDescription
categorystringyesWalmart category id, e.g. "3944_1089430_37807"
tldstringnoWalmart marketplace, default com. One of: com, ca
country_codestringno
pagenumberno

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns an object with items, meta.

Fields
FieldTypePresent
itemsSearchResultItem[]always
metaobjectalways
meta.pagenumberalways
meta.pagesnumber | nullalways
curl
curl "$API/v1/walmart/category?category=%3Ccategory%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  category: '<category>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/walmart/category?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 3 credits, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/walmart/category",
    params={
        "category": "<category>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/walmart/category
Open the full playground
GET/v1/walmart/product3 creditscacheablebatchable

Walmart product details

Public details for a Walmart listing: title, price, availability, seller, ratings, images and specifications, read from the page's own __NEXT_DATA__ payload.

ParameterTypeRequiredDescription
product_idstringyesNumeric Walmart item id, the last path segment of an /ip/ URL, e.g. 18210919718
tldstringnoWalmart marketplace, default com. One of: com, ca
country_codestringno

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns one Product.

Fields
FieldTypePresentDescription
platformone of 32 stringsalways
idstringalwaysThe product id on its marketplace: the ASIN on Amazon, the item id on Walmart and eBay. Always a string.
titlestring | nullalways
brandstring | nullalways
descriptionstring | nullalways
urlstring | nullalways
imageUrlsstring[]always
pricenumber | nullalwaysThe price a buyer pays now, in `currency`.
currencystring | nullalwaysISO 4217 currency code for the amounts in this record, such as USD or EUR.
listPricenumber | nullalwaysThe struck-through reference price shown next to `price` when the listing shows a discount.
availabilityin_stock | out_of_stock | preorder | discontinued | unknown | nullalwaysStock status. `unknown` means the listing showed a status that could not be read as one of the other values.
ratingnumber | nullalwaysAverage customer rating, out of 5.
reviewCountnumber | nullalwaysNumber of ratings or reviews the marketplace reports for the product, not the number of entries in `reviews`.
sellerNamestring | nullalways
shipsFromstring | nullalwaysThe party the item ships from, as the listing names it.
marketplacestring | nullalwaysThe marketplace site this product was read from, such as `amazon.co.uk`.
categoriesstring[]alwaysCategory breadcrumb, from the broadest category to the most specific.
featureBulletsstring[]always
attributesRecord<string, string>alwaysSpecifications as label and value pairs. Which labels appear varies by marketplace and category.
reviewsProductReview[]alwaysA sample of reviews shown on the product page, not the full review list.
fetchedAtstringalwaysWhen this record was retrieved, as an ISO 8601 timestamp.
curl
curl "$API/v1/walmart/product?product_id=%3Cproduct_id%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  product_id: '<product_id>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/walmart/product?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 3 credits, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/walmart/product",
    params={
        "product_id": "<product_id>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/walmart/product
Open the full playground
GET/v1/walmart/reviews3 creditscacheablebatchable

Walmart product reviews

Paginated customer reviews for a Walmart product, from its dedicated reviews page.

ParameterTypeRequiredDescription
product_idstringyesNumeric Walmart item id, e.g. 18210919718
tldstringnoWalmart marketplace, default com. One of: com, ca
country_codestringno
pagenumberno
sortrelevancy | helpful | submission-desc | submission-asc | rating-desc | rating-ascno
ratingsstringnoComma list of star ratings to include, e.g. "5,4"
verified_purchasebooleanno

Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).

Returns an object with items, productName, productUrl, rating, reviewCount.

Fields
FieldTypePresent
itemsProductReview[]always
productNamestring | nullalways
productUrlstring | nullalways
ratingnumber | nullalways
reviewCountnumber | nullalways
curl
curl "$API/v1/walmart/reviews?product_id=%3Cproduct_id%3E&cache_max_age=7d" \
  -H "x-api-key: $KEY"
TypeScript
const query = new URLSearchParams({
  product_id: '<product_id>',
  cache_max_age: '7d',
});

const response = await fetch(`${API}/v1/walmart/reviews?${query}`, {
  headers: { 'x-api-key': KEY },
});

const body = await response.json();
if (!body.success) throw new Error(body.error.code);

// 3 credits, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);
Python
Python
import os, httpx

r = httpx.get(
    f"{os.environ['API']}/v1/walmart/reviews",
    params={
        "product_id": "<product_id>",
        "cache_max_age": "7d",
    },
    headers={"x-api-key": os.environ["KEY"]},
    timeout=30,
)

body = r.json()
if not body["success"]:
    raise RuntimeError(body["error"]["code"])

print(body["data"], body["meta"]["creditsCharged"])
Response codes
200Success
400invalid_request. Not charged
401missing_api_key / invalid_api_key / revoked_api_key. Never a billing error
402insufficient_credits. The key is valid, the balance is not
429daily_cap_exceeded or upstream_rate_limited. Not charged
501not_configured. This deployment is not set up to serve this endpoint. Not charged.
502upstream_blocked / upstream_schema_drift. Not charged
504upstream_timeout. Not charged
Try it here
GET/v1/walmart/reviews
Open the full playground

Questions

How much does the Walmart API cost?
Calls cost 3 credits each. Every endpoint is cacheable, and a cache hit costs nothing. A failed request and an empty result are both free, on every endpoint.
Does the Walmart API need a login or cookies?
No. Every endpoint reads public, logged-out pages only — no account, no cookies, no session. An API key identifies your own TrueScrape account and nothing else.
Can I fetch many Walmart targets in one request?
Yes. 4 of 4 are batchable: one POST to /v1/jobs/batch takes many targets and returns a job id to poll.
Can I watch Walmart endpoints for changes?
Yes, 2 of 4. A subscription polls on your schedule and fires your webhook only when the content changed; the rest carry x-subscribable: false in the spec.