{
  "openapi": "3.0.1",
  "info": {
    "title": "Hasznaltauto.hu Scraper - Hungarian Used Car Marketplace",
    "description": "Extract used-car and vehicle listings from Hasznaltauto.hu — Hungary's largest car marketplace. Prices, year, mileage, fuel, transmission, equipment, photos, seller and dealer info across cars, motorcycles, trucks, trailers, motorhomes, caravans and buses. Includes incremental monitoring.",
    "version": "0.1",
    "x-build-id": "pdaMJhw90TspqHpgN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~hasznaltauto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-hasznaltauto-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/trev0n~hasznaltauto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-hasznaltauto-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/trev0n~hasznaltauto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-hasznaltauto-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": {
          "category": {
            "title": "Vehicle category",
            "enum": [
              "szemelyauto",
              "motor",
              "kishaszonjarmu",
              "haszonjarmu",
              "autobusz",
              "lakokocsi",
              "potkocsi",
              "munkagep"
            ],
            "type": "string",
            "description": "Which vehicle section to browse. Ignored if you provide Start URLs below.",
            "default": "szemelyauto"
          },
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Vehicle brand to browse, e.g. \"BMW\", \"Mercedes-Benz\", \"Suzuki\". Leave empty to browse the whole category."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model within the brand, e.g. \"320\", \"golf\", \"octavia\". Requires a brand. Leave empty for all models."
          },
          "startUrls": {
            "title": "Start URLs (optional)",
            "type": "array",
            "description": "Direct hasznaltauto.hu URLs to scrape — browse listings (e.g. https://www.hasznaltauto.hu/szemelyauto/bmw) or single ad pages. When provided, these override the category/brand/model above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after collecting this many ads across all pages. Set 0 for unlimited.",
            "default": 25
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many result pages per listing (about 25 ads per page). Set 0 for all pages.",
            "default": 0
          },
          "detailEnrichment": {
            "title": "Fetch full ad details",
            "type": "boolean",
            "description": "Visit every ad page to add the complete equipment list, full description, all gallery photos, seller name/address, body type, color, condition and full technical specs. Slower — each ad costs one extra page view.",
            "default": false
          },
          "priceMin": {
            "title": "Minimum price (Ft)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep ads at or above this price in Hungarian forints. 0 = no minimum.",
            "default": 0
          },
          "priceMax": {
            "title": "Maximum price (Ft)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep ads at or below this price in Hungarian forints. 0 = no maximum.",
            "default": 0
          },
          "yearMin": {
            "title": "Minimum year",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep vehicles manufactured in or after this year. 0 = no minimum.",
            "default": 0
          },
          "yearMax": {
            "title": "Maximum year",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep vehicles manufactured in or before this year. 0 = no maximum.",
            "default": 0
          },
          "fuelType": {
            "title": "Fuel type",
            "type": "string",
            "description": "Only keep ads whose fuel matches, e.g. \"benzin\", \"dízel\", \"elektromos\", \"hibrid\". Substring match as shown on the site. Leave empty for all."
          },
          "transmissionType": {
            "title": "Transmission",
            "enum": [
              "",
              "automata",
              "manuális"
            ],
            "type": "string",
            "description": "\"automata\" keeps only automatic vehicles; \"manuális\" keeps only the rest. Leave empty for all."
          },
          "incrementalMode": {
            "title": "Incremental monitoring mode",
            "type": "boolean",
            "description": "Track state across runs and emit only NEW / UPDATED / REAPPEARED ads. The first run builds a baseline; later runs charge only for the diff — ideal for cheap recurring monitoring of a search.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Custom identifier for the monitoring baseline. Leave empty to derive it from the search config automatically."
          },
          "emitUnchanged": {
            "title": "Emit unchanged ads",
            "type": "boolean",
            "description": "Also output ads whose content didn't change since the last run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired ads",
            "type": "boolean",
            "description": "Also output a record for ads that disappeared since the last run (changeType = EXPIRED) — usually means the vehicle was sold.",
            "default": false
          },
          "skipReposts": {
            "title": "Skip reposts",
            "type": "boolean",
            "description": "Drop new ads detected as reposts of a recently expired one (same content, new id).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many listings to process in parallel (each runs its own stealth browser and pays its own Cloudflare clearance). Pagination within a listing stays sequential. Keep modest.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max page retries",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times to retry a page that didn't clear the Cloudflare challenge.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "hasznaltauto.hu blocks datacenter IPs at the Cloudflare layer — RESIDENTIAL proxies are required. Hungarian IPs clear the challenge most reliably.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "HU"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}