{
  "openapi": "3.0.1",
  "info": {
    "title": "Junk Mail Cars Scraper",
    "description": "Scrape vehicle ads from Junk Mail. Use the same listing filters as the site or paste a URL — the URL wins when set.",
    "version": "0.1",
    "x-build-id": "3pvB1CqbhHgvFoe41"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dadhalfdev~junkmail-cars-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dadhalfdev-junkmail-cars-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/dadhalfdev~junkmail-cars-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dadhalfdev-junkmail-cars-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/dadhalfdev~junkmail-cars-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dadhalfdev-junkmail-cars-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": {
          "input_url": {
            "title": "Input URL",
            "type": "string",
            "description": "Paste a Junk Mail search, category, or advert URL. Overrides every filter when set."
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Same as the Junk Mail search box. Optional."
          },
          "category": {
            "title": "Category",
            "enum": [
              "cars",
              "cheap-cars",
              "bikes",
              "classic-cars-bikes-and-custom-built"
            ],
            "type": "string",
            "description": "Cars, cheap cars, bikes, or classic cars and bikes.",
            "default": "cars"
          },
          "brand": {
            "title": "Make",
            "enum": [
              "",
              "abarth",
              "alfa-romeo",
              "aston-martin",
              "audi",
              "baic",
              "bentley",
              "bmw",
              "byd",
              "cadillac",
              "chery",
              "chevrolet",
              "chrysler",
              "citroen",
              "daewoo",
              "daihatsu",
              "datsun",
              "dodge",
              "faw",
              "ferrari",
              "fiat",
              "ford",
              "geely",
              "gwm",
              "haval",
              "honda",
              "hummer",
              "hyundai",
              "infiniti",
              "isuzu",
              "iveco",
              "jac",
              "jaguar",
              "jeep",
              "jetour",
              "kia",
              "lamborghini",
              "land-rover",
              "lexus",
              "mahindra",
              "maserati",
              "mazda",
              "mercedes-benz",
              "mini",
              "mitsubishi",
              "nissan",
              "opel",
              "peugeot",
              "porsche",
              "renault",
              "subaru",
              "suzuki",
              "tata",
              "toyota",
              "vw",
              "volvo"
            ],
            "type": "string",
            "description": "Vehicle make, same list as the cars menu.",
            "default": ""
          },
          "location": {
            "title": "Region",
            "enum": [
              "",
              "gauteng",
              "western-cape",
              "kwazulu-natal",
              "eastern-cape",
              "free-state",
              "limpopo",
              "mpumalanga",
              "north-west",
              "northern-cape"
            ],
            "type": "string",
            "description": "Province, same list as the site.",
            "default": ""
          },
          "fuel": {
            "title": "Fuel",
            "enum": [
              "",
              "petrol",
              "diesel",
              "electric",
              "petrol-electric-hybrid",
              "diesel-electric-hybrid"
            ],
            "type": "string",
            "description": "Petrol, diesel, hybrid, or electric.",
            "default": ""
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "",
              "manual",
              "automatic"
            ],
            "type": "string",
            "description": "Manual or automatic.",
            "default": ""
          },
          "body_type": {
            "title": "Body type",
            "enum": [
              "",
              "body-type-hatchback",
              "body-type-sedan",
              "body-type-crossover-suv",
              "body-type-coupe",
              "body-type-station-wagon",
              "body-type-convertible",
              "body-type-fastback",
              "body-type-minibus",
              "body-type-multi-purpose-vehicle",
              "body-type-double-cab-bakkie",
              "body-type-extended-cab-bakkie",
              "body-type-single-cab-bakkie",
              "body-type-panel-van",
              "body-type-double-cab-panel-van"
            ],
            "type": "string",
            "description": "Hatchback, sedan, bakkie, SUV, and the other body types.",
            "default": ""
          },
          "color": {
            "title": "Colour",
            "enum": [
              "",
              "white",
              "black",
              "silver",
              "grey",
              "blue",
              "red",
              "green",
              "brown",
              "gold",
              "beige",
              "orange",
              "yellow",
              "maroon",
              "bronze",
              "charcoal"
            ],
            "type": "string",
            "description": "Exterior colour.",
            "default": ""
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "",
              "used",
              "new",
              "demo"
            ],
            "type": "string",
            "description": "New, used, or demo.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "",
              "latest",
              "price_low",
              "price_high"
            ],
            "type": "string",
            "description": "Latest ads, or price low to high / high to low.",
            "default": ""
          },
          "price_min": {
            "title": "Lowest price",
            "type": "integer",
            "description": "Lowest price in Rand. Optional."
          },
          "price_max": {
            "title": "Highest price",
            "type": "integer",
            "description": "Highest price in Rand. Optional."
          },
          "year_min": {
            "title": "Lowest year",
            "type": "integer",
            "description": "Lowest year in model year. Optional."
          },
          "year_max": {
            "title": "Highest year",
            "type": "integer",
            "description": "Highest year in model year. Optional."
          },
          "mileage_min": {
            "title": "Lowest mileage",
            "type": "integer",
            "description": "Lowest mileage in kilometres. Optional."
          },
          "mileage_max": {
            "title": "Highest mileage",
            "type": "integer",
            "description": "Highest mileage in kilometres. Optional."
          },
          "max_results": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum rows to return (1–2000).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}