{
  "openapi": "3.0.1",
  "info": {
    "title": "Coches.net Scraper — Used Cars, Vans & Motorbikes in Spain",
    "description": "Coches.net Scraper — scrape car, van, motorhome, classic & motorcycle listings from Spain's largest vehicle marketplace. Get price, make and model plus seller ratings and listing descriptions, with incremental tracking and structured JSON export.",
    "version": "0.1",
    "x-build-id": "OkStdRl6vbDzTjiG5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~coches-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-coches-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/blackfalcondata~coches-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-coches-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/blackfalcondata~coches-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-coches-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": "Which marketplace section to scrape.",
            "default": "cars"
          },
          "query": {
            "title": "🔍 Keyword",
            "type": "string",
            "description": "Optional free-text keyword (e.g. \"4x4\", \"automático\"). Leave empty to browse everything matching the filters below. Power users can paste a JSON array, e.g. [\"gti\",\"sport\"], to run several keywords."
          },
          "make": {
            "title": "🏷️ Make",
            "type": "string",
            "description": "Brand to filter by, e.g. \"BMW\", \"Renault\", \"Mercedes-Benz\". Case-insensitive."
          },
          "model": {
            "title": "🚙 Model",
            "type": "string",
            "description": "Model to filter by, e.g. \"Serie 3\", \"Clio\". Requires Make. Ignored if the model isn't recognized for that make."
          },
          "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": "📅 Min year",
            "minimum": 1900,
            "type": "integer",
            "description": "Earliest registration year to include."
          },
          "yearMax": {
            "title": "📅 Max year",
            "minimum": 1900,
            "type": "integer",
            "description": "Latest registration year to include."
          },
          "kmMax": {
            "title": "🛣️ Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum mileage to include."
          },
          "fuelType": {
            "title": "⛽ Fuel type",
            "enum": [
              "",
              "gasolina",
              "diesel",
              "electrico",
              "hibrido",
              "hibrido-enchufable",
              "glp",
              "cng"
            ],
            "type": "string",
            "description": "Filter by fuel/engine type.",
            "default": ""
          },
          "sellerType": {
            "title": "🤝 Seller type",
            "enum": [
              "all",
              "professional",
              "private"
            ],
            "type": "string",
            "description": "Restrict to dealers or private sellers.",
            "default": "all"
          },
          "maxResults": {
            "title": "💯 Max results",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of listings to return. Set 0 to collect as many as a single run can reliably return — very large pulls are bounded by the run's memory, so raise the run's memory or narrow the search (e.g. by price or make) to go further.",
            "default": 100
          },
          "includeDetails": {
            "title": "📋 Include full details",
            "type": "boolean",
            "description": "Fetch each listing's full detail to add the seller's description, the complete equipment list and deep specs (doors, seats, trim, top speed, 0–100, tank & boot capacity) plus view/favorite counts. This is noticeably slower and uses more compute — leave it off for fast listing-level scrapes and turn it on when you need the rich per-car data.",
            "default": false
          },
          "descriptionMaxLength": {
            "title": "✂️ Max description length",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Truncate each seller description to at most this many characters (0 = keep the full text). Only applies when 📋 Include full details is on.",
            "default": 0
          },
          "descriptionFormat": {
            "title": "📝 Description Format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Pick a single description representation. `all` keeps every variant; `text` / `html` / `markdown` drop the others. Only applies when 📋 Include full details is on.",
            "default": "all"
          },
          "compact": {
            "title": "📦 Compact output",
            "type": "boolean",
            "description": "Return only the core fields — smaller records for AI-agent / MCP workflows.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude empty fields",
            "type": "boolean",
            "description": "Drop null, empty-string and empty-array fields from each record. Smaller payloads for dashboards and AI agents.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental mode",
            "type": "boolean",
            "description": "Compare against the previous run and tag each listing NEW / UPDATED / UNCHANGED / EXPIRED. State Key is optional — it is derived from your filter selection so different searches never share state.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State key",
            "type": "string",
            "description": "Optional. Stable identifier for the tracked search universe. Leave empty to auto-generate from your filters."
          },
          "emitUnchanged": {
            "title": "➡️ Include unchanged listings",
            "type": "boolean",
            "description": "When incremental, also output listings that did not change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "🗑️ Include expired listings",
            "type": "boolean",
            "description": "When incremental, also output listings that disappeared since the last run (marked EXPIRED).",
            "default": false
          },
          "skipReposts": {
            "title": "🚫 Skip reposts",
            "type": "boolean",
            "description": "When incremental, skip listings whose vehicle matches one that expired in a prior run (the same car relisted under a new id).",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram bot token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID (e.g. \"-100123456789\"). Required when telegramToken is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL. Server Settings → Integrations → Webhooks → New Webhook."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL. api.slack.com/messaging/webhooks."
          },
          "notificationLimit": {
            "title": "📊 Max listings per notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of listings included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify only new/updated",
            "type": "boolean",
            "description": "When Incremental Mode is on, only send notifications for NEW and UPDATED listings. Has no effect outside incremental mode.",
            "default": false
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp access token",
            "type": "string",
            "description": "WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h (free service-conversation window)."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp phone number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"34600123456\"). Recipient must have messaged your business number within the last 24h."
          },
          "webhookUrl": {
            "title": "🪝 Generic webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends."
          },
          "webhookHeaders": {
            "title": "📋 Webhook headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "appConnector": {
            "title": "Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. Best-effort across MCP connectors as Apify expands its catalog."
          },
          "mcpIssueTeam": {
            "title": "Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}