{
  "openapi": "3.0.1",
  "info": {
    "title": "SEAT Spain Stock Scraper - New Car Dealer Inventory",
    "description": "Extract SEAT new-car dealer stock in Spain: sale vs list price, specs, color, DGT label and dealer contact from seat.es. Mainland and Canary Islands.",
    "version": "0.1",
    "x-build-id": "PeZX07VBc7PuPCCFm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~seat-spain-stock-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-seat-spain-stock-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/rastriq~seat-spain-stock-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-seat-spain-stock-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/rastriq~seat-spain-stock-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-seat-spain-stock-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": {
          "region": {
            "title": "🇪🇸 Market",
            "enum": [
              "",
              "Spain",
              "CanaryIslands"
            ],
            "type": "string",
            "description": "Market to scrape. <b>All Spain</b> = mainland + Canary Islands. Canary Islands use IGIC instead of IVA, so prices are not directly comparable with mainland.",
            "default": ""
          },
          "model": {
            "title": "🚗 Model",
            "enum": [
              "",
              "BHAB",
              "BHBO",
              "BHAI",
              "BHBK",
              "BHBM"
            ],
            "type": "string",
            "description": "Filter by SEAT model. Leave empty for all models. Only models with units in stock return results.",
            "default": ""
          },
          "fuel_type": {
            "title": "⛽ Fuel type",
            "enum": [
              "",
              "B",
              "D",
              "H"
            ],
            "type": "string",
            "description": "Filter by propulsion type.<br><br>• <b>All</b> — no filter<br>• <b>Gasoline / Diesel</b> — internal combustion<br>• <b>Hybrid</b> — covers MHEV, HEV, and PHEV variants",
            "default": ""
          },
          "body_type": {
            "title": "🚘 Body type",
            "enum": [
              "",
              "B5",
              "B2",
              "B4",
              "B1"
            ],
            "type": "string",
            "description": "Filter by vehicle body style.",
            "default": ""
          },
          "transmission": {
            "title": "⚙️ Transmission",
            "enum": [
              "",
              "H",
              "A"
            ],
            "type": "string",
            "description": "Filter by gearbox type.",
            "default": ""
          },
          "max_results": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of vehicles to return. <b>0</b> = no limit (full stock, ~1,900 units). Example: <code>10</code> for a quick, cheap test.",
            "default": 0
          },
          "price_min": {
            "title": "💶 Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum sale price in EUR. Leave empty for no lower limit."
          },
          "price_max": {
            "title": "💶 Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum sale price in EUR. Leave empty for no upper limit."
          },
          "power_kw_min": {
            "title": "⚡ Min power",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum engine output in kilowatts. Leave empty for no lower limit."
          },
          "power_kw_max": {
            "title": "⚡ Max power",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum engine output in kilowatts. Leave empty for no upper limit."
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "PRICE_SALE",
              "POWER_KW",
              "MODEL"
            ],
            "type": "string",
            "description": "Field used to order results from the API.",
            "default": "PRICE_SALE"
          },
          "sort_direction": {
            "title": "↕️ Sort direction",
            "enum": [
              "ASC",
              "DESC"
            ],
            "type": "string",
            "description": "Sort order for the selected field.",
            "default": "ASC"
          },
          "page_size": {
            "title": "📄 Page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Vehicles per API request (1-100). 50 is a good default.",
            "default": 50
          },
          "image_width": {
            "title": "🖼️ Image width",
            "minimum": 400,
            "maximum": 2048,
            "type": "integer",
            "description": "Width in pixels of the vehicle render image from the SEAT CDN.<br><br>• <b>800 px</b> — default, good for web use<br>• <b>400 px</b> — smaller payload, faster runs<br>• <b>2048 px</b> — full resolution",
            "default": 800
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}