{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Price & Stock Monitor (MAP Alerts)",
    "description": "Monitor product prices and stock on any online store (Shopify, WooCommerce, Magento...). Get email alerts on price drops, increases, out-of-stock and MAP violations, plus Google Sheets export and price history charts.",
    "version": "0.3",
    "x-build-id": "KyRUBNCpyvPQEsPCy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/individual_chimpanzee~price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-individual_chimpanzee-price-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/individual_chimpanzee~price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-individual_chimpanzee-price-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/individual_chimpanzee~price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-individual_chimpanzee-price-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Product pages to monitor",
            "type": "array",
            "description": "Product page URLs, one per line. They can come from different stores. In JSON mode, add userData to name the store and set a minimum advertised price (MAP): {\"url\": \"https://...\", \"userData\": {\"label\": \"Store name\", \"mapPrice\": 34.99}}",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "language": {
            "title": "Report & email language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of the email alerts, the HTML report and the Google Sheet header.",
            "default": "en"
          },
          "reportTitle": {
            "title": "Report title",
            "type": "string",
            "description": "Shown at the top of the report and in the email subject. Example: Price watch – Acme Supplements"
          },
          "alertThresholdPercent": {
            "title": "Alert threshold (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Alert when the price changes by at least this percentage. 0 = any change.",
            "default": 0
          },
          "alertOnStockChange": {
            "title": "Alert on out-of-stock / back-in-stock",
            "type": "boolean",
            "description": "Alert when a product goes out of stock or comes back in stock.",
            "default": true
          },
          "notificationEmail": {
            "title": "Alert email",
            "type": "string",
            "description": "Address(es) that receive the summary, comma-separated. Leave empty for no email."
          },
          "emailOnlyOnAlerts": {
            "title": "Only email when there are alerts",
            "type": "boolean",
            "description": "Uncheck to receive an email on every run, even without changes.",
            "default": true
          },
          "resendApiKey": {
            "title": "Resend API key (optional)",
            "type": "string",
            "description": "Send emails through resend.com with your own sender address. Without a key, emails are sent by the free apify/send-mail Actor."
          },
          "emailFrom": {
            "title": "Sender (Resend only)",
            "type": "string",
            "description": "Example: Price Alerts <alerts@yourdomain.com>. The domain must be verified in Resend."
          },
          "googleSpreadsheetId": {
            "title": "Google Sheets spreadsheet ID",
            "type": "string",
            "description": "The part between /d/ and /edit in the spreadsheet URL. Share the spreadsheet (as Editor) with the service account email."
          },
          "googleSheetName": {
            "title": "Sheet (tab) name",
            "type": "string",
            "description": "Created automatically if it does not exist.",
            "default": "Prices"
          },
          "googleServiceAccountKey": {
            "title": "Google service account key (JSON)",
            "type": "string",
            "description": "Full content of the .json key file from Google Cloud (IAM → Service accounts → Keys)."
          },
          "priceSelector": {
            "title": "Price CSS selector (optional)",
            "type": "string",
            "description": "Only needed if the price is not found automatically. Example: .product-price"
          },
          "historyStoreName": {
            "title": "History name",
            "pattern": "^[a-zA-Z0-9-]+$",
            "type": "string",
            "description": "Use a different name per client or project to keep separate histories and reports (letters, digits and hyphens).",
            "default": "price-monitor-history"
          },
          "maxRequestsPerCrawl": {
            "title": "Max pages per run",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit to avoid unexpected costs.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxies reduce the risk of being blocked by stores."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}