{
  "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.3",
    "x-build-id": "hTp4eSq2l47zHuooP"
  },
  "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 search (up to 100 ads per page). Set 0 for all pages.",
            "default": 0
          },
          "detailEnrichment": {
            "title": "Fetch full ad details",
            "type": "boolean",
            "description": "Fetch every ad's full record: complete equipment list, full description, all gallery photos, seller name/address with city, region and GPS coordinates, VIN (when the seller published it), body type, color, condition and full technical specs. Each ad costs one extra request and is charged as a detail result.",
            "default": false
          },
          "includeSellerPhones": {
            "title": "Include seller phone numbers",
            "type": "boolean",
            "description": "Add the seller's phone numbers (`sellerPhones`) to every ad. Needs the full ad detail, so it switches on 'Fetch full ad details'. Phone numbers of private sellers are personal data — you are responsible for processing them lawfully (e.g. GDPR).",
            "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 contains this text, e.g. \"benzin\", \"dízel\", \"elektromos\", \"hibrid\" (matches every hybrid variant). Leave empty for all."
          },
          "transmissionType": {
            "title": "Transmission",
            "enum": [
              "",
              "automata",
              "manuális"
            ],
            "type": "string",
            "description": "\"automata\" keeps only ads marked automatic in their title; \"manuális\" keeps 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
          },
          "earlyStopPages": {
            "title": "Early-stop after N unchanged pages",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Incremental mode only: stop paginating a listing after this many consecutive pages with no new or changed ads — saves most of the proxy traffic on recurring monitoring runs. Set 0 to always crawl the full listing. Ignored when 'Emit unchanged ads' or 'Emit expired ads' is on (those need a full crawl); expired detection is skipped on early-stopped runs.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Website fallback only: how many listings to crawl in parallel, each in its own stealth browser. The API channel needs no tuning.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max page retries",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times to retry a failed request (API) or a page that didn't clear the Cloudflare challenge (website fallback).",
            "default": 3
          },
          "blockAssets": {
            "title": "Block images, media & trackers",
            "type": "boolean",
            "description": "Website fallback only: skip downloading photos, media, fonts and third-party analytics/ad scripts. Scraped data is unaffected while proxy traffic drops several-fold.",
            "default": true
          },
          "fallbackToBrowser": {
            "title": "Fall back to the website if the API is blocked",
            "type": "boolean",
            "description": "If the app API keeps refusing requests, restart the run on the website with a stealth browser and residential Hungarian proxies. Slower and needs a plan with residential proxy access. Seller phone numbers are not available on the fallback.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The scraper reads hasznaltauto.hu's app API, which works through Apify's datacenter proxies — no residential traffic needed. Residential groups set here are used only by the website fallback.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}