{
  "openapi": "3.0.1",
  "info": {
    "title": "Otomoto.pl Scraper",
    "description": "Scrape Otomoto.pl Polish car listings: one run returns used-car rows with price, make, model, year, mileage, fuel, gearbox, seller and URL. Detail mode adds description, photos, equipment, VIN and CEPiK history; monitor mode tracks new, price-changed and removed cars.",
    "version": "0.1",
    "x-build-id": "pJai2GZaSAFiCajY8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/redomic~otomoto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-redomic-otomoto-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/redomic~otomoto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-redomic-otomoto-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/redomic~otomoto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-redomic-otomoto-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Otomoto.pl search, offer or dealer inventory URLs to scrape (e.g. https://www.otomoto.pl/osobowe/bmw or https://dealers.otomoto.pl/inventory). When set, the structured filters below are ignored.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "detail",
              "monitor"
            ],
            "type": "string",
            "description": "detail (default) opens offer pages for richer rows (description, equipment, photos, VIN, CEPiK); search returns listing cards only; monitor reports only new, changed and removed listings since the last run.",
            "default": "detail"
          },
          "category": {
            "title": "Category",
            "enum": [
              "osobowe",
              "dostawcze",
              "ciezarowe",
              "przyczepy",
              "maszyny-budowlane",
              "czesci"
            ],
            "type": "string",
            "description": "Vehicle section to search.",
            "default": "osobowe"
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Vehicle make, e.g. BMW, Audi, Skoda. Use the Otomoto.pl slug or the name.",
            "default": ""
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Vehicle model, e.g. Seria 3, A4, Octavia.",
            "default": ""
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or voivodeship path segment, e.g. warszawa, krakow, mazowieckie. Leave empty for whole Poland.",
            "default": ""
          },
          "yearFrom": {
            "title": "Min production year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Earliest production year (1900-2030)."
          },
          "yearTo": {
            "title": "Max production year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Latest production year (1900-2030)."
          },
          "priceMin": {
            "title": "Min price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in Polish zloty."
          },
          "priceMax": {
            "title": "Max price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in Polish zloty."
          },
          "mileageMin": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum mileage in kilometres."
          },
          "mileageMax": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum mileage in kilometres."
          },
          "fuelType": {
            "title": "Fuel type",
            "enum": [
              "",
              "petrol",
              "diesel",
              "electric",
              "hybrid",
              "plugin-hybrid",
              "lpg",
              "cng",
              "hydrogen"
            ],
            "type": "string",
            "description": "Fuel type filter. Leave empty for all.",
            "default": ""
          },
          "gearbox": {
            "title": "Gearbox",
            "enum": [
              "",
              "manual",
              "automatic"
            ],
            "type": "string",
            "description": "Gearbox filter. Leave empty for all.",
            "default": ""
          },
          "bodyType": {
            "title": "Body type",
            "enum": [
              "",
              "sedan",
              "kombi",
              "suv",
              "compact",
              "coupe",
              "cabrio",
              "minivan",
              "city-car"
            ],
            "type": "string",
            "description": "Body type filter using Otomoto slugs (e.g. sedan, kombi, suv, compact, coupe, cabrio, minivan, city-car). Leave empty for all.",
            "default": ""
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Private seller or business/dealer. Leave empty for all.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "",
              "newest",
              "cheapest",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "Listing order for structured search (ignored when startUrls are set).",
            "default": ""
          },
          "onlyPriceDrops": {
            "title": "Only price drops",
            "type": "boolean",
            "description": "Return only listings that Otomoto marks as price drops (structured search).",
            "default": false
          },
          "lat": {
            "title": "Centre latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Centre latitude for radius search. In detail mode, rows get distanceKm from the seller's map pin; with radiusKm only rows within the radius are returned."
          },
          "lng": {
            "title": "Centre longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Centre longitude for radius search. In detail mode, rows get distanceKm from the seller's map pin; with radiusKm only rows within the radius are returned."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0,
            "type": "number",
            "description": "With a location, keeps only listings within this many kilometres of that location. With lat/lng in detail mode, filters by the seller's map pin and adds distanceKm."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Keyword filter. Only rows whose title, version, short description or description contain all words from this text are returned.",
            "default": ""
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum listing rows to return across all sources.",
            "default": 100
          },
          "includeNoPrice": {
            "title": "Include listings without a price",
            "type": "boolean",
            "description": "By default listings with no published price are dropped. Set true to also return them with priceAmount null.",
            "default": false
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings (used if the Actor is configured for proxied requests).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}