Walmart Product Search via Scavio
Search Walmart products or retrieve full product details by product ID. Returns structured JSON with pricing, ratings, fulfillment, and availability.
When to trigger
Use this skill when the user asks to:
- - Find products on Walmart with price or delivery requirements
- Check same-day or next-day availability for a product near a ZIP code
- Look up a specific Walmart product by product ID
- Compare Walmart prices (pair with scavio-amazon for cross-retailer comparison)
- Filter products by in-store pickup availability
Setup
Get a free API key at https://scavio.dev (1,000 free credits/month, no card required):
CODEBLOCK0
Workflow
- 1. If the user has a Walmart product ID, call
/api/v1/walmart/product directly. - If the user has a keyword, call
/api/v1/walmart/search. - If the user asks about delivery speed (e.g. "can I get this today?"), set
fulfillment_speed and delivery_zip. - If the user asks about in-store pickup, set
fulfillment_type: in_store and store_id if known. - Present results with name, price, rating, fulfillment info, and product URL.
Endpoints
| Endpoint | Description |
|---|
| INLINECODE6 | Keyword search with filters |
| INLINECODE7 |
Full product details by product ID |
CODEBLOCK1
Search Parameters
| Parameter | Type | Default | Description |
|---|
| INLINECODE8 | string | required | Search query (1-500 chars) |
| INLINECODE9 |
string |
best_match |
best_match,
price_low,
price_high,
best_seller |
|
start_page | integer |
1 | Starting page |
|
min_price | integer | -- | Minimum price filter (dollars) |
|
max_price | integer | -- | Maximum price filter (dollars) |
|
fulfillment_speed | string | -- |
today,
tomorrow,
2_days,
anytime |
|
fulfillment_type | string | -- |
in_store for click-and-collect |
|
delivery_zip | string | -- | ZIP code for localized results |
|
store_id | string | -- | Walmart store ID for in-store availability |
|
device | string |
desktop |
desktop,
mobile, or
tablet |
Product Detail Parameters
| Parameter | Type | Default | Description |
|---|
| INLINECODE33 | string | required | Walmart product ID |
| INLINECODE34 |
string | -- | ZIP code for localized pricing |
|
store_id | string | -- | Walmart store ID |
Examples
CODEBLOCK2
Search Response
CODEBLOCK3
Product detail response also includes: description, features, images, categories, availability, fulfillment.
Guardrails
- - Never fabricate product names, prices, product IDs, or availability. Only return data from the API.
- If the user asks about delivery to a specific location, always pass
delivery_zip — availability varies by ZIP. - INLINECODE43 results are time-sensitive; mention this to the user.
- Always include the product URL so the user can verify and complete purchase.
Failure handling
- - If no products are returned, relax filters (remove
fulfillment_speed or increase max_price) and retry. - If the product ID is not found, suggest a keyword search instead.
- If
SCAVIO_API_KEY is not set, prompt the user to export it before continuing.
LangChain
CODEBLOCK4
CODEBLOCK5
通过Scavio搜索沃尔玛商品
搜索沃尔玛商品或通过商品ID获取完整商品详情。返回包含价格、评分、配送方式和库存的结构化JSON数据。
触发时机
当用户提出以下请求时使用此技能:
- - 在沃尔玛上搜索有价格或配送要求的商品
- 查询某邮政编码附近商品的当日或次日配送可用性
- 通过商品ID查找特定沃尔玛商品
- 比较沃尔玛价格(与scavio-amazon配合进行跨零售商比较)
- 按店内自提可用性筛选商品
配置
在 https://scavio.dev 获取免费API密钥(每月1000次免费调用,无需银行卡):
bash
export SCAVIOAPIKEY=skliveyour_key
工作流程
- 1. 如果用户有沃尔玛商品ID,直接调用 /api/v1/walmart/product。
- 如果用户有关键词,调用 /api/v1/walmart/search。
- 如果用户询问配送速度(例如我今天能收到吗?),设置 fulfillmentspeed 和 deliveryzip。
- 如果用户询问店内自提,设置 fulfillmenttype: instore,如果已知则提供 store_id。
- 展示结果,包含商品名称、价格、评分、配送信息和商品链接。
接口地址
| 接口 | 描述 |
|---|
| POST https://api.scavio.dev/api/v1/walmart/search | 带筛选条件的关键词搜索 |
| POST https://api.scavio.dev/api/v1/walmart/product |
通过商品ID获取完整商品详情 |
Authorization: Bearer $SCAVIOAPIKEY
搜索参数
| 参数 | 类型 | 默认值 | 描述 |
|---|
| query | 字符串 | 必填 | 搜索查询(1-500字符) |
| sortby |
字符串 | bestmatch | best
match(最佳匹配)、pricelow(价格从低到高)、price
high(价格从高到低)、bestseller(畅销) |
| start_page | 整数 | 1 | 起始页码 |
| min_price | 整数 | -- | 最低价格筛选(美元) |
| max_price | 整数 | -- | 最高价格筛选(美元) |
| fulfillment
speed | 字符串 | -- | today(今天)、tomorrow(明天)、2days(2天)、anytime(任意时间) |
| fulfillment
type | 字符串 | -- | instore 表示线上下单到店自提 |
| delivery_zip | 字符串 | -- | 用于本地化结果的邮政编码 |
| store_id | 字符串 | -- | 用于查询店内库存的沃尔玛门店ID |
| device | 字符串 | desktop | desktop(桌面端)、mobile(移动端)或 tablet(平板端) |
商品详情参数
| 参数 | 类型 | 默认值 | 描述 |
|---|
| productid | 字符串 | 必填 | 沃尔玛商品ID |
| deliveryzip |
字符串 | -- | 用于本地化定价的邮政编码 |
| store_id | 字符串 | -- | 沃尔玛门店ID |
示例
python
import os, requests
BASE = https://api.scavio.dev
HEADERS = {Authorization: fBearer {os.environ[SCAVIOAPIKEY]}}
带配送筛选的搜索
results = requests.post(f{BASE}/api/v1/walmart/search, headers=HEADERS,
json={query: standing desk, sort
by: bestseller, max_price: 300,
fulfillment
speed: tomorrow, deliveryzip: 10001}).json()
通过ID查询商品
product = requests.post(f{BASE}/api/v1/walmart/product, headers=HEADERS,
json={product
id: 123456789, deliveryzip: 10001}).json()
搜索响应
json
{
data: [
{
name: Flexispot Standing Desk,
product_id: 123456789,
url: https://www.walmart.com/ip/123456789,
price: $249.00,
was_price: $349.99,
rating: 4.7,
total_reviews: 8230,
fulfillment: Free shipping,
in_stock: true,
seller: Walmart.com
}
],
credits_used: 1,
credits_remaining: 999
}
商品详情响应还包含:description(描述)、features(特点)、images(图片)、categories(分类)、availability(库存情况)、fulfillment(配送方式)。
使用规范
- - 切勿虚构商品名称、价格、商品ID或库存信息。仅返回API提供的数据。
- 如果用户询问配送到特定地点,务必传递 deliveryzip 参数——库存情况因邮政编码而异。
- fulfillmentspeed: today 的结果具有时效性;请向用户说明这一点。
- 始终包含商品链接,以便用户验证信息并完成购买。
错误处理
- - 如果没有返回任何商品,放宽筛选条件(移除 fulfillmentspeed 或提高 maxprice)并重试。
- 如果商品ID未找到,建议改用关键词搜索。
- 如果未设置 SCAVIOAPIKEY,提示用户先导出密钥再继续。
LangChain
bash
pip install scavio-langchain
python
from scavio_langchain import ScavioSearchTool
tool = ScavioSearchTool(engine=walmart)