{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Vehicle Scraper: Cars, VIN & Mileage",
    "description": "Scrape used cars, trucks, and motorcycles from Facebook Marketplace by city, ZIP code, make, model, year, and mileage. Extracts 17-digit VIN, odometer mileage, transmission, fuel type, and dealer vs. private seller status. No login required.",
    "version": "1.0",
    "x-build-id": "YAdnXDouoxeKhiGgS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unitbytes~facebook-marketplace-vehicle-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unitbytes-facebook-marketplace-vehicle-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/unitbytes~facebook-marketplace-vehicle-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unitbytes-facebook-marketplace-vehicle-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/unitbytes~facebook-marketplace-vehicle-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unitbytes-facebook-marketplace-vehicle-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",
        "required": [
          "max_results"
        ],
        "properties": {
          "search_query": {
            "title": "Vehicle Search Query (Single or Comma-Separated)",
            "type": "string",
            "description": "Search by vehicle keywords (e.g. 'toyota camry, honda civic, ford f150') or leave empty to browse all vehicles in the selected city."
          },
          "city_slug": {
            "title": "City Slug or US ZIP Code (Single or Comma-Separated)",
            "type": "string",
            "description": "Target city slug (e.g. 'losangeles', 'dallas', 'chicago'), 5-digit US ZIP code ('90210'), or comma-separated multi-city list ('austin, dallas, houston')."
          },
          "category": {
            "title": "Vehicle Category",
            "enum": [
              "vehicles",
              "all"
            ],
            "type": "string",
            "description": "Facebook Marketplace vehicle category feed.",
            "default": "vehicles"
          },
          "min_price": {
            "title": "Minimum Price ($)",
            "type": "integer",
            "description": "Minimum vehicle price.",
            "default": 500
          },
          "max_price": {
            "title": "Maximum Price ($)",
            "type": "integer",
            "description": "Maximum vehicle price.",
            "default": 50000
          },
          "min_year": {
            "title": "Min Model Year",
            "type": "integer",
            "description": "Minimum vehicle model year (e.g. 2014). Applied upstream on Facebook Marketplace."
          },
          "max_year": {
            "title": "Max Model Year",
            "type": "integer",
            "description": "Maximum vehicle model year (e.g. 2024). Applied upstream on Facebook Marketplace."
          },
          "min_mileage": {
            "title": "Min Mileage",
            "type": "integer",
            "description": "Minimum odometer reading."
          },
          "max_mileage": {
            "title": "Max Mileage",
            "type": "integer",
            "description": "Maximum odometer reading (e.g. 120000). Applied upstream on Facebook Marketplace."
          },
          "make": {
            "title": "Vehicle Make (Optional)",
            "type": "string",
            "description": "Filter by manufacturer slug or ID (e.g. 'toyota', 'honda', 'ford')."
          },
          "model": {
            "title": "Vehicle Model (Optional)",
            "type": "string",
            "description": "Filter by model slug or ID (e.g. 'camry', 'civic', 'tacoma')."
          },
          "transmission": {
            "title": "Transmission Type",
            "enum": [
              "all",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Filter vehicles by transmission type.",
            "default": "all"
          },
          "body_style": {
            "title": "Body Style (Optional)",
            "type": "string",
            "description": "Filter by body style (e.g. 'suv', 'sedan', 'truck', 'coupe', 'hatchback', 'van')."
          },
          "max_results": {
            "title": "Max Results",
            "type": "integer",
            "description": "Maximum number of vehicles to scrape.",
            "default": 20
          },
          "scrape_details": {
            "title": "Scrape Full Vehicle Details (VIN, Trim, Seller Type & HD Gallery)",
            "type": "boolean",
            "description": "Enable Deep Inspection to extract 17-digit VIN, trim, fuel type, exterior/interior color, PRIVATE_SELLER vs. DEALERSHIP classification, 5-star seller ratings, and 10-30+ HD photos. Disable for ultra-fast discovery (still extracts year, mileage, price, and status).",
            "default": false
          },
          "days_since_listed": {
            "title": "Days Since Listed",
            "type": "integer",
            "description": "Only include vehicles posted within this many days (1 = last 24h, 7 = past week, 30 = past month).",
            "default": 7
          },
          "sort_by": {
            "title": "Sort By",
            "enum": [
              "best_match",
              "price_ascend",
              "distance_ascend",
              "creation_time_descend"
            ],
            "type": "string",
            "description": "Sort order for vehicle search.",
            "default": "creation_time_descend"
          },
          "radius": {
            "title": "Search Radius (km)",
            "type": "integer",
            "description": "Search radius in kilometers (up to 500km).",
            "default": 500
          },
          "start_urls": {
            "title": "Direct Vehicle Search, Seller Profile, or Item URLs (Optional)",
            "type": "array",
            "description": "Paste Facebook Marketplace vehicle search URLs, dealership/seller profile URLs (/marketplace/profile/<id>/), or vehicle item URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "proxy_configuration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your scraper.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}