{
  "openapi": "3.0.1",
  "info": {
    "title": "Coches.net Scraper & Used Car Price Monitor (Spain)",
    "description": "For car dealers, resellers and price trackers: coches.net used-car listings by make, model and province with price in EUR, year, mileage, fuel, power, province, dealer name and photos. Watch mode returns only cars listed since your last check and price drops.",
    "version": "0.1",
    "x-build-id": "Fbj8ajtitrtDHWG6a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~coches-net-listings-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-coches-net-listings-monitor",
        "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/neverempty~coches-net-listings-monitor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-coches-net-listings-monitor",
        "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/neverempty~coches-net-listings-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-coches-net-listings-monitor",
        "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": {
          "makes": {
            "title": "Makes or make/model",
            "type": "array",
            "description": "Which used cars to list, one per line, written as in coches.net addresses: a make (toyota, bmw, seat) or make/model (toyota/corolla, volkswagen/golf, land_rover/range_rover_evoque). If this and the URLs below are both empty, the example toyota/corolla is searched. Each run reads at most 5 list pages in total, so schedule one run per search for watches.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces or regions",
            "type": "array",
            "description": "Optional. Spanish provinces or regions as written in coches.net addresses, one per line (madrid, barcelona, valencia, sta_c_tenerife, catalunya, andalucia). Each make line is searched in each province. Empty searches all of Spain.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "coches.net list URLs",
            "type": "array",
            "description": "Or paste the address of a coches.net used-car list, such as https://www.coches.net/toyota/corolla/segunda-mano/madrid/ or https://www.coches.net/toyota/segunda-mano/particulares/. Addresses with a ? part are refused, because coches.net's robots.txt does not allow its filter and sort parameters.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max cars per search",
            "minimum": 1,
            "maximum": 175,
            "type": "integer",
            "description": "How many cars to return for each search, from 1 to 175. coches.net shows about 35 per page, and this Actor reads at most 5 list pages per run (a check page appears after about 5 pages from one IP address). In watch mode, the most rows one check returns per search.",
            "default": 30
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Return only cars priced at or above this many euros. Applied to the pages read. Empty means no minimum."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Return only cars priced at or below this many euros. Applied to the pages read. Empty means no maximum."
          },
          "minYear": {
            "title": "Min year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Return only cars registered in this year or later (for example 2019). Applied to the pages read. Empty means no limit."
          },
          "maxYear": {
            "title": "Max year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Return only cars registered in this year or earlier. Applied to the pages read. Empty means no limit."
          },
          "maxKm": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Return only cars with at most this many kilometres. Applied to the pages read. Empty means no limit."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Return cars from any seller, only dealers, or only private sellers. Applied to the pages read. Dealer names are returned; private sellers' names and phone numbers are never returned.",
            "default": "any"
          },
          "onlyNew": {
            "title": "Watch mode: only new listings and price drops",
            "type": "boolean",
            "description": "Run the same search on a schedule. The first run returns the cars it reads and remembers them. Every later run returns only listings created since the watch started that you have not received yet, and cars whose price went down. A check that finds nothing is charged as one small search-checked event instead of rows.",
            "default": false
          },
          "includePriceDrops": {
            "title": "Watch mode: return price drops",
            "type": "boolean",
            "description": "In watch mode, also return cars you already received when their price went down, with the previous price and the difference. Price rises are remembered but not returned.",
            "default": true
          },
          "watchPages": {
            "title": "Watch mode: pages to read per check",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many pages (about 35 cars each) a watch reads per search on each check, from 1 to 5 (5 pages per run in total). coches.net does not sort by date, so a new listing can sit on any page; watch a make/model in one province so that these pages cover the whole list (most model and province lists have under 170 cars).",
            "default": 5
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Optional. A name for this watch (letters, digits, dot, dash, underscore). Two schedules with the same search but different names keep separate memories. Empty uses one shared default watch."
          },
          "resetMonitoringState": {
            "title": "Watch mode: forget what was seen",
            "type": "boolean",
            "description": "Start this watch over: the run is treated as the first check again. Off by default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}