{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper: Cars, Rentals & Deals API",
    "description": "Scrape Facebook Marketplace vehicles (VIN, mileage, make/model), apartment rentals (beds, baths, sqft, walk score), seller profiles, and local deals across multiple cities or ZIP codes. Bypasses 1K limit with 50+ fields, status checks (SOLD/PENDING), and HD photo carousels. No login needed.",
    "version": "1.0",
    "x-build-id": "XcAE2vf4NKpPdkSEf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unitbytes~Facebook-Marketplace-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unitbytes-Facebook-Marketplace-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-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-unitbytes-Facebook-Marketplace-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-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unitbytes-Facebook-Marketplace-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": {
          "start_urls": {
            "title": "Start URLs, Share Links, or Item IDs",
            "type": "array",
            "description": "List of Facebook Marketplace Search URLs, Category/Category Menu URLs, Item URLs (/marketplace/item/<id>/), Mobile Share Links (/share/...), or raw numeric Item IDs. Overrides search query if provided.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "search_query": {
            "title": "Search Query (Single or Comma-Separated)",
            "type": "string",
            "description": "What to search for (e.g. 'iphone', 'toyota camry', 'apartments'). Supports comma-separated batch queries (e.g. 'honda civic, toyota corolla, mazda 3'). Leave empty when browsing a Category preset."
          },
          "city_slug": {
            "title": "City Slug or US ZIP Code (Single or Comma-Separated)",
            "type": "string",
            "description": "Target marketplace city slug (e.g. 'sanfrancisco', 'newyork', 'chicago'), 5-digit US ZIP code (e.g. '90210'), or comma-separated multi-city list (e.g. 'austin, dallas, houston')."
          },
          "category": {
            "title": "Marketplace Category Preset",
            "enum": [
              "all",
              "vehicles",
              "propertyrentals",
              "propertyforsale",
              "electronics",
              "furniture",
              "apparel",
              "classifieds",
              "entertainment",
              "family",
              "free",
              "garden",
              "hobbies",
              "instruments",
              "office-supplies",
              "pet-supplies",
              "sporting",
              "toys"
            ],
            "type": "string",
            "description": "Filter by official Facebook Marketplace category, or browse an entire category feed without a keyword.",
            "default": "all"
          },
          "min_price": {
            "title": "Minimum Price ($)",
            "type": "integer",
            "description": "Minimum listing price in local currency.",
            "default": 0
          },
          "max_price": {
            "title": "Maximum Price ($)",
            "type": "integer",
            "description": "Maximum listing price in local currency.",
            "default": 50000
          },
          "max_results": {
            "title": "Max Results",
            "type": "integer",
            "description": "Maximum number of listings to scrape.",
            "default": 20
          },
          "scrape_details": {
            "title": "Scrape Full Details (Deep Inspection)",
            "type": "boolean",
            "description": "Fetch full listing detail pages for complete descriptions, 10-30+ HD photo carousels, VINs, walk scores, and seller ratings. Disable for ultra-fast, low-cost discovery mode (still extracts price, status, year/mileage, beds/baths/sqft, seller ID, and primary photo).",
            "default": true
          },
          "include_all_photos": {
            "title": "HD Photo Carousel & Media",
            "type": "boolean",
            "description": "When Deep Inspection is enabled, scrape the full high-resolution photo carousel (10-30+ HD photos) and videos. Disable to fetch only the primary listing photo for faster runs.",
            "default": true
          },
          "sort_by": {
            "title": "Sort By",
            "enum": [
              "best_match",
              "price_ascend",
              "distance_ascend",
              "creation_time_descend"
            ],
            "type": "string",
            "description": "How to sort the marketplace results.",
            "default": "best_match"
          },
          "days_since_listed": {
            "title": "Days Since Listed",
            "type": "integer",
            "description": "Only scrape listings posted within this many days (1 = last 24h, 7 = last week, 30 = last month).",
            "default": 7
          },
          "item_condition": {
            "title": "Item Condition",
            "enum": [
              "all",
              "new",
              "used",
              "used_like_new",
              "used_good",
              "used_fair"
            ],
            "type": "string",
            "description": "Filter by item condition upstream on Facebook Marketplace.",
            "default": "all"
          },
          "delivery_method": {
            "title": "Delivery Method",
            "enum": [
              "all",
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Filter by local pickup vs. nationwide shipping.",
            "default": "all"
          },
          "exact_match": {
            "title": "Exact Keyword Match",
            "type": "boolean",
            "description": "When enabled, sets exact=true upstream on Facebook Marketplace to exclude broad fuzzy keyword expansions.",
            "default": false
          },
          "radius": {
            "title": "Search Radius (km)",
            "type": "integer",
            "description": "Search radius in kilometers (default 500 for broad regional coverage; reduce to 20-50 km for tight city-level searches). Max 500.",
            "default": 500
          },
          "min_year": {
            "title": "Min Vehicle Year",
            "type": "integer",
            "description": "Minimum vehicle model year (e.g. 2015)."
          },
          "max_year": {
            "title": "Max Vehicle Year",
            "type": "integer",
            "description": "Maximum vehicle model year (e.g. 2024)."
          },
          "min_mileage": {
            "title": "Min Mileage",
            "type": "integer",
            "description": "Minimum vehicle odometer reading (miles/km)."
          },
          "max_mileage": {
            "title": "Max Mileage",
            "type": "integer",
            "description": "Maximum vehicle odometer reading (e.g. 100000)."
          },
          "make": {
            "title": "Vehicle Make",
            "type": "string",
            "description": "Vehicle manufacturer slug or ID (e.g. 'toyota', 'honda', 'ford')."
          },
          "model": {
            "title": "Vehicle Model",
            "type": "string",
            "description": "Vehicle model slug or ID (e.g. 'camry', 'civic', 'f-150')."
          },
          "transmission": {
            "title": "Transmission Type",
            "enum": [
              "all",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Filter vehicles by transmission type.",
            "default": "all"
          },
          "body_style": {
            "title": "Vehicle Body Style",
            "type": "string",
            "description": "Filter by body style (e.g. 'suv', 'sedan', 'truck', 'coupe', 'hatchback', 'van', 'convertible', 'wagon')."
          },
          "min_bedrooms": {
            "title": "Min Bedrooms",
            "type": "integer",
            "description": "Minimum number of bedrooms (e.g. 1, 2, 3)."
          },
          "max_bedrooms": {
            "title": "Max Bedrooms",
            "type": "integer",
            "description": "Maximum number of bedrooms."
          },
          "min_bathrooms": {
            "title": "Min Bathrooms",
            "type": "integer",
            "description": "Minimum number of bathrooms (e.g. 1, 2)."
          },
          "min_sqft": {
            "title": "Min Square Feet (Area)",
            "type": "integer",
            "description": "Minimum property square footage / area (e.g. 750)."
          },
          "max_sqft": {
            "title": "Max Square Feet (Area)",
            "type": "integer",
            "description": "Maximum property square footage / area."
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of listings to scrape in parallel (higher = faster, but more proxy usage). Recommended: 3-5 for residential proxies.",
            "default": 5
          },
          "proxy_configuration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your scraper.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "category_id": {
            "title": "Custom Category ID (Optional)",
            "type": "string",
            "description": "Specific numeric Facebook Marketplace Category ID to filter by.",
            "default": ""
          },
          "fast_mode": {
            "title": "Fast Mode (Discovery Only)",
            "type": "boolean",
            "description": "⚡ Ultra-Fast Discovery (Sub-2s Speed): Skips individual item detail requests, extracting search card data (including year/mileage and beds/baths/sqft) at maximum speed and lowest cost.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}