{
  "openapi": "3.0.1",
  "info": {
    "title": "Otomoto Scraper",
    "description": "Scrape Otomoto.pl car, motorcycle and van listings: type vehicles (Skoda Octavia) with filters for region, city, year, price and mileage, or paste any search, ad or dealer URL. Add-ons: ad details, dealer phones. Proxies included.",
    "version": "0.5",
    "x-build-id": "IJXw1Cbl8ao0854p6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ribtools~otomoto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ribtools-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/ribtools~otomoto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ribtools-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/ribtools~otomoto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ribtools-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": {
          "vehicles": {
            "title": "Search vehicles",
            "type": "array",
            "description": "Type it the way you would in Otomoto's search box: a make (`skoda`), a model (`Octavia`) or both (`BMW Seria 3`). One per line, each becomes its own search. Spelling is matched against Otomoto's own catalog. For vans only the make is matched. Leave empty if you only paste URLs below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Otomoto URLs",
            "type": "array",
            "description": "Otomoto URLs from your browser: searches for cars (`/osobowe`), motorcycles and quads (`/motocykle-i-quady`) or vans (`/dostawcze`) with any filters, e.g. `https://www.otomoto.pl/osobowe/bmw/seria-3?search[filter_float_price:to]=60000`, single ads (`/osobowe/oferta/...-ID6I0kfx.html`, `/oferta/...`, OLX.pl `...-OLX_ID....html`) and dealer pages (`https://bmw-dobrzanski.otomoto.pl`).",
            "items": {
              "type": "string"
            }
          },
          "maxRequests": {
            "title": "Max results per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of vehicles for each vehicle and each URL above. Each result is a charged event. Default 10.",
            "default": 10
          },
          "vehicleType": {
            "title": "Vehicle type",
            "enum": [
              "car",
              "bike",
              "van"
            ],
            "type": "string",
            "description": "Cars, motorcycles and quads, or vans. Applies to the vehicles typed above.",
            "default": "car"
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "used",
              "new"
            ],
            "type": "string",
            "description": "Used, new, or both.",
            "default": "all"
          },
          "region": {
            "title": "Voivodeship",
            "enum": [
              "dolnoslaskie",
              "kujawsko-pomorskie",
              "lubelskie",
              "lubuskie",
              "lodzkie",
              "malopolskie",
              "mazowieckie",
              "opolskie",
              "podkarpackie",
              "podlaskie",
              "pomorskie",
              "slaskie",
              "swietokrzyskie",
              "warminsko-mazurskie",
              "wielkopolskie",
              "zachodniopomorskie"
            ],
            "type": "string",
            "description": "Polish voivodeship. Leave empty to search the whole country."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "A city, for example `Kraków`. Searches the city and 50 km around it, Otomoto's default radius; the name is checked against Otomoto's own location list, and an unknown name, or one shared by several places when no voivodeship is picked, is skipped and named in the status message. If you also pick a voivodeship, the city must be in it."
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Oldest production year to include."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Newest production year to include. Leave empty for no upper limit."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Dealers (firms), private sellers, or both.",
            "default": "all"
          },
          "priceFrom": {
            "title": "Price from (zł)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest asking price to include, in złoty."
          },
          "priceTo": {
            "title": "Price to (zł)",
            "minimum": 1,
            "type": "integer",
            "description": "Highest asking price to include, in złoty: 1 or more (no vehicle is listed at 0)."
          },
          "kmFrom": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest mileage to include."
          },
          "kmTo": {
            "title": "Mileage to (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Highest mileage to include: 1 km or more. For 0 km vehicles, set Condition to New instead."
          },
          "detailsAddon": {
            "title": "Fetch ad details (add-on)",
            "type": "boolean",
            "description": "Open each ad to add the full description, every photo, publication and update dates, map coordinates and whether the price is negotiable. Charged per vehicle with details.",
            "default": false
          },
          "sellerDataAddon": {
            "title": "Fetch seller data (add-on)",
            "type": "boolean",
            "description": "Add the seller profile: dealer phone numbers, address, postal code, map coordinates, website, number of active ads and member-since year. Phone numbers and names are returned for dealers only; private sellers and OLX.pl cross-listings return the seller type and nothing personal. You are charged only when a phone number is returned.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}