{
  "openapi": "3.0.1",
  "info": {
    "title": "Marzi Allegro Scraper",
    "description": "Allegro.pl product data as JSON: scrape offers, search results and categories into one record per offer — price, rating, seller, offer count, Allegro's 30-day buyer counter, GTIN and stock on request. Pay per product. Built by Marzi.",
    "version": "0.1",
    "x-build-id": "ppEcSCT1wOLudkQUW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marzi.ai~allegro-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marzi.ai-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/marzi.ai~allegro-scraper/runs": {
      "post": {
        "operationId": "runs-sync-marzi.ai-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/marzi.ai~allegro-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-marzi.ai-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "PRODUCT",
              "SEARCH",
              "CATEGORY"
            ],
            "type": "string",
            "description": "PRODUCT reads offer pages you list in startUrls. SEARCH walks Allegro search results for searchQuery (or a search URL). CATEGORY walks the category pages you list in startUrls.",
            "default": "SEARCH"
          },
          "searchQuery": {
            "title": "Search query",
            "maxLength": 200,
            "type": "string",
            "description": "SEARCH mode: what to type into Allegro's search box, e.g. \"powerbank 20000mah\". Polish works best — Allegro is a Polish marketplace."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "PRODUCT mode: allegro.pl/oferta/… links. CATEGORY mode: allegro.pl/kategoria/… links. SEARCH mode may also take allegro.pl/listing?string=… links. Only allegro.pl is accepted.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many products. One product is one billable event. Runs are capped at 10,000.",
            "default": 100
          },
          "sort": {
            "title": "Sort (SEARCH / CATEGORY)",
            "enum": [
              "relevance",
              "popularity",
              "price_asc",
              "price_desc",
              "newest"
            ],
            "type": "string",
            "description": "Allegro's own sort orders. popularity is Allegro's \"most popular\" (by 30-day buyers).",
            "default": "relevance"
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "Allegro's condition filter (stan).",
            "default": "all"
          },
          "priceMin": {
            "title": "Price from (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price to include, PLN."
          },
          "priceMax": {
            "title": "Price to (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price to include, PLN."
          },
          "fetchDetails": {
            "title": "Open every offer page",
            "type": "boolean",
            "description": "SEARCH / CATEGORY: also open each offer to add category path, GTIN/EAN, stock, units sold, written reviews count and this seller's own 30-day buyer counter. One extra page per product, so runs take longer.",
            "default": false
          },
          "includeSponsored": {
            "title": "Include sponsored cards",
            "type": "boolean",
            "description": "Keep Allegro's paid ad slots in the results (flagged sponsored: true). Off by default: ads repeat on every page and usually duplicate organic results.",
            "default": false
          },
          "includeParameters": {
            "title": "Include parameters",
            "type": "boolean",
            "description": "Keep the product parameters (name/value pairs) on every record. Off = null: parameters and images are over half of a record's size and rarely needed for a decision - the same default the Marzi MCP uses for AI clients.",
            "default": true
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Keep the image URLs on every record (imageUrl, the first picture, stays either way). Off = null.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Browser sessions used at once. More is faster but not unbounded: Allegro's anti-bot regime is per identity, and the Actor paces every session.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}