{
  "openapi": "3.0.1",
  "info": {
    "title": "PakWheels Scraper — Pakistan Used Cars, Prices & Dealers",
    "description": "Scrape PakWheels.com used car listings in Pakistan: price in PKR, make, model, version, year, mileage, engine, fuel, city, seller type, inspection score and photos. Optional ad pages add colour, body, registration and features. Dealer directory with address and phone. No login.",
    "version": "0.1",
    "x-build-id": "8BWUJc3U1Wqxa0qyA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~pakwheels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-pakwheels-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/oswaldocarabano~pakwheels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-pakwheels-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/oswaldocarabano~pakwheels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-pakwheels-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": {
          "outputType": {
            "title": "What to scrape",
            "enum": [
              "listings",
              "dealers"
            ],
            "type": "string",
            "description": "Listings is one row per used car ad. Dealers is one row per showroom from the PakWheels dealer directory (use \"City\" to pick one of the 31 city directories, or leave it empty for the national directory of about 2,080 dealers). One row type per run.",
            "default": "listings"
          },
          "searchUrl": {
            "title": "PakWheels search URL (optional)",
            "type": "string",
            "description": "Paste a search from pakwheels.com — apply filters on the site and copy the address bar, e.g. https://www.pakwheels.com/used-cars/search/-/ct_karachi/mk_honda/. When set, the filters below are ignored (except \"Seller type\" if the URL does not already choose one)."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City as in PakWheels URLs, e.g. lahore, karachi, islamabad, rawalpindi, peshawar, multan, faisalabad. Leave empty for all of Pakistan. For outputType = dealers, the dealer-directory city."
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "e.g. toyota, suzuki, honda, kia, hyundai, mg, changan. Leave empty for all makes."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "e.g. corolla, civic, alto, city, sportage. Use the spelling of PakWheels URLs."
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Minimum model year."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Maximum model year."
          },
          "priceFrom": {
            "title": "Price from (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in Pakistani rupees. 1 lac = 100,000; 1 crore = 10,000,000."
          },
          "priceTo": {
            "title": "Price to (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in Pakistani rupees."
          },
          "mileageFrom": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum odometer reading."
          },
          "mileageTo": {
            "title": "Mileage to (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum odometer reading."
          },
          "engineCcFrom": {
            "title": "Engine from (cc)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum engine displacement."
          },
          "engineCcTo": {
            "title": "Engine to (cc)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum engine displacement."
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "any",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Gearbox.",
            "default": "any"
          },
          "engineType": {
            "title": "Engine type",
            "enum": [
              "any",
              "petrol",
              "diesel",
              "hybrid",
              "electric",
              "phev"
            ],
            "type": "string",
            "description": "Fuel / powertrain.",
            "default": "any"
          },
          "bodyType": {
            "title": "Body type",
            "type": "string",
            "description": "e.g. sedan, hatchback, suv, crossover, mini-van, pick-up."
          },
          "assembly": {
            "title": "Assembly",
            "enum": [
              "any",
              "local",
              "imported"
            ],
            "type": "string",
            "description": "Locally assembled or imported.",
            "default": "any"
          },
          "registeredIn": {
            "title": "Registered in",
            "type": "string",
            "description": "Registration city or province, e.g. islamabad, lahore, punjab, sindh."
          },
          "color": {
            "title": "Colour",
            "type": "string",
            "description": "e.g. white, black, silver, grey."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "individual",
              "dealer"
            ],
            "type": "string",
            "description": "Every row is tagged with its seller type either way. With \"Any\", the item limit is shared in proportion to how many ads each type has (87% individuals on PakWheels).",
            "default": "any"
          },
          "onlyInspected": {
            "title": "Only PakWheels-inspected cars",
            "type": "boolean",
            "description": "Only cars with a PakWheels inspection report (about 2,700 ads).",
            "default": false
          },
          "onlyManagedByPakWheels": {
            "title": "Only cars managed by PakWheels",
            "type": "boolean",
            "description": "Only cars whose sale PakWheels manages itself (about 2,200 ads).",
            "default": false
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text search, e.g. \"civic reborn\" or \"automatic\". Same as the PakWheels search box."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest_update",
              "price_asc",
              "price_desc",
              "year_desc",
              "year_asc",
              "mileage_asc",
              "mileage_desc"
            ],
            "type": "string",
            "description": "Each order was verified against the live site by checking the values actually come sorted.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. PakWheels shows about 25 listings per results page. The default of 100 finishes in seconds; see the README for measured throughput on large runs.",
            "default": 100
          },
          "scrapeDetails": {
            "title": "Open each ad (detail page)",
            "type": "boolean",
            "description": "Adds description, colour, body type, registration city, assembly, engine type, location area, the full feature list, the PakWheels inspection report and the seller block (dealer name, address, opening hours, verification badges). One extra request per listing and its own charge event.",
            "default": false
          },
          "includePrivateSellerContact": {
            "title": "Include private sellers' names",
            "type": "boolean",
            "description": "Off by default: for individual (non-dealer) sellers the name is withheld and phone numbers typed into the description are masked. Dealer and showroom names and addresses are always included. Seller phone numbers are never collected — PakWheels only shows them to signed-in users.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests in flight at once. The default of 4 was measured safe (55 of 55 requests succeeded at up to 6.5 requests per second). Lower values are slower without improving reliability.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: PakWheels served every measured request directly. If requests start being refused, the actor switches to a fallback on its own. Set a proxy here only to force one.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}