{
  "openapi": "3.0.1",
  "info": {
    "title": "Walmart Data Extractor",
    "description": "Extract Walmart.com products from search, category, product URLs, or item IDs. Returns prices, ratings, stock, seller, variants, breadcrumbs, and specifications. Optional per-review extraction. PPE pricing — $0.003 per product, $0.002 per review.",
    "version": "0.8",
    "x-build-id": "2bUl4ZMd6nP9k2TFf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~walmart-data-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-walmart-data-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/khadinakbar~walmart-data-extractor/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-walmart-data-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/khadinakbar~walmart-data-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-walmart-data-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "productUrls",
              "itemIds"
            ],
            "type": "string",
            "description": "Which extraction surface to scrape on Walmart.com. `search` runs a keyword search (returns search-card data — title, price, brand, rating, stock — for many products fast); `productUrls` fetches detail pages directly (returns full data — variants, specifications, image gallery, description — per URL); `itemIds` looks up each ID via the search engine and returns search-card data. Defaults to `search`.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text query run on Walmart's search engine (e.g., 'wireless headphones', 'samsung 65 inch tv'). Required when `mode = search`. To narrow by category, append a Walmart `cat_id` filter to the URL via the `sortBy` + filters fields, or include the category name in the keyword itself."
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct Walmart product detail URLs (e.g., `https://www.walmart.com/ip/JLab-Studio-2-Wireless-Headphones/13544111159`). Required when `mode = productUrls`. Each URL produces one full product record with variants, specifications, and image gallery. NOT search URLs — those use `mode = search`.",
            "items": {
              "type": "string"
            }
          },
          "itemIds": {
            "title": "Walmart item IDs",
            "type": "array",
            "description": "Numeric Walmart item IDs (e.g., `13544111159`). Required when `mode = itemIds`. Each ID is resolved via Walmart's search engine (more reliable than the slug-less /ip/{id} URL which PerimeterX often blocks) and returned as a search-card record (title, price, brand, rating, stock, seller). For full detail with variants and specs, use `productUrls` with the canonical slug URL instead.",
            "items": {
              "type": "string"
            }
          },
          "maxProducts": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on total products written to the dataset. Higher values cost more (each product is $0.003). The example prefill is intentionally small so Apify health checks finish quickly; raise it for production runs. Hard cap 500 — for larger jobs split into multiple runs to keep cost predictable.",
            "default": 50
          },
          "includeReviews": {
            "title": "Include customer reviews",
            "type": "boolean",
            "description": "When true, each product also fetches its customer reviews and pushes them as separate records into the dataset (each tagged `_type: review`). Reviews are charged separately at $0.002 each. Off by default.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper bound on reviews scraped per product when `includeReviews = true`. Default 20. Hard cap 200 per product — most signal lives in the first 20 reviews.",
            "default": 20
          },
          "includeVariants": {
            "title": "Include variants",
            "type": "boolean",
            "description": "Include the `variants` array on product detail records (size/color/configuration options). Default true. Disable to shrink record size when variants aren't needed.",
            "default": true
          },
          "includeSpecifications": {
            "title": "Include specifications",
            "type": "boolean",
            "description": "Include the `specifications` object on product detail records (manufacturer-supplied spec sheet). Default true. Disable to shrink record size when specs aren't needed.",
            "default": true
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out products whose current price is below this value. Applied client-side; products without a parsed price are NOT filtered out. Omit for no lower bound."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out products whose current price is above this value. Applied client-side; products without a parsed price are NOT filtered out. Omit for no upper bound."
          },
          "brands": {
            "title": "Brand filter",
            "type": "array",
            "description": "Optional case-insensitive substring match against the product's brand (e.g., ['Apple', 'Samsung']). Products with a matching brand are kept; products with no brand attribute are dropped. Omit to disable brand filtering.",
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Filter out products with an average rating below this value (1.0–5.0). Products without ratings are NOT filtered. Omit to disable rating filtering."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "bestMatch",
              "priceLow",
              "priceHigh",
              "rating",
              "newest",
              "bestSelling"
            ],
            "type": "string",
            "description": "Sort order applied to search results. Ignored for `productUrls` and `itemIds` modes. `bestMatch` = Walmart's default ranking; `priceLow`/`priceHigh` = price ascending/descending; `rating` = highest-rated first; `newest` = recently added; `bestSelling` = top sellers.",
            "default": "bestMatch"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration. Defaults to Apify Residential proxies pinned to US — required because Walmart geo-locks pricing/availability and runs Akamai + PerimeterX. Override only if you have a specific reason (e.g., your own residential pool).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}