{
  "openapi": "3.0.1",
  "info": {
    "title": "FB No-Dealer Vehicles Scraper",
    "description": "Scrape Facebook Marketplace vehicle listings and skip dealer / dealership sellers. Same input and output as the full Marketplace vehicles scraper.",
    "version": "0.1",
    "x-build-id": "WKHUOQdescAnnuduf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fmchisti~fb-no-dealer-vehicles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fmchisti-fb-no-dealer-vehicles-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/fmchisti~fb-no-dealer-vehicles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fmchisti-fb-no-dealer-vehicles-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/fmchisti~fb-no-dealer-vehicles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fmchisti-fb-no-dealer-vehicles-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": [
          "openAiApiKey"
        ],
        "properties": {
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Vehicle keywords such as Toyota Camry or Ford F-150. Each keyword creates a separate Marketplace search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Facebook Marketplace search or item detail URLs. When provided, the Actor crawls only these URLs and ignores locationSlug / keywords / state hubs. URL filters (minPrice, maxPrice, maxMileage, minYear, etc.) are preserved and also enforced as hard post-filters after scrape.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "locationScope": {
            "title": "Location scope",
            "enum": [
              "location",
              "state"
            ],
            "type": "string",
            "description": "Used only when Start URLs are empty. Marketplace is radius-based. Use a city location slug, or expand a US state across curated metro hubs with deduplication.",
            "default": "location"
          },
          "locationSlug": {
            "title": "Location slug",
            "type": "string",
            "description": "Used only when Start URLs are empty. Facebook Marketplace city slug when Location scope is City / location slug. Examples: dallas, austin, new-york, los-angeles."
          },
          "state": {
            "title": "State",
            "enum": [
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "DC"
            ],
            "type": "string",
            "description": "Required when Location scope is Specific state. Results are verified against listing location before being saved."
          },
          "radiusMiles": {
            "title": "Search radius (miles)",
            "enum": [
              "1",
              "2",
              "5",
              "10",
              "20",
              "40",
              "60",
              "80",
              "100",
              "250",
              "500"
            ],
            "type": "string",
            "description": "Marketplace search radius around each location hub (miles).",
            "default": "40"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Hard filter. Listings below this price, or missing price, are excluded. Also applied to Actor-built search URLs and merged with Start URL query params (stricter bound wins)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Hard filter. Listings above this price, or missing price, are excluded. Also applied to Actor-built search URLs and merged with Start URL query params (stricter bound wins)."
          },
          "minMileage": {
            "title": "Minimum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Hard filter. Listings below this mileage, or missing mileage, are excluded. Also applied to Actor-built search URLs and merged with Start URL query params."
          },
          "maxMileage": {
            "title": "Maximum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Hard filter. Listings above this mileage, or missing mileage, are excluded (Facebook URL filters alone are soft). Also applied to Actor-built search URLs and merged with Start URL query params."
          },
          "minYear": {
            "title": "Minimum year",
            "minimum": 1980,
            "maximum": 2100,
            "type": "integer",
            "description": "Hard filter. Listings below this model year, or missing year, are excluded. Also applied to Actor-built search URLs and merged with Start URL query params."
          },
          "maxYear": {
            "title": "Maximum year",
            "minimum": 1980,
            "maximum": 2100,
            "type": "integer",
            "description": "Hard filter. Listings above this model year, or missing year, are excluded. Also applied to Actor-built search URLs and merged with Start URL query params."
          },
          "maxItems": {
            "title": "Max private listings to save",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum private (non-dealer) listings to save to the dataset. Set to 0 for no save limit within the target check budget.",
            "default": 100
          },
          "targetCheckCount": {
            "title": "Target listings to check",
            "minimum": 1,
            "type": "integer",
            "description": "How many unique search-order listings to account for this run (already-known duplicates + new checks). Example: target 50 with 30 already known checks 20 new listings. Default 50.",
            "default": 50
          },
          "maxPagesPerSearch": {
            "title": "Max scrolls per search",
            "minimum": 1,
            "type": "integer",
            "description": "Scroll-depth ceiling per search. Marketplace uses infinite scroll. Raise this when Target listings to check is large so the Actor can load enough cards.",
            "default": 3
          },
          "maxListingAgeDays": {
            "title": "Only listings from the last (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Save only listings with a known creation time within this many days. Listings without a date are excluded."
          },
          "scrapeItemDetails": {
            "title": "Scrape item details",
            "type": "boolean",
            "description": "Open each listing for description, VIN, mileage, specs, seller (when available), and images. Description is scored for dealer keywords before saving full data. Recommended for state filtering.",
            "default": true
          },
          "dealerDefinitivePhrases": {
            "title": "Extra definitive dealer phrases",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Select suggestions or enter custom phrases that immediately mark a listing as a dealer (score 100). Use only unambiguous dealer language.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "commercial seller",
                "licensed auto dealer",
                "dealer inventory",
                "dealership inventory",
                "available at our dealership",
                "visit our car lot",
                "dealer financing",
                "buy here pay here financing",
                "in-house finance available",
                "contact our sales department",
                "dealer documentation fee",
                "plus dealer fees"
              ]
            }
          },
          "dealerStrongPhrases": {
            "title": "Extra strong dealer phrases",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Select suggestions or enter custom strong lot, financing, inventory, or sales-team phrases (+35 score).",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "stock #",
                "stock number",
                "schedule a test drive",
                "schedule a viewing now",
                "get pre-approved",
                "financing available",
                "monthly payments",
                "trade-ins welcome",
                "confirm availability",
                "our inventory",
                "sales advisor",
                "sales consultant",
                "motor company",
                "auto sales",
                "all credit types",
                "bad credit ok",
                "rent to own"
              ]
            }
          },
          "dealerWeakPhrases": {
            "title": "Extra weak dealer phrases",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Select suggestions or enter custom weak marketing phrases (+15 score). Weak phrases combine with other evidence and do not block alone.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "message for details",
                "call for details",
                "available now",
                "come see it today",
                "ready for delivery",
                "delivery available",
                "warranty available",
                "clean carfax",
                "carfax available",
                "fresh inventory",
                "new arrival",
                "just arrived",
                "priced to sell",
                "special price",
                "great deal",
                "low down payment",
                "easy approval",
                "appointment available",
                "test drives available"
              ]
            }
          },
          "openAiApiKey": {
            "title": "OpenAI API key (AI dealer + vehicle-type analysis)",
            "type": "string",
            "description": "Required. The Actor exits immediately without this key. Used for AI vehicle-type filtering and dealer photo checks: listing title/description (dealer signals) plus up to two photos in one combined OpenAI call."
          },
          "openAiVisionModel": {
            "title": "OpenAI analysis model",
            "type": "string",
            "description": "Vision-capable model used for dealer evidence and AI vehicle-type classification from listing photos. Select a suggested model or enter another compatible OpenAI model ID.",
            "default": "gpt-5-nano"
          },
          "allowedAiVehicleTypes": {
            "title": "Allowed AI vehicle types (image filter)",
            "uniqueItems": true,
            "type": "array",
            "description": "AI image multi-select filter (not a Facebook URL filter). After a listing survives text dealer scoring and hard price/mileage/year filters, photos are classified and only selected types are kept. Defaults to four-wheel road vehicles. Motorcycles, scooters, ATVs, bicycles, trailers, and other stay available but unselected. Requires OpenAI API key. Missing images, download failures, AI failures, and unclear/low-confidence types are rejected.",
            "items": {
              "type": "string",
              "enum": [
                "car",
                "suv_crossover",
                "pickup",
                "van_minivan",
                "commercial_truck",
                "rv_camper",
                "bus",
                "motorcycle",
                "scooter_moped",
                "atv_utv",
                "bicycle_ebike",
                "trailer",
                "other"
              ],
              "enumTitles": [
                "Car (sedan/coupe/hatchback/wagon)",
                "SUV / crossover",
                "Pickup truck",
                "Van / minivan",
                "Commercial / heavy truck",
                "RV / camper",
                "Bus",
                "Motorcycle",
                "Scooter / moped",
                "ATV / UTV",
                "Bicycle / e-bike",
                "Trailer",
                "Other"
              ]
            },
            "default": [
              "car",
              "suv_crossover",
              "pickup",
              "van_minivan",
              "commercial_truck",
              "rv_camper",
              "bus"
            ]
          },
          "duplicateCheck": {
            "title": "Skip existing listings",
            "type": "boolean",
            "description": "When enabled, skip detail scraping for already-known marketplace/item listing URLs (Apify Key-Value store first, then optional duplicate-check API). Search/start feed URLs always reopen so new listings can appear. Remembers confirmed dealers and saved private listings only — not wrong vehicle-type rejects. Recommended for scheduled re-runs to save proxy and compute cost. Default stays off so existing schedules are unchanged.",
            "default": false
          },
          "duplicateCheckApiUrl": {
            "title": "Duplicate check API URL",
            "type": "string",
            "description": "Optional. POST endpoint that accepts { \"listingUrls\": string|string[] } and returns { \"existing\": string[], \"missing\": string[] }. Leave empty to use Apify Key-Value store only."
          },
          "duplicateCheckStoreName": {
            "title": "Duplicate check store name",
            "type": "string",
            "description": "Named Apify Key-Value store that remembers listing URLs across runs. Used whenever Skip existing listings is enabled.",
            "default": "vehicle-listing-urls"
          },
          "duplicateCheckLeadingStop": {
            "title": "Stop after consecutive duplicates",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "When Skip existing listings is enabled, stop further scrolls after this many consecutive known-duplicate listing URLs (in a row). New listings already loaded on the current page are still checked. Default 20.",
            "default": 20
          },
          "cookies": {
            "title": "Facebook cookies (optional)",
            "type": "array",
            "description": "Optional session cookies exported from your browser (EditThisCookie / Cookie-Editor JSON). Anonymous mode works for public listings; cookies can deepen pagination and unlock seller identity. Never share cookies publicly."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "US residential proxies are strongly recommended. Facebook blocks many datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}