> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# Walmart Category

Structured Walmart data: send `urls`. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/walmart-category/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/walmart-category/` with `urls`. The results are in `data.products`; send `data.next_cursor` back as `cursor` to get the next page. 12 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/walmart-category/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode "urls=3944" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/walmart-category/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"urls": "3944"},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["products"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `urls` | string | yes | e.g. `3944` | Walmart category URL or bare category id. Required on the first call; list -> first only. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `sort` | string | no | `best_match` | One of: `best_match`, `price_low`, `price_high`, `best_seller`, `top_rated`, `new`. Locked in cursor. |
| `min_price` | integer | no | — | Locked in cursor. |
| `max_price` | integer | no | — | Locked in cursor. |
| `refinement` | string | no | — | Facet token(s) e.g. brand:Apple. Locked in cursor. |
| `zip_code` | string | no | — | Resolved to a store on page 1. Locked in cursor. |
| `state` | string | no | — | Locked in cursor. |
| `store_id` | string | no | — | Locked in cursor. |
| `country` | string | no | `US` | One of: `US`, `CA`. Locked in cursor. |
| `strict_price_filter` | boolean | no | `true` | Locked in cursor. |
| `include_brand` | boolean | no | `false` | Per-product brand lookup (one extra product-page request per row; heavy, default off). Locked in cursor. |
| `include_reviews_count` | boolean | no | `false` | Locked in cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.products`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "urls": "3944",
    "category_id": "3944",
    "country": "US",
    "page": 1,
    "page_size": 43,
    "total_results": 900004,
    "products": [
      {
        "input_url": "3944",
        "category_id": "3944",
        "country": "US",
        "position": 2,
        "page": 1,
        "id": "18611919209",
        "url": "https://www.walmart.com/ip/HP-14-N150-4-128-Pink/18611919209?classType=VARIANT&athbdg=L1300",
        "title": "HP 14 inch HD Windows Laptop Intel Processor N150 4GB 128GB UFS Tranquil Pink",
        "description": "HP 14 inch HD Windows Laptop Intel Processor N150 4GB 128GB UFS Tranquil Pink",
        "seller": "Walmart.com",
        "brand": "HP",
        "price": {
          "current": 199,
          "original": 256.88,
          "currency": "USD"
        },
        "rating": {
          "average": 4.1,
          "count": 1053
        },
        "image_urls": "https://i5.walmartimages.com/seo/HP-14-N150-4-128-Pink_0ce3d9f7-c4c1-42b8-9829-bcda7e1fde68.1160f366df2b136e8823ee23ab51b895.jpeg",
        "availability": "In stock",
        "reviews_count": 133,
        "variations": [
          {
            "id": "18656507313",
            "title": "Waterfall blue",
            "url": "https://www.walmart.com/ip/HP-14-N150-4-128-Blue/18656507313?classType=VARIANT",
            "category": "actual_color"
          }
        ],
        "ext": {
          "seller_id": "F55CDC31AB754BB68FE0B39041159D63",
          "catalog_id": "19X7KSSCUQU5"
        },
        "scraped_at": "2026-09-24T11:38:54.633Z"
      }
    ],
    "next_cursor": "eyJpIjoiMzk0NCIsIm4iOjQzLCJwIjoyLCJzIjoiZjJDYkRERU5obDQ5"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `urls` | string | `3944` |  |
| `category_id` | string | `3944` |  |
| `country` | string | `US` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `43` |  |
| `total_results` | integer | `900004` |  |
| `products` | array | `[1 item]` | The results. |
| `next_cursor` | string | `eyJpIjoiMzk0NCIsIm4iOjQzLCJwIjoyLCJzIjoiZjJDY…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `products[].input_url` | string | `3944` |  |
| `products[].category_id` | string | `3944` |  |
| `products[].country` | string | `US` |  |
| `products[].position` | integer | `2` |  |
| `products[].page` | integer | `1` |  |
| `products[].id` | string | `18611919209` |  |
| `products[].url` | string | `https://www.walmart.com/ip/HP-14-N150-4-128-P…` |  |
| `products[].title` | string | `HP 14 inch HD Windows Laptop Intel Processor …` |  |
| `products[].description` | string | `HP 14 inch HD Windows Laptop Intel Processor …` |  |
| `products[].seller` | string | `Walmart.com` |  |
| `products[].brand` | string | `HP` |  |
| `products[].price` | object | `{…}` |  |
| `products[].rating` | object | `{…}` |  |
| `products[].image_urls` | string | `https://i5.walmartimages.com/seo/HP-14-N150-4…` |  |
| `products[].availability` | string | `In stock` |  |
| `products[].reviews_count` | integer | `133` |  |
| `products[].variations` | array | `[1 item]` |  |
| `products[].ext` | object | `{…}` |  |
| `products[].scraped_at` | string | `2026-09-24T11:38:54.633Z` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/walmart-category/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {"urls": "3944"}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("products") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Locked into the cursor: `sort`, `min_price`, `max_price`, `refinement`, `zip_code`, `state`, `store_id`, `country`, `strict_price_filter`, `include_brand`, `include_reviews_count`. Set them on the first call; later pages reuse them.

## Related

- [Walmart Data Extractor](https://docs.scrapier.io/api-reference/walmart/walmart-data-extractor.md): Structured Walmart data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [Walmart Reviews](https://docs.scrapier.io/api-reference/walmart/walmart-reviews.md): Structured Walmart data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [Walmart Search Scraper](https://docs.scrapier.io/api-reference/walmart/walmart-search-scraper.md): Structured Walmart data: send `queries`. Cursor-paginated, 1 credit per successful call.
