AI City Remix$11,500 prize pool. Pick a city, let AI tell its story, Oct 22 – 28.Join now
API reference · Walmart

walmart/search

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/walmart/search
Model IDwalmart/search
01

Input Schema

15 parameters · 1 required · 14 optional

ParameterTypeRequiredDescription
querystringnumberbooleanRequiredThe search query. You can use anything that you would use in a regular Walmart search. Either a `query` or a `cat_id` parameter is required.
pagestringnumberbooleanOptionalValue is used to get the items on a specific page. (e.g., `1` (default) is the first page of results, `2` is the 2nd page of results, `3` is the 3rd page of results, etc.). Maximum `page` value is `100`.
sortstringnumberbooleanOptionalSorting. (e.g. `price_low`, `price_high`, `best_seller`, `best_match`, `rating_high`, `new`). **Note:** `best_seller`, `rating_high`, and `new` are not supported for `walmart.com.mx`.
facetstringnumberbooleanOptionalItems filtering based on their attributes. The structure is a list of `key:value` pairs separated by `||`. The key and value are separated by `:`
nd_enunionOptionalShow results with NextDay delivery only. Set to `true` to enable or `false` (default) to disable. **Note:** not supported for `walmart.com.mx`.
cat_idstringnumberbooleanOptionalCategory on Walmart Search. (e.g. `0` (default) is all departments, `976759_976787` is 'Cookies', etc.). Either a `query` or a `cat_id` parameter is required. **Note:** not supported for `walmart.com.mx`.
devicestringnumberbooleanOptionalThe device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser.
spellingunionOptionalActivate spelling fix. `true` (default) includes spelling fix, `false` searches without spelling fix.
store_idstringnumberbooleanOptionalStore ID to filter the products by the specific store only. Head to the Walmart Stores Locations for a full list of supported stores. It's possible for the product pricing to differ between stores.
max_pricestringnumberbooleanOptionalUpper bound of price range query.
min_pricestringnumberbooleanOptionalLower bound of price range query.
soft_sortstringnumberbooleanOptionalEnables sort by relevance. Walmart is by default showing results sorted by relevance and using the `sort` option. Set to `false` to disable sort by Relevance. **Note:** not supported for `walmart.com.mx`.
walmart_domainstringnumberbooleanOptionalThe Walmart domain to use. It defaults to `walmart.com`. Head to the Walmart Stores for a full list of supported stores per domain.
include_filtersunionOptionalInclude `filters` to the JSON response. Set to `true` to enable or `false` to disable (default).
json_restrictorstringnumberbooleanOptionalThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/walmart/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

if (!response.ok) throw new Error(await response.text());
console.log(await response.json());