{
  "openapi": "3.0.1",
  "info": {
    "title": "Coches.net Scraper",
    "description": "Scrape Coches.net and Motos.net used car listings in Spain: price, mileage, year, fuel, VIN, equipment, dealer or private seller, phone, location and photos. Filters, search URLs and incremental tracking.",
    "version": "1.0",
    "x-build-id": "ayaPER9Fnhz7VCfEe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~coches-net-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~coches-net-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~coches-net-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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",
        "properties": {
          "vehicleType": {
            "title": "Vehicle type",
            "enum": [
              "cars",
              "vans",
              "motorhomes",
              "classics",
              "microcars",
              "motorcycles",
              "all"
            ],
            "type": "string",
            "description": "Pick the marketplace section to search. Motorcycles come from Motos.net (same company). 'All sections' runs every section one after another.",
            "default": "cars"
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Search the listings by keyword, as in the Coches.net search box (e.g. \"4x4\", \"automático\", \"gti\"). Leave empty to browse everything that matches the filters. To run several keywords as separate searches, enter a JSON array such as [\"gti\", \"cupra\"]."
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Paste search-results URLs from Coches.net or Motos.net (filter the site in your browser, then copy the address). Each URL runs as its own search with the make, model, province, fuel, seller and other filters from the URL. Single listing URLs work too. When URLs are given, the Search and Filters fields above are ignored, except price, year, mileage, power and seller type, which narrow every URL further.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Brand to search, e.g. \"BMW\", \"Seat\", \"Mercedes-Benz\". Not case-sensitive."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model of the make above, e.g. \"Serie 3\", \"Ibiza\", \"Clase C\". Needs a make. On Motos.net the model is matched as a keyword."
          },
          "listingCondition": {
            "title": "Condition",
            "enum": [
              "",
              "km0",
              "new",
              "all"
            ],
            "type": "string",
            "description": "Which offers to include. 'Used (site default)' is what the Coches.net second-hand section shows, which also contains Km 0, demo and ex-company cars.",
            "default": ""
          },
          "priceMin": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price to include."
          },
          "priceMax": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price to include."
          },
          "yearMin": {
            "title": "Year from",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest registration year to include."
          },
          "yearMax": {
            "title": "Year to",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest registration year to include."
          },
          "kmMin": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest mileage to include."
          },
          "kmMax": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest mileage to include."
          },
          "fuelType": {
            "title": "Fuel",
            "enum": [
              "",
              "gasolina",
              "diesel",
              "electrico",
              "hibrido",
              "hibrido-enchufable",
              "glp",
              "cng"
            ],
            "type": "string",
            "description": "Fuel or engine type.",
            "default": ""
          },
          "transmission": {
            "title": "Gearbox",
            "enum": [
              "",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Automatic or manual transmission.",
            "default": ""
          },
          "bodyType": {
            "title": "Body type",
            "type": "array",
            "description": "Body styles to include (cars, vans and microcars only).",
            "items": {
              "type": "string",
              "enum": [
                "sedan",
                "coupe",
                "convertible",
                "estate",
                "minivan",
                "suv",
                "pickup",
                "van"
              ],
              "enumTitles": [
                "Sedan / hatchback (berlina)",
                "Coupé",
                "Convertible (cabrio)",
                "Estate (familiar)",
                "Minivan (monovolumen)",
                "SUV / 4x4",
                "Pick-up",
                "Van (furgoneta)"
              ]
            }
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "professional",
              "private"
            ],
            "type": "string",
            "description": "Dealers, private sellers or both.",
            "default": "all"
          },
          "province": {
            "title": "Province",
            "type": "string",
            "description": "Spanish province(s) to search, separated by commas, e.g. \"Madrid\" or \"Barcelona, Girona\". Leave empty for all of Spain."
          },
          "powerMin": {
            "title": "Min power (hp)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest engine power in horsepower (CV)."
          },
          "powerMax": {
            "title": "Max power (hp)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest engine power in horsepower (CV)."
          },
          "environmentalLabel": {
            "title": "DGT environmental label",
            "type": "array",
            "description": "Spanish DGT emissions labels to include.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "ECO",
                "C",
                "B"
              ],
              "enumTitles": [
                "0 (zero emissions, blue)",
                "ECO",
                "C (green)",
                "B (yellow)"
              ]
            }
          },
          "onlyWithWarranty": {
            "title": "Only with warranty",
            "type": "boolean",
            "description": "Include only listings that come with a warranty.",
            "default": false
          },
          "onlyCertified": {
            "title": "Only certified vehicles",
            "type": "boolean",
            "description": "Include only vehicles certified through a Coches.net certification programme.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "",
              "newest",
              "price_asc",
              "price_desc",
              "km_asc",
              "km_desc",
              "year_desc",
              "year_asc"
            ],
            "type": "string",
            "description": "Order of the results. Use 'Newest first' for monitoring new listings. For search URLs, the URL's own order is kept when this is left on 'Relevance'.",
            "default": ""
          },
          "maxResults": {
            "title": "Max listings",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to save in total across all searches. Set 0 for no limit.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include full details",
            "type": "boolean",
            "description": "Add each listing's seller description, VIN, full equipment list, technical specs (version, trim, doors, seats, top speed, 0-100, consumption, dimensions, tank and trunk size), view and favorite counts, and the dealer's address, coordinates, website and opening hours. Turn off for faster, slimmer records.",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "Max description length",
            "minimum": 0,
            "type": "integer",
            "description": "Cut each seller description to this many characters. 0 keeps the full text.",
            "default": 0
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Return only the core fields (title, make, model, year, km, fuel, price, seller, location, phone, photo, URL). Handy for AI agents and spreadsheets.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Remove fields that are empty (null, empty text or empty list) from each record.",
            "default": false
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Compare with earlier runs of the same search and tag each listing NEW, UPDATED, UNCHANGED, REAPPEARED or EXPIRED. By default only NEW, UPDATED and REAPPEARED listings are saved.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the tracked search, e.g. \"bmw-madrid\". Runs with the same key share history. Leave empty to derive it from the search filters."
          },
          "emitUnchanged": {
            "title": "Also save unchanged listings",
            "type": "boolean",
            "description": "In incremental mode, also save listings that didn't change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "Also save expired listings",
            "type": "boolean",
            "description": "In incremental mode, also save listings that disappeared since the last run (sold or removed), tagged EXPIRED. Only detected when the whole search is read (no result limit hit).",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposts",
            "type": "boolean",
            "description": "In incremental mode, leave out new listings that are the same vehicle as one that expired earlier (relisted under a new id).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in most cases: the actor switches to Apify Proxy by itself if Coches.net refuses requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}