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.
POST
https://api.sandbase.ai/v1/api/walmart/searchModel ID
walmart/search01
Input Schema
15 parameters · 1 required · 14 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
query | stringnumberboolean | Required | The 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. |
page | stringnumberboolean | Optional | Value 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`. |
sort | stringnumberboolean | Optional | Sorting. (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`. |
facet | stringnumberboolean | Optional | Items filtering based on their attributes. The structure is a list of `key:value` pairs separated by `||`. The key and value are separated by `:` |
nd_en | union | Optional | Show results with NextDay delivery only. Set to `true` to enable or `false` (default) to disable. **Note:** not supported for `walmart.com.mx`. |
cat_id | stringnumberboolean | Optional | Category 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`. |
device | stringnumberboolean | Optional | The 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. |
spelling | union | Optional | Activate spelling fix. `true` (default) includes spelling fix, `false` searches without spelling fix. |
store_id | stringnumberboolean | Optional | Store 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_price | stringnumberboolean | Optional | Upper bound of price range query. |
min_price | stringnumberboolean | Optional | Lower bound of price range query. |
soft_sort | stringnumberboolean | Optional | Enables 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_domain | stringnumberboolean | Optional | The Walmart domain to use. It defaults to `walmart.com`. Head to the Walmart Stores for a full list of supported stores per domain. |
include_filters | union | Optional | Include `filters` to the JSON response. Set to `true` to enable or `false` to disable (default). |
json_restrictor | stringnumberboolean | Optional | The 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
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom 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());