Walmart Filters API

When SerpApi encounters filters, we add them to our JSON output as the filters array. We are able to extract its type, name, url, values.


The API endpoint is https://serpapi.com/search?engine=walmart

Head to the playground for a live and interactive demo.

API Examples

Results for: filters

Results for: filters

JSON Example

{
  ...
  "filters": [
    {
      "name": "Departments",
      "type": "cat_id",
      "values": [
        {
          "id": "976759",
          "item_count": 56655,
          "name": "Food",
          "type": "cat_id",
          "url": "https://www.walmart.com/search?query=coffee&cat_id=976759&grid=true&redirect=false",
          "serpapi_url": "https://serpapi.com/search.json?cat_id=976759&device=desktop&engine=walmart&grid=true&query=coffee",
          "values": [
            {
              "id": "976759_1086446",
              "item_count": 56630,
              "name": "Coffee",
              "type": "cat_id",
              "url": "https://www.walmart.com/search?query=coffee&cat_id=976759_1086446&grid=true&redirect=false",
              "serpapi_url": "https://serpapi.com/search.json?cat_id=976759_1086446&device=desktop&engine=walmart&grid=true&query=coffee",
              "values": [
                {
                  "id": "976759_1086446_1229651",
                  "item_count": 0,
                  "name": "Ground Coffee",
                  "type": "cat_id",
                  "url": "https://www.walmart.com/search?query=coffee&cat_id=976759_1086446_1229651&grid=true&redirect=false",
                  "serpapi_url": "https://serpapi.com/search.json?cat_id=976759_1086446_1229651&device=desktop&engine=walmart&grid=true&query=coffee"
                },
                {
                  "id": "976759_1086446_1229653",
                  "item_count": 0,
                  "name": "Single-Serve Cups & Pods",
                  "type": "cat_id",
                  "url": "https://www.walmart.com/search?query=coffee&cat_id=976759_1086446_1229653&grid=true&redirect=false",
                  "serpapi_url": "https://serpapi.com/search.json?cat_id=976759_1086446_1229653&device=desktop&engine=walmart&grid=true&query=coffee"
                }
              ]
            },
            {
              "id": "976759_976780",
              "item_count": 9,
              "name": "Baking",
              "type": "cat_id",
              "url": "https://www.walmart.com/search?query=coffee&cat_id=976759_976780&grid=true&redirect=false",
              "serpapi_url": "https://serpapi.com/search.json?cat_id=976759_976780&device=desktop&engine=walmart&grid=true&query=coffee"
            },
          ]
        }
      ]
    },
    {
      "name": "Price",
      "type": "price",
      "min": 0,
      "max": 30,
      "step_size": 1
    },
    ...
  ]
  ...
}

JSON structure overview

{
  ...
  "filters": [
    {
      "name": "String - Filter group name (e.g. 'Departments', 'Price')",
      "type": "String - Filter type (e.g. 'cat_id', 'price')",
      "min": "Integer - Minimum value for range filters",
      "max": "Integer - Maximum value for range filters",
      "step_size": "Integer - Step size for range filters",
      "values": [
        {
          "id": "String - Filter value identifier",
          "item_count": "Integer - Number of items matching this filter",
          "name": "String - Filter value name",
          "type": "String - Filter value type",
          "url": "String - URL to the filtered search page",
          "serpapi_url": "String - SerpApi link to fetch filtered results",
          "min": "Integer - Minimum value for range filters",
          "max": "Integer - Maximum value for range filters",
          "step_size": "Integer - Step size for range filters",
          "values": "Array - Nested filter values"
        },
        ...
      ]
    },
    ...
  ],
  ...
}