{
  "openapi": "3.0.1",
  "info": {
    "title": "Allegro Scraper",
    "description": "Allegro scraper for allegro.pl search and category listings: price, lowest 30-day price and discount, delivery cost and time, Smart!, rating, recent buyers, seller type. Filters by rating, discount, seller and delivery. Monitor mode alerts on new offers and price drops.",
    "version": "0.1",
    "x-build-id": "PNiXe9616yau7oMZC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~allegro-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-allegro-scraper",
        "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/datahamster~allegro-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-allegro-scraper",
        "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/datahamster~allegro-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-allegro-scraper",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per line, e.g. \"słuchawki bezprzewodowe\". Each keyword is one Allegro search on allegro.pl.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Allegro listing or category URLs",
            "type": "array",
            "description": "Optional. Paste search or category pages from your browser (allegro.pl/listing?string=… or allegro.pl/kategoria/…) to keep every filter and sort you clicked there. Offer pages and seller pages are not accepted.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "newest",
              "popularity"
            ],
            "type": "string",
            "description": "Allegro's own sort order for keyword searches.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price (PLN)",
            "minimum": 0,
            "type": "number",
            "description": "Optional lower price bound in PLN, passed to Allegro's price filter."
          },
          "maxPrice": {
            "title": "Max price (PLN)",
            "minimum": 0,
            "type": "number",
            "description": "Optional upper price bound in PLN, passed to Allegro's price filter."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "Allegro's condition filter for keyword searches.",
            "default": "any"
          },
          "maxPages": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many result pages to read per search. Allegro shows about 60 organic offers per page and never more than 100 pages.",
            "default": 1
          },
          "minRating": {
            "title": "Min product rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Optional. Keep only offers whose product rating is at least this (0-5). Offers without a rating are dropped when set."
          },
          "minRatingCount": {
            "title": "Min number of ratings",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only offers with at least this many product ratings."
          },
          "minDiscountPercent": {
            "title": "Min discount %",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Optional. Keep only offers with Allegro's discount badge of at least this many percent (measured against the lowest price of the last 30 days)."
          },
          "freeDeliveryOnly": {
            "title": "Free delivery only",
            "type": "boolean",
            "description": "Keep only offers with free delivery.",
            "default": false
          },
          "smartOnly": {
            "title": "Allegro Smart! only",
            "type": "boolean",
            "description": "Keep only offers marked Smart! (free delivery for Allegro Smart! members).",
            "default": false
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "business",
              "officialStore",
              "superSeller"
            ],
            "type": "string",
            "description": "Keep only offers from this kind of seller.",
            "default": "any"
          },
          "includeSponsored": {
            "title": "Include sponsored offers",
            "type": "boolean",
            "description": "Off: organic results only. On: sponsored offers are added with isSponsored true and no organic position. Monitor mode always ignores ads.",
            "default": false
          },
          "strictQueryMatch": {
            "title": "Only offers matching the keyword",
            "type": "boolean",
            "description": "On: keep only offers whose title contains a word of the keyword (Polish letters and word endings are tolerated). Allegro fills weak searches with unrelated offers. Not applied to pasted URLs.",
            "default": true
          },
          "dedupeAcrossSearches": {
            "title": "One row per offer across keywords",
            "type": "boolean",
            "description": "On: an offer found by two keywords of the same run is returned once, under the first keyword. Ignored in monitor mode.",
            "default": true
          },
          "priceAlert": {
            "title": "Price alert (monitor)",
            "enum": [
              "any",
              "drops"
            ],
            "type": "string",
            "description": "Monitor mode: report every price change, or only drops below the last reported price.",
            "default": "any"
          },
          "minPriceChangePercent": {
            "title": "Min price change % (monitor)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Monitor mode: report a price change only when it is at least this many percent away from the last reported price. 0 = any change.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (you are charged only for pushed items)",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}