{
  "openapi": "3.0.1",
  "info": {
    "title": "Price Comparison Scraper",
    "description": "The Price Comparison Scraper searches top online retailers all at once to save you time and money.\nType in any product name, and it will instantly compare prices from Amazon, Walmart, Target, and eBay with helpful insights.",
    "version": "2.3",
    "x-build-id": "uRnvaZzkdlKzQQ5D1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/credible_sandal~price-comparison-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-credible_sandal-price-comparison-scraper",
        "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/credible_sandal~price-comparison-scraper/runs": {
      "post": {
        "operationId": "runs-sync-credible_sandal-price-comparison-scraper",
        "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/credible_sandal~price-comparison-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-credible_sandal-price-comparison-scraper",
        "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",
              "monitor"
            ],
            "type": "string",
            "description": "Operating mode: 'search' for one-time search, 'monitor' for watchlist monitoring",
            "default": "search"
          },
          "product_name": {
            "title": "Product Name",
            "minLength": 2,
            "maxLength": 200,
            "type": "string",
            "description": "Product name or search query (required in 'search' mode, ignored in 'monitor' mode)"
          },
          "max_results_per_site": {
            "title": "Max Results Per Site",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of products to scrape from each site",
            "default": 3
          },
          "sites": {
            "title": "Sites to Search",
            "uniqueItems": true,
            "type": "array",
            "description": "Select retailers to search. Recommended: amazon, walmart, bestbuy, target, newegg. Note: eBay and Costco are unstable and may have lower success rates.",
            "items": {
              "type": "string",
              "enum": [
                "amazon",
                "walmart",
                "target",
                "bestbuy",
                "newegg",
                "ebay",
                "costco"
              ]
            },
            "default": [
              "amazon",
              "walmart",
              "bestbuy"
            ]
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings (recommended to use Apify proxy to avoid blocking)",
            "default": {
              "useApifyProxy": true
            }
          },
          "timeout": {
            "title": "Page Timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Page load timeout in seconds",
            "default": 30
          },
          "use_fast_mode": {
            "title": "Use Fast Mode",
            "type": "boolean",
            "description": "Enable fast mode (extract from search results only, don't visit product pages)",
            "default": false
          },
          "include_shipping": {
            "title": "Include Shipping Costs",
            "type": "boolean",
            "description": "Include shipping costs in price comparison",
            "default": true
          },
          "enable_alerts": {
            "title": "Enable Discord Price Alerts",
            "type": "boolean",
            "description": "Get instant Discord notifications when prices drop below your threshold or hit all-time lows (100% FREE)",
            "default": false
          },
          "discord_webhook_url": {
            "title": "Discord Webhook URL",
            "pattern": "^https://discord(app)?\\.com/api/webhooks/.*$",
            "type": "string",
            "description": "Your Discord webhook URL for receiving price alerts. To create: Open Discord → Channel Settings → Integrations → Webhooks → New Webhook → Copy Webhook URL"
          },
          "alert_threshold_percentage": {
            "title": "Alert Threshold (%)",
            "minimum": 1,
            "maximum": 50,
            "type": "number",
            "description": "Minimum price drop percentage to trigger an alert (e.g., 5 = alert on 5%+ price drops)",
            "default": 5
          },
          "alert_on_all_time_low": {
            "title": "Alert on All-Time Lows",
            "type": "boolean",
            "description": "Send special alerts when products hit their lowest price ever (recommended)",
            "default": true
          },
          "send_test_notification": {
            "title": "Send Test Notification",
            "type": "boolean",
            "description": "Send a test message to your Discord channel to verify the webhook is working",
            "default": false
          },
          "watchlist": {
            "title": "Watchlist",
            "type": "array",
            "description": "List of products to monitor (only used in 'monitor' mode). Each item should have product_name, optional target_price, and optional stores array",
            "items": {
              "type": "object",
              "properties": {
                "product_name": {
                  "type": "string",
                  "title": "Product Name",
                  "description": "Product name or search query"
                },
                "target_price": {
                  "type": "number",
                  "title": "Target Price",
                  "description": "Alert when price drops to or below this amount (optional)"
                },
                "stores": {
                  "type": "array",
                  "title": "Stores",
                  "description": "Specific stores to check for this product (valid values: amazon, walmart, target, bestbuy, newegg, ebay, costco). If not set, uses default sites. Recommended: amazon, walmart, bestbuy, target, newegg",
                  "items": {
                    "type": "string"
                  }
                },
                "enabled": {
                  "type": "boolean",
                  "title": "Enabled",
                  "description": "Whether to actively monitor this item",
                  "default": true
                }
              },
              "required": [
                "product_name"
              ]
            }
          },
          "watchlist_id": {
            "title": "Watchlist ID (Alternative)",
            "type": "string",
            "description": "Load a previously saved watchlist from Apify Key-Value Store by ID (alternative to providing watchlist array directly). Only used in 'monitor' mode. If both watchlist and watchlist_id are provided, watchlist takes precedence."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}