{
  "openapi": "3.0.1",
  "info": {
    "title": "Subito.it Cars Scraper",
    "description": "Fast, low-cost Subito.it car listings: make, model, trim, year, mileage, fuel, gearbox, price, photos. Server-side filters and a smart cache that fetches only new listings.",
    "version": "0.1",
    "x-build-id": "0wHaqGc8NQTw8kyfL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xerneas_ftw~subito-cars/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xerneas_ftw-subito-cars",
        "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/xerneas_ftw~subito-cars/runs": {
      "post": {
        "operationId": "runs-sync-xerneas_ftw-subito-cars",
        "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/xerneas_ftw~subito-cars/run-sync": {
      "post": {
        "operationId": "run-sync-xerneas_ftw-subito-cars",
        "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": {
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "subito.it car search URLs, e.g. https://www.subito.it/annunci-italia/vendita/auto/?q=bmw. Supported URL params: q, ps/pe (price), ys/ye (year).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Total listings to return across all search URLs.",
            "default": 50
          },
          "query": {
            "title": "Free-text query (e.g. make)",
            "type": "string",
            "description": "Overrides any ?q= in the search URLs. Filtered server-side."
          },
          "priceMin": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Filtered server-side."
          },
          "priceMax": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Filtered server-side."
          },
          "yearMin": {
            "title": "Min registration year",
            "minimum": 1900,
            "type": "integer",
            "description": "Filtered server-side."
          },
          "yearMax": {
            "title": "Max registration year",
            "minimum": 1900,
            "type": "integer",
            "description": "Filtered server-side."
          },
          "maxMileageKm": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Subito's API ignores mileage filters, so this is applied after download."
          },
          "maxImages": {
            "title": "Max image URLs per listing",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Image URLs only; images are never downloaded.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy (primary)",
            "type": "object",
            "description": "Default: Apify datacenter proxy (not billed per GB). After 2 consecutive blocks (403/429) the run switches to the fallback proxy.",
            "default": {
              "useApifyProxy": true
            }
          },
          "fallbackProxyConfiguration": {
            "title": "Fallback proxy (on block)",
            "type": "object",
            "description": "Used for the rest of the run once the primary proxy is blocked. Default: Apify RESIDENTIAL, Italy (billed per GB). Disable Apify Proxy here to have no fallback.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "IT"
            }
          },
          "useCache": {
            "title": "Use cache",
            "type": "boolean",
            "description": "Reuse results of earlier runs with the same filters (named key-value store), fetching only listings posted since.",
            "default": true
          },
          "cacheTtlMinutes": {
            "title": "Cache: serve without any request for (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "Within this window a repeat search makes zero requests.",
            "default": 30
          },
          "cacheMaxAgeHours": {
            "title": "Cache: full refetch after (hours)",
            "minimum": 0,
            "type": "integer",
            "description": "Until then, only new listings are fetched and merged on top. Bounds how stale older listings (price changes, removals) can get.",
            "default": 6
          },
          "cacheStoreName": {
            "title": "Cache store name",
            "type": "string",
            "description": "Named key-value store holding the cache.",
            "default": "subito-cars-cache"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}