{
  "openapi": "3.0.1",
  "info": {
    "title": "瓜子二手车 Guazi Used Car",
    "description": "Scrape used car listings from en.guazi.com by keyword, brand/model, price, mileage, year, fuel and more. Buy-it-now, auctions, full specs, photos, inspection reports and VIN — per-event pricing.",
    "version": "0.2",
    "x-build-id": "W6AI8eZbuLdKaog8t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/songd~guazi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-songd-guazi-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/songd~guazi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-songd-guazi-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/songd~guazi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-songd-guazi-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more Guazi used-cars listing URLs to scrape, e.g. https://en.guazi.com/used-cars/?tradeType=buyItNow&keyword=BMW&price=5000,20000&carYear=2018,2022&sort=price+asc. All URL filter parameters are supported (keyword, brandId, seriesId, price, roadHaul, carYear, mfgDate, licenseYear, fuelType, autoType, gearbox, drivetrain, carColor, seats, batteryHealth, batteryType, batteryCapacity, evRange, vehicleSourceClassificationCustomers, keyword, sort, page). When provided, these URLs take priority and all other search fields below are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyword": {
            "title": "Keyword / search term",
            "type": "string",
            "description": "Free-text search term, e.g. 'BMW X5', 'Toyota RAV4'. Matched against title, brand, model and specs. Ignored when startUrls is set.",
            "default": ""
          },
          "brand": {
            "title": "Car brand (make)",
            "type": "string",
            "description": "Brand name in English as shown on en.guazi.com (e.g. 'BMW', 'Toyota', 'Mercedes-Benz'). Resolved to a brandId via the Guazi brand API. Case-insensitive.",
            "default": ""
          },
          "model": {
            "title": "Model (series)",
            "type": "string",
            "description": "Model/series name (e.g. 'X5' for BMW). Requires 'brand'. Resolved to a seriesId via the Guazi brand API.",
            "default": ""
          },
          "tradeType": {
            "title": "Trade type",
            "enum": [
              "all",
              "buyItNow",
              "sealedBid",
              "liveAuction",
              "newCars",
              "fleetCars"
            ],
            "type": "string",
            "description": "Which Guazi listing category to search.",
            "default": "buyItNow"
          },
          "priceMin": {
            "title": "Price from (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum FOB price in USD (buy-it-now vehicles only).",
            "default": 0
          },
          "priceMax": {
            "title": "Price to (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum FOB price in USD. 0 = no limit.",
            "default": 0
          },
          "mileageMinKm": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum mileage in kilometers.",
            "default": 0
          },
          "mileageMaxKm": {
            "title": "Mileage to (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum mileage in kilometers. 0 = no limit.",
            "default": 0
          },
          "yearFrom": {
            "title": "Model year from",
            "type": "integer",
            "description": "Earliest model year (carYear).",
            "default": 0
          },
          "yearTo": {
            "title": "Model year to",
            "type": "integer",
            "description": "Latest model year (carYear). 0 = no limit.",
            "default": 0
          },
          "firstRegYearFrom": {
            "title": "1st registration year from",
            "type": "integer",
            "description": "Earliest first-registration year (licenseYear).",
            "default": 0
          },
          "firstRegYearTo": {
            "title": "1st registration year to",
            "type": "integer",
            "description": "Latest first-registration year (licenseYear). 0 = no limit.",
            "default": 0
          },
          "mfgYearFrom": {
            "title": "Manufacture year from",
            "type": "integer",
            "description": "Earliest manufacture year (mfgDate).",
            "default": 0
          },
          "mfgYearTo": {
            "title": "Manufacture year to",
            "type": "integer",
            "description": "Latest manufacture year (mfgDate). 0 = no limit.",
            "default": 0
          },
          "fuelType": {
            "title": "Fuel type",
            "enum": [
              "gasoline",
              "electric",
              "rangeExtended",
              "plugInHybrid",
              "hybrid",
              "diesel",
              "any"
            ],
            "type": "string",
            "description": "Fuel/energy type filter (Guazi fuelTypes codes 1-6, verified).",
            "default": "any"
          },
          "bodyType": {
            "title": "Body type",
            "enum": [
              "sedan",
              "suv",
              "miniVan",
              "hatchback",
              "wagon",
              "pickUp",
              "van",
              "truck",
              "any"
            ],
            "type": "string",
            "description": "Body type filter (Guazi autoTypes codes from the queryAutoType API, verified).",
            "default": "any"
          },
          "vehicleSource": {
            "title": "Vehicle source",
            "enum": [
              "guaziOwned",
              "certifiedDealer",
              "individualSeller",
              "any"
            ],
            "type": "string",
            "description": "Seller type filter (Guazi vehicleSourceClassificationCustomers codes, verified).",
            "default": "any"
          },
          "conditionGrade": {
            "title": "Condition grade",
            "enum": [
              "S",
              "A",
              "B",
              "C",
              "D",
              ""
            ],
            "type": "string",
            "description": "Guazi inspection condition grade (detectionLevels, verified).",
            "default": ""
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "manual",
              "automatic",
              "any"
            ],
            "type": "string",
            "description": "Transmission filter (Guazi gearboxes codes 1 = MT, 2 = AT, verified).",
            "default": "any"
          },
          "engineMin": {
            "title": "Engine displacement from (L)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum engine displacement in liters (airDisplacementMin).",
            "default": 0
          },
          "engineMax": {
            "title": "Engine displacement to (L)",
            "minimum": 0,
            "type": "number",
            "description": "Maximum engine displacement in liters (airDisplacementMax). 0 = no limit.",
            "default": 0
          },
          "horsepowerMin": {
            "title": "Horsepower from (ps)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum horsepower (horsepowerMin).",
            "default": 0
          },
          "horsepowerMax": {
            "title": "Horsepower to (ps)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum horsepower (horsepowerMax). 0 = no limit.",
            "default": 0
          },
          "batteryHealthMin": {
            "title": "Battery health (SOH) from %",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum battery state of health in percent (batteryHealthStart), for EVs.",
            "default": 0
          },
          "batteryHealthMax": {
            "title": "Battery health (SOH) to %",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum battery state of health in percent (batteryHealthEnd). 0 = no limit.",
            "default": 0
          },
          "seats": {
            "title": "Seats",
            "type": "array",
            "description": "Seat-count filter as Guazi codes, taken directly from a Guazi used-cars URL (e.g. from '&seats=2,5').",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "bestMatch",
              "priceAsc",
              "priceDesc",
              "newlyListed",
              "regDateDesc",
              "mfgDateDesc",
              "mileageAsc",
              "mileageDesc"
            ],
            "type": "string",
            "description": "Sort order of the search results.",
            "default": "bestMatch"
          },
          "country": {
            "title": "Country filter code",
            "type": "string",
            "description": "Optional Guazi 'country' filter code(s) as taken from a Guazi used-cars URL (e.g. 'country=CN'). Leave empty for all.",
            "default": ""
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many result pages (20 items each) to scrape per search (or per start URL). 0 = unlimited: all available pages are scraped (derived from the API's totalCount). The run stops earlier if there are no more results.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after pushing this many listings in total (0 = unlimited; maxPages still applies).",
            "default": 0
          },
          "maxDetails": {
            "title": "Enriched data (max listings)",
            "minimum": 0,
            "type": "integer",
            "description": "Enrich this many listings with full product-page data: complete spec sheet, full photo gallery (exterior/interior/detail), per-port FOB prices, Guazi inspection report (grade, no-accident/no-water/no-fire, per-category checks), feature highlights, VIN (masked), location and trim name. 0 = unlimited: every scraped listing is enriched. Each enriched listing is additionally charged as a 'listing-detail' event because it requires an extra product-page fetch.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}