{
  "openapi": "3.0.1",
  "info": {
    "title": "Otomoto Cars Scraper (Poland)",
    "description": "Scrapes used and new car listings from Otomoto, Poland's largest car marketplace, by brand and region. Every row carries price, mileage, fuel type, gearbox, year, location, seller info and images.",
    "version": "0.1",
    "x-build-id": "Xp3aZurvJJ7dyCKbX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~otomoto-cars-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-otomoto-cars-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/scrapyx~otomoto-cars-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-otomoto-cars-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/scrapyx~otomoto-cars-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-otomoto-cars-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One {brand, region} pair per entry, each with its own SEARCH_SUMMARY row. Both may be empty strings for \"all brands, all of Poland\".\n\n`brand` is free text (e.g. `bmw`, `audi`, `volkswagen`) — Otomoto lists too many makes/models for a fixed list, so it is validated at runtime instead: if the brand is not recognised, Otomoto silently serves the NATIONAL baseline rather than an error, and this actor detects that and reports `brandApplied: false` with zero rows rather than emitting cars for the wrong scope.\n\n`region` must be one of Poland's 16 voivodeships or empty for the whole country.\n\nExample:\n```json\n[{\"brand\": \"bmw\", \"region\": \"mazowieckie\"}, {\"brand\": \"audi\", \"region\": \"\"}]\n```",
            "default": [
              {
                "brand": "",
                "region": ""
              }
            ]
          },
          "fuelType": {
            "title": "Fuel type",
            "enum": [
              "",
              "petrol",
              "diesel",
              "electric",
              "hybrid",
              "lpg",
              "hybrid-plug-in"
            ],
            "type": "string",
            "description": "Verified real. An unrecognised value is answered with an honest zero-result total (a rare exception to this portfolio's usual silent-widen pattern), so this is offered as a courtesy rather than a strict requirement.",
            "default": ""
          },
          "priceFrom": {
            "title": "Minimum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Verified real. Leave at 0 to skip.",
            "default": 0
          },
          "priceTo": {
            "title": "Maximum price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Verified real: `50000` narrowed the Audi baseline from 19,270 to 11,555. Leave at 0 to skip.",
            "default": 0
          },
          "mileageFrom": {
            "title": "Minimum mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Verified real. Leave at 0 to skip.",
            "default": 0
          },
          "mileageTo": {
            "title": "Maximum mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Verified real: `50000` narrowed the Audi baseline from 19,270 to 4,344. Leave at 0 to skip.",
            "default": 0
          },
          "includeCarDetails": {
            "title": "Fetch full car details",
            "type": "boolean",
            "description": "Adds one request per listing and attaches a `detail` object with the full equipment list, a richer `parametersDict`, AI-generated summary/insight where present, and verified-car badges.\n\nOff by default — search rows already carry price, mileage, fuel, gearbox, location, seller and images.",
            "default": false
          },
          "maxItems": {
            "title": "Max cars per query",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many cars per (brand, region) query. Set to 0 for everything Otomoto will serve.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Upper bound on requests in flight at once, across all queries and any detail fetches.",
            "default": 4
          },
          "minRequestInterval": {
            "title": "Minimum seconds between requests",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Paces how often requests START, without tying up a concurrency slot. Leave at 0 to use the built-in default of 0.3s -- 0 does not mean 'no pacing'.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential pinned to Poland. No WAF or bot challenge was observed on any of 8 TLS profiles across search and detail surfaces, but Otomoto is a Poland-only portal and container egress is a different posture than a home connection.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "PL"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}