{
  "openapi": "3.0.1",
  "info": {
    "title": "Carmarket.ch Scraper: Swiss Dealer Cars, Filters and VIN Data",
    "description": "Scrape carmarket.ch, the Swiss dealer car marketplace, with real structured filters: brand, model, price, mileage, year, body type, fuel, EV toggle, and geo-radius search. Each row has VIN, type approval, battery range, photos, and full dealer contact. $1.76 per 1,000 listings.",
    "version": "0.3",
    "x-build-id": "Zn9B4KIIBH7gum6Kk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~carmarket-ch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-carmarket-ch-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/getascraper~carmarket-ch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-carmarket-ch-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/getascraper~carmarket-ch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-carmarket-ch-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": {
          "startUrl": {
            "title": "Carmarket.ch Search URL (advanced, optional)",
            "type": "string",
            "description": "Paste a carmarket.ch search-results URL instead of using the filters above. Kept for parity with the other carmarket.ch Actor on the Store, which supports only this mode; use it if you already have a saved search link, otherwise leave it empty and use the filters above.",
            "default": ""
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Limit results to these makes, matched against carmarket.ch's own brand list (e.g. AUDI, BMW, ASTON MARTIN). Leave empty to search every brand. The other carmarket.ch Actor on the Store only accepts a pasted search URL, so you must already know its URL syntax to filter by brand; here you just pick names.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "Limit results to these model names (e.g. DB11, 320i, Golf). Matched case-insensitively against the listing's model name. Leave empty to include every model of the selected brands.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "priceMinChf": {
            "title": "Minimum Price (CHF)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include listings priced at or above this amount, in Swiss francs. Leave at 0 for no lower bound.",
            "default": 0
          },
          "priceMaxChf": {
            "title": "Maximum Price (CHF)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include listings priced at or below this amount, in Swiss francs. Leave at 0 for no upper bound.",
            "default": 0
          },
          "mileageMaxKm": {
            "title": "Maximum Mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include listings with at most this many kilometres on the odometer. Leave at 0 for no limit.",
            "default": 0
          },
          "yearFrom": {
            "title": "First Registration Year From",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Only include vehicles first registered in this year or later. Leave at 0 for no lower bound.",
            "default": 0
          },
          "yearTo": {
            "title": "First Registration Year To",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "Only include vehicles first registered in this year or earlier. Leave at 0 for no upper bound.",
            "default": 0
          },
          "bodyTypeGroups": {
            "title": "Body Type",
            "type": "array",
            "description": "Limit results to these body style groups, read live from carmarket.ch's own filter list.",
            "items": {
              "type": "string",
              "enum": [
                "Cabriolet",
                "Coupé",
                "Kombi",
                "Limousine",
                "Minivan",
                "Nutzfahrzeuge, Freizeitfahrzeuge",
                "Pick up",
                "SUV"
              ],
              "enumTitles": [
                "Cabriolet / Convertible",
                "Coupé / Sports car",
                "Estate / Wagon (Kombi)",
                "Sedan (Limousine)",
                "Minivan / Van",
                "Commercial & leisure vehicles",
                "Pickup / Truck chassis",
                "SUV / Off-road"
              ]
            },
            "default": []
          },
          "fuelTypeGroups": {
            "title": "Fuel Type",
            "type": "array",
            "description": "Limit results to these powertrain groups, read live from carmarket.ch's own filter list.",
            "items": {
              "type": "string",
              "enum": [
                "Benzin",
                "Diesel",
                "Elektro",
                "Gas",
                "Hybrid",
                "Wasserstoff"
              ],
              "enumTitles": [
                "Petrol",
                "Diesel",
                "Electric",
                "Gas (CNG/LPG)",
                "Hybrid",
                "Hydrogen"
              ]
            },
            "default": []
          },
          "onlyElectric": {
            "title": "Electric Vehicles Only",
            "type": "boolean",
            "description": "Shortcut for Fuel Type = Electric. The incumbent carmarket.ch Actor advertises 'EV Battery' in its own title but has no way to filter for EVs at all; this turns that into a one-click toggle.",
            "default": false
          },
          "transmissionGroup": {
            "title": "Transmission",
            "enum": [
              "",
              "Automat",
              "Manuell"
            ],
            "type": "string",
            "description": "Limit results to this transmission type.",
            "default": ""
          },
          "driveType": {
            "title": "Drivetrain",
            "enum": [
              "",
              "Allradantrieb",
              "Hinterradantrieb",
              "Vorderradantrieb"
            ],
            "type": "string",
            "description": "Limit results to this drivetrain layout.",
            "default": ""
          },
          "vehicleCondition": {
            "title": "Vehicle Condition",
            "type": "array",
            "description": "Limit results to these conditions. The incumbent carmarket.ch Actor's own example input uses an undocumented numeric code (vehicleCondition=2) with no explanation anywhere; here you pick the real label instead.",
            "items": {
              "type": "string",
              "enum": [
                "Neu",
                "Occasion",
                "SALON",
                "Tageszulassung",
                "Vorführmodell"
              ],
              "enumTitles": [
                "New",
                "Used (Occasion)",
                "Show car (SALON)",
                "Day registration",
                "Demo / Showroom model"
              ]
            },
            "default": []
          },
          "vehicleType": {
            "title": "Vehicle Type",
            "enum": [
              "",
              "Personenwagen",
              "Nutzfahrzeug",
              "Wohnmobil"
            ],
            "type": "string",
            "description": "Limit results to this vehicle category.",
            "default": ""
          },
          "otherFilterTags": {
            "title": "Other Filters",
            "type": "array",
            "description": "Extra real carmarket.ch facets the incumbent Actor never exposes, including accident-free history.",
            "items": {
              "type": "string",
              "enum": [
                "Ab MFK",
                "Aktion",
                "Heimlieferung",
                "Quality Checked",
                "Unfallfrei"
              ],
              "enumTitles": [
                "Passed inspection (MFK)",
                "On promotion",
                "Home delivery available",
                "Quality-checked with warranty",
                "Accident-free"
              ]
            },
            "default": []
          },
          "exteriorColors": {
            "title": "Exterior Color",
            "type": "array",
            "description": "Limit results to these exterior colors, read live from carmarket.ch's own color list.",
            "items": {
              "type": "string",
              "enum": [
                "Anthrazit",
                "Beige",
                "Blau",
                "Bordeaux",
                "Braun",
                "Bronze",
                "Gelb",
                "Gold",
                "Grau",
                "Grün",
                "Mehrfarbig",
                "Orange",
                "Rosa",
                "Rot",
                "Schwarz",
                "Silber",
                "Türkis",
                "Violett",
                "Weiss"
              ],
              "enumTitles": [
                "Anthracite",
                "Beige",
                "Blue",
                "Bordeaux",
                "Brown",
                "Bronze",
                "Yellow",
                "Gold",
                "Grey",
                "Green",
                "Multicolor",
                "Orange",
                "Pink",
                "Red",
                "Black",
                "Silver",
                "Turquoise",
                "Violet",
                "White"
              ]
            },
            "default": []
          },
          "dealerCity": {
            "title": "Dealer City",
            "type": "string",
            "description": "Only include listings from dealers in this city (matched against the dealer's registered city, case-insensitive). Leave empty for all of Switzerland. The incumbent returns the dealer's map coordinates as output but gives you no way to filter by location at all.",
            "default": ""
          },
          "nearLatitude": {
            "title": "Near Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Centre latitude for a geo-radius search around a point (e.g. a city centre). Leave empty to skip geo-radius search. Must be used together with Near Longitude and Radius."
          },
          "nearLongitude": {
            "title": "Near Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Centre longitude for a geo-radius search around a point. Leave empty to skip geo-radius search. Must be used together with Near Latitude and Radius."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How far from the Near Latitude/Longitude point to search, in kilometres. Only used when both coordinates above are set.",
            "default": 50
          },
          "language": {
            "title": "Site Language",
            "enum": [
              "de",
              "fr",
              "it"
            ],
            "type": "string",
            "description": "Which carmarket.ch locale to search and read listing text from. The incumbent only supports a language by which URL you happen to paste; here it is one setting.",
            "default": "de"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Carmarket.ch's search and detail data come from two public JSON services that do not require residential IPs. Apify Proxy (datacenter) is enough; leave this on its default.",
            "default": {
              "useApifyProxy": true
            }
          },
          "includeFullDetail": {
            "title": "Include Full Vehicle & Dealer Detail",
            "type": "boolean",
            "description": "Fetch each listing's full detail record: VIN, Swiss type approval number, warranty coverage, quality-check coverage, leasing rate calculation, full dealer contact (address, phone, email, website), the assigned sales advisor's name/phone/email, Google review count, and videos. Off by default because it adds one extra request per listing; the search results already include make, model, price, mileage, year, power, fuel, body type, and photos.",
            "default": false
          },
          "maxItems": {
            "title": "Max Listings",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most listings to return for this run. Keep this low while testing; raise it once you've confirmed your filters return what you expect.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}