{
  "openapi": "3.0.1",
  "info": {
    "title": "Structured Product Price & Stock Monitor — JSON-LD / Shopify",
    "description": "Price & stock monitor that reads each store's own published data (Shopify, WooCommerce, JSON-LD), so prices match the storefront. No API key. Price-drop & restock webhooks for Slack, Discord, Zapier. Built for deal apps, repricing and AI agents.",
    "version": "0.1",
    "x-build-id": "QOrlNAyL7EzV6Yaiw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~structured-product-price-stock-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-structured-product-price-stock-monitor",
        "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/dami_studio~structured-product-price-stock-monitor/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-structured-product-price-stock-monitor",
        "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/dami_studio~structured-product-price-stock-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-structured-product-price-stock-monitor",
        "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",
        "required": [
          "products"
        ],
        "properties": {
          "products": {
            "title": "Products to monitor",
            "type": "array",
            "description": "The product URLs to track. Each item is an object: { \"url\": \"https://store.com/products/x\", \"label\": \"optional human name\" }. `url` is required; `label` is optional and used in output and alerts. Best results on pages that expose structured product data (most Shopify / WooCommerce / schema.org Product stores). Marketplaces with heavy anti-bot protection (Amazon, Walmart, eBay, SHEIN) are intentionally NOT targeted — see the README."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new / changed since last run",
            "type": "boolean",
            "description": "When ON (recommended for scheduled monitoring), only products that are new or have changed are emitted to the dataset — deltas, not a full re-dump. When OFF, every product's current state is emitted every run.",
            "default": true
          },
          "trackPrice": {
            "title": "Track price",
            "type": "boolean",
            "description": "Detect price_change events (old -> new, with % change).",
            "default": true
          },
          "trackStock": {
            "title": "Track stock",
            "type": "boolean",
            "description": "Detect back_in_stock / out_of_stock events.",
            "default": true
          },
          "trackSalePrice": {
            "title": "Track sale / compare-at price",
            "type": "boolean",
            "description": "Detect sale_started / sale_ended events (based on compare-at / list price where the source exposes it — best on Shopify & WooCommerce).",
            "default": true
          },
          "trackTitle": {
            "title": "Track title",
            "type": "boolean",
            "description": "Detect title_change events (useful for catching relisted / swapped products).",
            "default": true
          },
          "priceDropThresholdPct": {
            "title": "Price-drop threshold (%)",
            "minimum": 0,
            "maximum": 95,
            "type": "integer",
            "description": "Only treat a price DROP as a change when it is at least this percentage. 0 (default) records every price change. Price increases are always recorded regardless. Use e.g. 5 to ignore tiny fluctuations and only act on meaningful drops.",
            "default": 0
          },
          "notifyOnRestock": {
            "title": "Notify on restock",
            "type": "boolean",
            "description": "Send a webhook notification when a product comes back in stock.",
            "default": true
          },
          "notifyOnPriceDrop": {
            "title": "Notify on price drop",
            "type": "boolean",
            "description": "Send a webhook notification when a price drops (respecting the price-drop threshold above).",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Optional. Slack, Discord, or generic webhook to receive a compact change summary. Slack (hooks.slack.com) and Discord (discord.com/api/webhooks) formats are auto-detected; any other URL receives the full structured JSON payload (great for Zapier / Make / n8n / custom endpoints).",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Most structured-data reads work fine without a proxy; enable Apify Proxy if a storefront geo/rate-gates you.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}