{
  "openapi": "3.0.1",
  "info": {
    "title": "Scraped Price & Stock Changes — Safe Snapshot Diff",
    "description": "Compare product scraper datasets for price drops and stock changes. Partial scrapes never imply product deletion. Select two datasets or JSON arrays; raw values omitted. $0.05/report, usage included.",
    "version": "0.1",
    "x-build-id": "Osf3L8nMWPboCAHIm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/analytical_gratefulness~scraped-price-stock-changes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-analytical_gratefulness-scraped-price-stock-changes",
        "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/analytical_gratefulness~scraped-price-stock-changes/runs": {
      "post": {
        "operationId": "runs-sync-analytical_gratefulness-scraped-price-stock-changes",
        "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/analytical_gratefulness~scraped-price-stock-changes/run-sync": {
      "post": {
        "operationId": "run-sync-analytical_gratefulness-scraped-price-stock-changes",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "demo",
              "compare"
            ],
            "type": "string",
            "description": "Demo accepts no supplied data. Compare bills once per completed report, including reviews and unchanged snapshots.",
            "default": "demo"
          },
          "input_layout": {
            "title": "Source field layout",
            "enum": [
              "custom",
              "ecommerce_offers"
            ],
            "type": "string",
            "description": "Offers layout uses url, offers.price, offers.priceCurrency and offers.availability; manual field settings are ignored. Single offers object only, not arrays or price ranges. Choose Price only when stock is absent.",
            "default": "custom"
          },
          "comparison_scope": {
            "title": "What to compare",
            "enum": [
              "price_and_stock",
              "price_only"
            ],
            "type": "string",
            "description": "Price only skips stock reads and findings. Missing rows, ambiguous keys, unknown prices and currency mismatches still require review. Same $0.05 per completed report.",
            "default": "price_and_stock"
          },
          "previous_dataset_id": {
            "title": "Previous product dataset (READ only)",
            "type": "string",
            "description": "Select a finished scraper dataset. Alternative to inline items on this side. Only the four mapped product fields are read. Maximum 5000 rows per side."
          },
          "previous_items": {
            "title": "Previous product rows (JSON alternative)",
            "maxItems": 5000,
            "type": "array",
            "description": "Supply only public product data. Use either this array or the selected dataset on each side, not both. Combined snapshots at most 8 MiB.",
            "items": {
              "type": "object"
            }
          },
          "current_dataset_id": {
            "title": "Current product dataset (READ only)",
            "type": "string",
            "description": "Select a finished scraper dataset. Alternative to inline items on this side. Only the four mapped product fields are read. Maximum 5000 rows per side."
          },
          "current_items": {
            "title": "Current product rows (JSON alternative)",
            "maxItems": 5000,
            "type": "array",
            "description": "Supply only public product data. Use either this array or the selected dataset on each side, not both. Combined snapshots at most 8 MiB.",
            "items": {
              "type": "object"
            }
          },
          "key_field": {
            "title": "Key Field",
            "maxLength": 64,
            "type": "string",
            "description": "Exact field name or bounded dot path such as product.price. Map a stable product key, plain decimal price, matching three-letter currency and boolean/recognized stock text. No private fields.",
            "default": "id"
          },
          "price_field": {
            "title": "Price Field",
            "maxLength": 64,
            "type": "string",
            "description": "Exact field name or bounded dot path such as product.price. Map a stable product key, plain decimal price, matching three-letter currency and boolean/recognized stock text. No private fields.",
            "default": "price"
          },
          "currency_field": {
            "title": "Currency Field",
            "maxLength": 64,
            "type": "string",
            "description": "Exact field name or bounded dot path such as product.price. Map a stable product key, plain decimal price, matching three-letter currency and boolean/recognized stock text. No private fields.",
            "default": "currency"
          },
          "stock_field": {
            "title": "Stock Field",
            "maxLength": 64,
            "type": "string",
            "description": "Exact field name or bounded dot path such as product.price. Map a stable product key, plain decimal price, matching three-letter currency and boolean/recognized stock text. No private fields.",
            "default": "inStock"
          },
          "previous_complete": {
            "title": "Previous snapshot covers the full same product scope",
            "type": "boolean",
            "description": "Leave false for samples, partial scrapes or changed filters. True allows added/missing-from-snapshot labels; these never verify deletion from a website. Read limits override this declaration.",
            "default": false
          },
          "current_complete": {
            "title": "Current snapshot covers the full same product scope",
            "type": "boolean",
            "description": "Leave false for samples, partial scrapes or changed filters. True allows added/missing-from-snapshot labels; these never verify deletion from a website. Read limits override this declaration.",
            "default": false
          },
          "price_change_percent": {
            "title": "Price alert threshold (%)",
            "minimum": 0,
            "maximum": 1000,
            "type": "number",
            "description": "Absolute percentage change; 5% is an initial preference, not a proven optimal threshold. Currency mismatch or ambiguous prices skip numeric comparison.",
            "default": 5
          },
          "delete_input_after_read": {
            "title": "Remove this run input record after reading",
            "type": "boolean",
            "description": "Removes only this run INPUT, not original source datasets, saved task input, platform backups or other copies. Outputs contain row references, not raw values.",
            "default": true
          },
          "payload": {
            "title": "Optional integration metadata",
            "type": "object",
            "description": "Ignored integration envelope. Explicit previous_dataset_id and current_dataset_id control which datasets are read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}