# Walmart 主页或对象详情 API (walmart.profile)

- Canonical page: https://everyinfra.com/walmart-api/profile
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "walmart", "action": "profile", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

Walmart 主页接口按商品链接 `url` 读取一件商品的详情，除了名称、品牌、`price` 和 `rating`，还带 `was_price`（划线价）、`availability`（库存状态）、`condition`（成色）、`upc`（商品条码）、`description`、`highlights`，以及退货字段 `return_policy` 和 `is_returnable`。它回答「这件商品是什么成色、能不能退、有没有划线价」。

尽管叫主页，读取的是商品资料，不是买家账号；`url` 要用 walmart.com/ip/ 的商品链接。`lang` 选 `en` 或 `fr`，默认 `en`，只改展示语言。`images` 按平台展示顺序给图片链接，没有图片时这个字段不出现。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=walmart&action=profile

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | profile / reviews / product_detail 的 walmart.com/ip/ 商品链接。profile 与 product_detail 都是商品资料，不是买家账号；reviews 读取该商品评论。 |
| lang | enum: en / fr | no | not declared | search / profile 的展示语言：en 英语、fr 法语，默认 en；不切换美国商城到加拿大，也不是评论语言过滤。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| item_id | 商品 ID。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| brand | 品牌。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| was_price | 此前售价（划线价）。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| in_stock | 是否有货。 |
| availability | 库存状态。 |
| seller_name | 卖家名称（Walmart 也有第三方卖家）。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| condition | 成色。 |
| upc | 商品条码(UPC)。跨平台比价时用它做同款匹配最准。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| description | 简介或描述，通常比 text 短。 |
| highlights | platform-native meaning |
| images | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| return_policy | platform-native meaning |
| is_returnable | platform-native meaning |
| badges | platform-native meaning |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "walmart",
  "action": "profile",
  "params": {
    "url": "https://www.walmart.com/ip/Apple-AirPods-Pro-2nd-Generation/1752657021"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "walmart",
        "action": "profile",
        "params": {
            "url": "https://www.walmart.com/ip/Apple-AirPods-Pro-2nd-Generation/1752657021",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "walmart",
  "action": "profile",
  "results": {
    "item_id": "1752657021",
    "name": "Restored Apple AirPods Pro (2nd Generation) Lightning Wireless Bluetooth In-Ear Earbuds, White",
    "url": "https://www.walmart.com/ip/Apple-AirPods-Pro-2nd-Generation-Lightning/1752657021",
    "brand": "Apple",
    "price": 149.95,
    "currency": "USD",
    "rating": 4.6,
    "review_count": 11634,
    "in_stock": false,
    "availability": "OUT_OF_STOCK",
    "category": "Electronics > Audio > Headphones > Shop Headphones by Brand > Apple AirPods > AirPods Pro",
    "condition": "New",
    "upc": "•••",
    "platform": "walmart",
    "description": "Experience an unparalleled audio journey with the Apple AirPods Pro (2nd Generation). These advanced in-ear earbuds feature up to two times more Active Noise Cancellation, allowing you to immerse yourself fully in your audio. Adaptive Transparency lets you comfortably hear your s…",
    "highlights": {
      "Noise control technology": "Active Noise Cancellation",
      "Battery life": "6 h",
      "Features": "Inner Ear",
      "Ip code": "IPX4",
      "Inputs/Outputs": "Lightning",
      "Wireless technology": "Bluetooth"
    },
    "return_policy": "Free 30-day returns",
    "is_returnable": true,
    "rating_scale": 5
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `lang` 传 `fr` 会读到加拿大商城的商品吗？

不会。`lang` 只切换展示语言，取 `en` 或 `fr`，默认 `en`；它不把美国商城切到加拿大，也不是评论语言过滤。

### 怎么跨平台匹配同一款商品？

用 `upc`，它是商品条码，跨平台比价时用它做同款匹配最准。`condition` 标出成色，同款但成色不同的商品，别混在一起比。`item_id` 是 Walmart 的商品 ID，跨平台匹配以条码为准。

### `was_price` 和 `price` 怎么一起用？

`was_price` 是此前售价，也就是划线价，`price` 是现价数值。把两个数对照着看，就知道这件商品有没有在划线价的基础上调整。币种见 `currency`，为 null 时别假定币种。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=walmart
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
