# Walmart Search API

> Search Walmart products by keyword with price, rating, reviews, seller and fulfillment badges, plus sorting, price filters and pagination.

Source: https://www.sandbase.ai/apis/walmart/search
API reference: https://www.sandbase.ai/apis/walmart/search/docs

## Facts

- Provider: Walmart
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/walmart/search`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, walmart, ecommerce, product data
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/walmart/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string \| number \| boolean | yes |  |
| `page` | string \| number \| boolean | no |  |
| `sort` | string \| number \| boolean | no |  |
| `facet` | string \| number \| boolean | no |  |
| `nd_en` | any | no |  |
| `cat_id` | string \| number \| boolean | no |  |
| `device` | string \| number \| boolean | no |  |
| `spelling` | any | no |  |
| `store_id` | string \| number \| boolean | no |  |
| `max_price` | string \| number \| boolean | no |  |
| `min_price` | string \| number \| boolean | no |  |
| `soft_sort` | string \| number \| boolean | no |  |
| `walmart_domain` | string \| number \| boolean | no |  |
| `include_filters` | any | no |  |
| `json_restrictor` | string \| number \| boolean | no |  |

## FAQ

### How do I use the Walmart Search API?

Send a POST request to https://api.sandbase.ai/v1/api/walmart/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Walmart Search API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Walmart Search API accept?

Required: query (string | number | boolean). Optional: page (string | number | boolean), sort (string | number | boolean), facet (string | number | boolean), nd_en (any), cat_id (string | number | boolean) and device (string | number | boolean) and 8 more. The Parameters table and the Playground on this page list every field.

### What does the Walmart Search API return?

A JSON result. This endpoint runs asynchronously, so the response tells you how to fetch the finished result.

### Do I need a Walmart developer account or API key?

No. Walmart Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Walmart API access separately.

## README

### Walmart Search

Search Walmart products by keyword with price, rating, reviews, seller and fulfillment badges, plus sorting, price filters and pagination.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "walmart/search", "query": "laptop"}'
```

This API runs asynchronously. `/v1/run` returns a task `id` with status `pending`; poll `GET https://api.sandbase.ai/v1/run/{id}` until `status` is `completed` and read the result from `outputs[0].data`.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `query` | string/number/boolean | Yes | 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. |
| `cat_id` | string/number/boolean | No | 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.… |
| `device` | string/number/boolean | No | 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. |
| `facet` | string/number/boolean | No | Items filtering based on their attributes. The structure is a list of `key:value` pairs separated by `\|\|`. The key and value are separated by `:` |
| `include_filters` | any | No | Include `filters` to the JSON response. Set to `true` to enable or `false` to disable (default). |
| `json_restrictor` | string/number/boolean | No | The fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
| `max_price` | string/number/boolean | No | Upper bound of price range query. |
| `min_price` | string/number/boolean | No | Lower bound of price range query. |
| `nd_en` | any | No | Show results with NextDay delivery only. Set to `true` to enable or `false` (default) to disable. **Note:** not supported for `walmart.com.mx`. |
| `page` | string/number/boolean | No | 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 `10… |
| `soft_sort` | string/number/boolean | No | 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.… |
| `sort` | string/number/boolean | No | 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`. |
| `spelling` | any | No | Activate spelling fix. `true` (default) includes spelling fix, `false` searches without spelling fix. |
| `store_id` | string/number/boolean | No | 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. |
| `walmart_domain` | string/number/boolean | No | The Walmart domain to use. It defaults to `walmart.com`. Head to the Walmart Stores for a full list of supported stores per domain. |

#### Pricing

Flat price per call. Failed calls are not charged.
