{
  "openapi": "3.0.1",
  "info": {
    "title": "Otomoto Deal Finder: Car Deal Ratings & Price Drops",
    "description": "Find underpriced used cars on Otomoto.pl. Every listing is rated GREAT, GOOD, FAIR, HIGH or OVERPRICED against comparable cars (same model, year, fuel, power, mileage-adjusted), with market price, difference in PLN and daily alerts for new listings and price drops.",
    "version": "0.1",
    "x-build-id": "88VzLcoBJfvaBVsan"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/donzely~otomoto-deal-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-donzely-otomoto-deal-finder",
        "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/donzely~otomoto-deal-finder/runs": {
      "post": {
        "operationId": "runs-sync-donzely-otomoto-deal-finder",
        "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/donzely~otomoto-deal-finder/run-sync": {
      "post": {
        "operationId": "run-sync-donzely-otomoto-deal-finder",
        "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": {
          "searches": {
            "title": "Cars to search",
            "type": "array",
            "description": "One car per line, typed naturally: make, model, optional year or year range, fuel and body. Examples: \"bmw x5\", \"toyota corolla 2019-2021\", \"skoda octavia kombi diesel\", \"mercedes klasa c 2018\". You can also paste an Otomoto search URL.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Otomoto search URLs",
            "type": "array",
            "description": "Otomoto search result pages with your own filters, e.g. https://www.otomoto.pl/osobowe/volkswagen/golf?search[filter_float_year:from]=2018",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Minimum production year (overrides years in the search text)."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Maximum production year."
          },
          "maxPricePln": {
            "title": "Max price (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings up to this price."
          },
          "maxMileageKm": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings up to this mileage."
          },
          "fuel": {
            "title": "Fuel",
            "enum": [
              "petrol",
              "diesel",
              "petrol-lpg",
              "hybrid",
              "plugin-hybrid",
              "electric"
            ],
            "type": "string",
            "description": "Fuel type (overrides fuel words in the search text)."
          },
          "region": {
            "title": "Region (voivodeship)",
            "enum": [
              "dolnoslaskie",
              "kujawsko-pomorskie",
              "lubelskie",
              "lubuskie",
              "lodzkie",
              "malopolskie",
              "mazowieckie",
              "opolskie",
              "podkarpackie",
              "podlaskie",
              "pomorskie",
              "slaskie",
              "swietokrzyskie",
              "warminsko-mazurskie",
              "wielkopolskie",
              "zachodniopomorskie"
            ],
            "type": "string",
            "description": "Only listings from this voivodeship."
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Private sellers, dealers or both.",
            "default": "all"
          },
          "onlyDeals": {
            "title": "Only deals (GOOD or GREAT)",
            "type": "boolean",
            "description": "Output only listings priced at least 7% below their market value.",
            "default": false
          },
          "includeUnrated": {
            "title": "Include listings without a rating",
            "type": "boolean",
            "description": "Rare cars may have too few comparable listings to rate. Turn off to drop them.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new listings and price drops since last run",
            "type": "boolean",
            "description": "For scheduled runs: output only listings not seen in previous runs with the same searches, plus listings whose price dropped.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many rated listings (you pay per rated listing).",
            "default": 50
          },
          "maxPagesPerSearch": {
            "title": "Max result pages per search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Otomoto pages (32 listings each, newest first) scanned per search.",
            "default": 5
          },
          "minComparables": {
            "title": "Min comparable listings",
            "minimum": 5,
            "maximum": 50,
            "type": "integer",
            "description": "Minimum number of comparable cars needed to rate a listing.",
            "default": 8
          },
          "comparablePages": {
            "title": "Comparable pages per car type",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Otomoto pages (32 listings each) used to build each market comparison.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional Apify Proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}