{
  "openapi": "3.0.1",
  "info": {
    "title": "Allegro Price & Stock Monitor",
    "description": "Monitor Allegro searches and get a dataset row only when a price, stock level or seller actually changes. Keeps a persistent snapshot, ignores rounding noise and can push Telegram alerts. Pay per page fetched and per change - no changes, no charge.",
    "version": "0.1",
    "x-build-id": "wXPHdeEARn8QDlfU1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blond_triathlon~allegro-price-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blond_triathlon-allegro-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/blond_triathlon~allegro-price-monitor/runs": {
      "post": {
        "operationId": "runs-sync-blond_triathlon-allegro-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/blond_triathlon~allegro-price-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-blond_triathlon-allegro-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",
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Allegro search phrases, e.g. \"iphone 15 128gb\". One listing page is fetched per query per run.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Listing or offer URLs",
            "type": "array",
            "description": "Optional. Allegro listing or offer URLs to track directly, in addition to queries.",
            "items": {
              "type": "object"
            }
          },
          "priceMin": {
            "title": "Min price (PLN)",
            "type": "integer",
            "description": "Optional lower price bound applied to search queries."
          },
          "priceMax": {
            "title": "Max price (PLN)",
            "type": "integer",
            "description": "Optional upper price bound applied to search queries."
          },
          "maxPagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many listing pages to fetch per query. Each page is one proxied request. Keep at 1 to stay inside the free tier.",
            "default": 1
          },
          "maxOffersPerQuery": {
            "title": "Max offers per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on offers kept per query. Older offers beyond this are ignored.",
            "default": 60
          },
          "mode": {
            "title": "Output mode",
            "enum": [
              "changes",
              "snapshot"
            ],
            "type": "string",
            "description": "changes = emit only price/stock changes (recommended for scheduled monitoring). snapshot = emit every offer seen.",
            "default": "changes"
          },
          "stateKey": {
            "title": "History namespace",
            "type": "string",
            "description": "Key-value store record that holds the previous run's prices. Use the same value on every run of a given watchlist; use different values for independent watchlists.",
            "default": "allegro-watchlist-1"
          },
          "removedAfterRuns": {
            "title": "Report delisting after N misses",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many consecutive runs an offer must be missing before it is reported as removed. 2 avoids false alarms when results shift between pages.",
            "default": 2
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "pl",
              "cz",
              "sk",
              "hu"
            ],
            "type": "string",
            "description": "Market to query.",
            "default": "pl"
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "unblocker",
              "residential",
              "datacenter",
              "none"
            ],
            "type": "string",
            "description": "allegro returns 403 to plain datacenter IPs. 'unblocker' is the cheapest mode that works at scale (~$1.5 per 1,000 requests). 'datacenter' uses the 5 free IPs and will usually be blocked. 'none' only works from a residential IP.",
            "default": "unblocker"
          },
          "proxyUrl": {
            "title": "Custom proxy URL",
            "type": "string",
            "description": "Optional. Overrides proxyMode entirely, e.g. http://user:pass@host:port. Leave empty to use Apify Proxy."
          },
          "maxRequests": {
            "title": "Max requests",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on outbound requests in this run. This is your cost guard.",
            "default": 40
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Politeness delay. 1500-4000 ms is recommended.",
            "default": 2500
          },
          "maxRetries": {
            "title": "Retries per URL",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries on 403/429/5xx. Each retry is a billed request.",
            "default": 2
          },
          "alertOn": {
            "title": "Emit changes of type",
            "type": "array",
            "description": "Which change types are written to the dataset.",
            "items": {
              "type": "string"
            },
            "default": [
              "new_offer",
              "price_down",
              "price_up",
              "back_in_stock",
              "out_of_stock",
              "removed"
            ]
          },
          "minPriceChangePct": {
            "title": "Ignore changes below (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Price moves smaller than this percentage are ignored. Filters marketplace noise.",
            "default": 1
          },
          "debugHtml": {
            "title": "Save raw page for debugging",
            "type": "boolean",
            "description": "Store the first fetched listing page in the run's key-value store so the parser can be inspected. Turn off in production.",
            "default": false
          },
          "telegram": {
            "title": "Telegram alerts",
            "type": "object",
            "description": "Optional free alerting. Create a bot with @BotFather, then send it a message and read the chat id from getUpdates.",
            "properties": {
              "botToken": {
                "type": "string",
                "title": "Bot token",
                "description": "Token from @BotFather, e.g. 123456:ABC-DEF.",
                "editor": "textfield"
              },
              "chatId": {
                "type": "string",
                "title": "Chat ID",
                "description": "Numeric chat id that receives the alerts.",
                "editor": "textfield"
              },
              "onlyTypes": {
                "type": "array",
                "title": "Alert only on",
                "description": "Change types that are sent to Telegram.",
                "editor": "stringList",
                "default": [
                  "price_down",
                  "back_in_stock",
                  "new_offer"
                ],
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}