{
  "openapi": "3.0.1",
  "info": {
    "title": "Coches.net Used Car Scraper",
    "description": "Scrape used-car listings from coches.net, Spain's largest used-car marketplace. Search by make, model, price, year, mileage, fuel type, transmission, body type and province, or fetch specific listings by URL.",
    "version": "1.0",
    "x-build-id": "4bi75XArwGKjnkzed"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~coches-net-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-coches-net-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/crawlerbros~coches-net-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-coches-net-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/crawlerbros~coches-net-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-coches-net-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byUrls"
            ],
            "type": "string",
            "description": "What to fetch. `search` runs a filtered search. `byUrls` fetches specific listing URLs directly.",
            "default": "search"
          },
          "searchText": {
            "title": "Keyword search (mode=search)",
            "type": "string",
            "description": "Free-text keyword search across listing titles (e.g. `audi a4 quattro`)."
          },
          "makeIds": {
            "title": "Make (mode=search)",
            "type": "array",
            "description": "One or more car makes/brands to filter by. Leave empty for all makes.",
            "items": {
              "type": "string",
              "enum": [
                "1330",
                "1408",
                "158",
                "1",
                "1377",
                "238",
                "1326",
                "2",
                "3",
                "4",
                "111",
                "1321",
                "1441",
                "6",
                "241",
                "1437",
                "7",
                "1345",
                "1352",
                "8",
                "1415",
                "1444",
                "9",
                "10",
                "11",
                "1327",
                "1400",
                "1011",
                "12",
                "13",
                "145",
                "1447",
                "1351",
                "173",
                "1431",
                "1401",
                "1358",
                "210",
                "1410",
                "146",
                "14",
                "1383",
                "15",
                "1430",
                "16",
                "1384",
                "1451",
                "69",
                "1423",
                "234",
                "18",
                "1438",
                "1409",
                "1025",
                "185",
                "19",
                "126",
                "103",
                "1434",
                "20",
                "21",
                "1427",
                "22",
                "1349",
                "153",
                "243",
                "23",
                "24",
                "128",
                "1432",
                "1450",
                "25",
                "163",
                "1439",
                "147",
                "1404",
                "1428",
                "246",
                "26",
                "1403",
                "1323",
                "27",
                "1347",
                "28",
                "29",
                "1433",
                "222",
                "30",
                "1440",
                "149",
                "1419",
                "1417",
                "31",
                "1420",
                "32",
                "33",
                "87",
                "1402",
                "112",
                "34",
                "1348",
                "1372",
                "35",
                "1329",
                "36",
                "37",
                "38",
                "1328",
                "39",
                "1422",
                "1449",
                "40",
                "1425",
                "41",
                "1446",
                "42",
                "43",
                "44",
                "1411",
                "156",
                "45",
                "1354",
                "1445",
                "46",
                "1324",
                "1325",
                "47",
                "48",
                "1426",
                "186",
                "1435",
                "1421",
                "1448",
                "1418"
              ],
              "enumTitles": [
                "Abarth",
                "Aiways",
                "Aixam",
                "Alfa Romeo",
                "Alpine",
                "Aro",
                "Asia",
                "Asia Motors",
                "Aston Martin",
                "Audi",
                "Austin",
                "Auverland",
                "Baic",
                "Bentley",
                "Bertone",
                "Bestune",
                "Bmw",
                "Bugatti",
                "Byd",
                "Cadillac",
                "Cenntro",
                "Changan",
                "Chevrolet",
                "Chrysler",
                "Citroen",
                "Corvette",
                "Cupra",
                "Dacia",
                "Daewoo",
                "Daihatsu",
                "Daimler",
                "Denza",
                "Dfsk",
                "Dodge",
                "Dongfeng",
                "Dr Automobiles",
                "Ds",
                "Ebro",
                "Evo",
                "Ferrari",
                "Fiat",
                "Fisker",
                "Ford",
                "Foton",
                "Galloper",
                "Geely",
                "Gwm",
                "Honda",
                "Hongqi",
                "Hummer",
                "Hyundai",
                "Ich-X",
                "Ineos",
                "Infiniti",
                "Innocenti",
                "Isuzu",
                "Iveco",
                "Iveco-Pegaso",
                "Jaecoo",
                "Jaguar",
                "Jeep",
                "Kgm",
                "Kia",
                "Ktm",
                "Lada",
                "Lamborghini",
                "Lancia",
                "Land-Rover",
                "Ldv",
                "Leapmotor",
                "Lepas",
                "Lexus",
                "Ligier",
                "Livan",
                "Lotus",
                "Lynk & Co",
                "M-Hero",
                "Mahindra",
                "Maserati",
                "Maxus",
                "Maybach",
                "Mazda",
                "Mclaren",
                "Mercedes-Benz",
                "Mg",
                "Micro",
                "Mini",
                "Mitsubishi",
                "Mobilize",
                "Morgan",
                "Mw Motors",
                "Nextem",
                "Nissan",
                "Omoda",
                "Opel",
                "Peugeot",
                "Piaggio",
                "Polestar",
                "Pontiac",
                "Porsche",
                "Qoros",
                "Ram",
                "Renault",
                "Renault V.I.",
                "Rolls-Royce",
                "Rover",
                "Saab",
                "Santana",
                "Seat",
                "Seres",
                "Silence",
                "Skoda",
                "Skywell",
                "Smart",
                "Sportequipe",
                "Ssangyong",
                "Subaru",
                "Suzuki",
                "Swm",
                "Talbot",
                "Tata",
                "Tesla",
                "Tiger",
                "Toyota",
                "Umm",
                "Vaz",
                "Volkswagen",
                "Volvo",
                "Voyah",
                "Wartburg",
                "Xpeng",
                "Yudo",
                "Zeekr",
                "Zhidou"
              ]
            },
            "default": []
          },
          "modelName": {
            "title": "Model name contains (mode=search)",
            "type": "string",
            "description": "Free-text filter on the model name (e.g. `A4`, `Golf`, `Corolla`). Case-insensitive substring match, applied client-side."
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Minimum listing price in euros."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Maximum listing price in euros."
          },
          "minYear": {
            "title": "Min registration year",
            "minimum": 1950,
            "maximum": 2026,
            "type": "integer",
            "description": "Earliest first-registration year."
          },
          "maxYear": {
            "title": "Max registration year",
            "minimum": 1950,
            "maximum": 2026,
            "type": "integer",
            "description": "Latest first-registration year."
          },
          "minKm": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Minimum odometer reading in kilometers."
          },
          "maxKm": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum odometer reading in kilometers."
          },
          "fuelType": {
            "title": "Fuel type",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8"
            ],
            "type": "string",
            "description": "Filter to a single fuel type.",
            "default": ""
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Filter to a single transmission type.",
            "default": ""
          },
          "minHp": {
            "title": "Min power (hp)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Minimum engine power in horsepower (CV)."
          },
          "maxHp": {
            "title": "Max power (hp)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum engine power in horsepower (CV)."
          },
          "onlyPeninsula": {
            "title": "Mainland Spain only",
            "type": "boolean",
            "description": "Exclude listings located in the Balearic Islands and Canary Islands, keeping only mainland-Spain (peninsula) and Ceuta/Melilla listings.",
            "default": false
          },
          "bodyType": {
            "title": "Body type",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8"
            ],
            "type": "string",
            "description": "Filter to a single body type.",
            "default": ""
          },
          "provinceId": {
            "title": "Province",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "38",
              "39",
              "40",
              "41",
              "42",
              "43",
              "44",
              "45",
              "46",
              "47",
              "48",
              "49",
              "50",
              "51",
              "52"
            ],
            "type": "string",
            "description": "Filter listings to a single Spanish province.",
            "default": ""
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Filter by seller type (applied client-side).",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "price"
            ],
            "type": "string",
            "description": "How to sort search results.",
            "default": "relevance"
          },
          "fetchDetails": {
            "title": "Fetch full details (description, transmission)",
            "type": "boolean",
            "description": "Visit each listing's detail page to fetch the description and transmission type. Slower (one extra request per listing) but more complete. Disable for faster, lighter runs.",
            "default": true
          },
          "listingUrls": {
            "title": "Listing URLs (mode=byUrls)",
            "type": "array",
            "description": "Direct coches.net listing URLs to fetch (e.g. `https://www.coches.net/audi-a4-...-70880377-covo.aspx`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on the number of listings returned.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}