{
  "openapi": "3.0.1",
  "info": {
    "title": "Catalog Feed Diff: Price, Stock and SKU Change Detector",
    "description": "Compare two product feeds or price lists (CSV, JSON, XML, Google Merchant) and get every added, removed, repriced and out-of-stock product. Schedule it to monitor a supplier feed.",
    "version": "0.0",
    "x-build-id": "oy6PmPagZt8M3mU0u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/althorlabs~catalog-feed-diff/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-althorlabs-catalog-feed-diff",
        "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/althorlabs~catalog-feed-diff/runs": {
      "post": {
        "operationId": "runs-sync-althorlabs-catalog-feed-diff",
        "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/althorlabs~catalog-feed-diff/run-sync": {
      "post": {
        "operationId": "run-sync-althorlabs-catalog-feed-diff",
        "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": {
          "currentFeedUrl": {
            "title": "Current feed URL",
            "type": "string",
            "description": "Public HTTP or HTTPS URL of the newer feed. It must resolve to a public IP. Redirects and URL credentials are rejected. Takes priority over pasted text."
          },
          "currentFeedText": {
            "title": "Current feed (pasted)",
            "type": "string",
            "description": "Paste the newer feed here if it has no URL."
          },
          "previousFeedUrl": {
            "title": "Previous feed URL",
            "type": "string",
            "description": "Public HTTP or HTTPS URL of the older feed. Leave empty when using a stored baseline."
          },
          "previousFeedText": {
            "title": "Previous feed (pasted)",
            "type": "string",
            "description": "Paste the older feed here if it has no URL."
          },
          "useStoredBaseline": {
            "title": "Compare against the last saved run",
            "type": "boolean",
            "description": "Compare with the feed saved under the baseline name, then replace it only after a complete run. Previous-feed inputs are ignored in this mode.",
            "default": false
          },
          "baselineName": {
            "title": "Baseline name",
            "type": "string",
            "description": "Use a different name per supplier or store so baselines stay separate. Runs for the same baseline are serialized.",
            "default": "default"
          },
          "baselineStoreId": {
            "title": "Baseline key-value store ID",
            "pattern": "^[A-Za-z0-9_-]{0,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Optional. Use with lockQueueId to grant a limited-permission run read/write access to the existing monitoring storage. Must identify the catalog-feed-reconciler-baselines store."
          },
          "lockQueueId": {
            "title": "Monitoring lock request queue ID",
            "pattern": "^[A-Za-z0-9_-]{0,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Optional. Use with baselineStoreId in monitoring mode. Must identify the lock queue derived from this Baseline name. Both IDs are required together."
          },
          "format": {
            "title": "Feed format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xml"
            ],
            "type": "string",
            "description": "Leave on automatic detection unless parsing fails.",
            "default": "auto"
          },
          "itemsPath": {
            "title": "Items path (JSON)",
            "type": "string",
            "description": "Dot path to the product list inside a JSON document, for example products or data.items. Detected automatically if empty."
          },
          "keyField": {
            "title": "Key field",
            "type": "string",
            "description": "Field that identifies a product in both feeds, such as SKU, id or gtin. Detected automatically if empty."
          },
          "priceField": {
            "title": "Price field",
            "type": "string",
            "description": "Detected automatically if empty. Dot paths work, for example variants.0.price."
          },
          "availabilityField": {
            "title": "Availability or stock field",
            "type": "string",
            "description": "Text such as in stock, booleans and quantities are all understood. Detected automatically if empty."
          },
          "titleField": {
            "title": "Title field",
            "type": "string",
            "description": "Detected automatically if empty. Title changes are reported."
          },
          "compareFields": {
            "title": "Other fields to compare",
            "type": "array",
            "description": "Extra fields to report when they change, such as brand, image_link or description.",
            "items": {
              "type": "string"
            }
          },
          "minPriceChangePct": {
            "title": "Minimum price change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Ignore price changes smaller than this percentage.",
            "default": 0
          },
          "includeUnchanged": {
            "title": "Include unchanged items",
            "type": "boolean",
            "description": "Include unchanged products in the dataset output.",
            "default": false
          },
          "includeItemData": {
            "title": "Include full item data",
            "type": "boolean",
            "description": "Attach the complete previous and current item to each row.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum items per feed",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Feeds above this item count are rejected without truncation.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}