{
  "openapi": "3.0.1",
  "info": {
    "title": "Coches.net Car Listings & Dealer Scraper",
    "description": "Scrape public used-car listings and dealer profiles from coches.net (Spain). Includes the site's own market-average price and price rank. robots.txt compliant. No login, no session cookies.",
    "version": "0.1",
    "x-build-id": "9WbmgEu2BcbNsEj5S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~coches-net-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-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/oswaldocarabano~coches-net-scraper/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-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/oswaldocarabano~coches-net-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-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": {
          "maxResults": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "How many car listings to return. You are charged per listing delivered, never for error rows. Hard cap: 50,000 per run.",
            "default": 100
          },
          "makes": {
            "title": "Makes",
            "type": "array",
            "description": "Limit the run to these car makes, e.g. `bmw`, `seat`, `mercedes-benz`. Leave empty to sweep all 134 makes, smallest first. Names come from the site itself, lowercase and hyphenated.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Limit the run to these Spanish provinces, e.g. `madrid`, `barcelona`, `a_coruna`. Leave empty for all 52.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "environmentalLabels": {
            "title": "DGT environmental badge",
            "type": "array",
            "description": "Only cars carrying the Spanish DGT environmental badge you pick. `0` is the zero-emissions badge (14,546 cars) and `ECO` covers hybrids and gas (29,254). Cannot be combined with a make filter: the site's URL scheme allows only one of the two.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "ECO"
              ],
              "enumTitles": [
                "0 — zero emissions",
                "ECO — hybrid and gas"
              ]
            },
            "default": []
          },
          "maxPriceEur": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Only cars asking up to this much. Uses the price bands coches.net itself publishes, so pick a round figure: 1000, 2000, 3000, 4000, 5000, 6000, 8000, 10000, 15000 or 20000.",
            "default": 0
          },
          "km0Only": {
            "title": "Only Km 0 cars",
            "type": "boolean",
            "description": "Nearly-new cars self-registered by the dealer. A small, high-value segment: 3,098 cars across Spain.",
            "default": false
          },
          "automaticOnly": {
            "title": "Only automatic transmission",
            "type": "boolean",
            "description": "113,912 of the cars on the site are automatic.",
            "default": false
          },
          "financedOnly": {
            "title": "Only cars with advertised financing",
            "type": "boolean",
            "description": "69,747 listings advertise financing terms. Combine with the fill-rate note in the README: financing detail comes back on 66.5% of dealer listings.",
            "default": false
          },
          "privateOnly": {
            "title": "Only private sellers",
            "type": "boolean",
            "description": "Individuals rather than dealers. Note the trade-off, measured: private listings carry the market-average price on only 38.2% (dealers: 86.6%), and never carry financing, warranty or seller ratings. Phone numbers are never returned for private sellers — see the README.",
            "default": false
          },
          "colors": {
            "title": "Colours",
            "type": "array",
            "description": "Only cars in these colours. Cannot be combined with a make or badge filter: the site's URL scheme allows only one of them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "scrapeDealers": {
            "title": "Also scrape dealers",
            "type": "boolean",
            "description": "Collect dealer profiles into a separate `dealers` dataset: name, phone, address, postcode, province and pack. Dealer phone numbers are business contacts and are always included.",
            "default": false
          },
          "maxDealers": {
            "title": "Maximum dealers",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "How many dealer profiles to return when the option above is on.",
            "default": 0
          },
          "maxCacheAgeDays": {
            "title": "Maximum cache age (days)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Accept cached rows up to this many days old. Set to 0 to force a fresh fetch of everything. Every row tells you which it was, through `from_cache` and `data_age_hours`.",
            "default": 7
          },
          "maxPagesPerUrl": {
            "title": "Pages per facet URL (advanced)",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How deep to paginate within one facet. The default of 6 is what coches.net's robots.txt allows, and this actor does not go beyond it.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}