{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Scrape Facebook Marketplace listings by keyword, city or link: price, photos, description, location, posting time and vehicle specs. Search wide areas, watch for new listings with monitoring mode, and get only listings that match your filters. No login needed.",
    "version": "0.0",
    "x-build-id": "MznIBVnYGeoa0QAna"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/calm_builder~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-calm_builder-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/calm_builder~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-calm_builder-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/calm_builder~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-calm_builder-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",
        "properties": {
          "keywordSearches": {
            "title": "Search by keyword",
            "type": "array",
            "description": "One row per search: what you are looking for and where. Example: `iphone 13` in `Toronto`.\n\n**Location** accepts a city name (`Toronto`, `Austin, Texas`), a postal code, or the city part of a Marketplace link (`sanfrancisco` from facebook.com/marketplace/sanfrancisco).",
            "items": {
              "type": "object",
              "properties": {
                "query": {
                  "title": "Search for",
                  "type": "string",
                  "description": "Keyword or phrase, e.g. `iphone 13`, `sectional sofa`, `2018 honda civic`.",
                  "minLength": 1
                },
                "locationSlug": {
                  "title": "Location",
                  "type": "string",
                  "description": "City name (`Toronto`, `Austin, Texas`), postal code, or Marketplace city slug (`sanfrancisco`). Covers about 65 km around it.",
                  "minLength": 1
                }
              },
              "required": [
                "query",
                "locationSlug"
              ]
            }
          },
          "vehicleSearches": {
            "title": "Search vehicles",
            "type": "array",
            "description": "One row per vehicle search: a make (or All) and where. Vehicle filters (year, mileage, transmission) below apply to these rows.",
            "items": {
              "type": "object",
              "properties": {
                "make": {
                  "title": "Make",
                  "type": "string",
                  "description": "Vehicle make, or All.",
                  "editor": "select",
                  "default": "all",
                  "enum": [
                    "all",
                    "acura",
                    "alfa_romeo",
                    "aston_martin",
                    "audi",
                    "bmw",
                    "bentley",
                    "buick",
                    "coda",
                    "cadillac",
                    "chevrolet",
                    "chrysler",
                    "daewoo",
                    "daihatsu",
                    "dodge",
                    "eagle",
                    "ferrari",
                    "fiat",
                    "fisker",
                    "ford",
                    "freightliner",
                    "gmc",
                    "genesis",
                    "geo",
                    "honda",
                    "hummer",
                    "hyundai",
                    "infiniti",
                    "isuzu",
                    "jaguar",
                    "jeep",
                    "kia",
                    "lamborghini",
                    "land_rover",
                    "lexus",
                    "lincoln",
                    "lotus",
                    "lucid",
                    "mini",
                    "maserati",
                    "maybach",
                    "mazda",
                    "mclaren",
                    "mercedes_benz",
                    "mercury",
                    "mitsubishi",
                    "nissan",
                    "oldsmobile",
                    "panoz",
                    "plymouth",
                    "polestar",
                    "pontiac",
                    "porsche",
                    "ram",
                    "rivian",
                    "rolls_royce",
                    "srt",
                    "saab",
                    "saturn",
                    "scion",
                    "smart",
                    "subaru",
                    "suzuki",
                    "tesla",
                    "toyota",
                    "volkswagen",
                    "volvo"
                  ],
                  "enumTitles": [
                    "All",
                    "Acura",
                    "Alfa Romeo",
                    "Aston Martin",
                    "Audi",
                    "BMW",
                    "Bentley",
                    "Buick",
                    "CODA",
                    "Cadillac",
                    "Chevrolet",
                    "Chrysler",
                    "Daewoo",
                    "Daihatsu",
                    "Dodge",
                    "Eagle",
                    "Ferrari",
                    "Fiat",
                    "Fisker",
                    "Ford",
                    "Freightliner",
                    "GMC",
                    "Genesis",
                    "Geo",
                    "Honda",
                    "Hummer",
                    "Hyundai",
                    "Infiniti",
                    "Isuzu",
                    "Jaguar",
                    "Jeep",
                    "Kia",
                    "Lamborghini",
                    "Land Rover",
                    "Lexus",
                    "Lincoln",
                    "Lotus",
                    "Lucid",
                    "MINI",
                    "Maserati",
                    "Maybach",
                    "Mazda",
                    "Mclaren",
                    "Mercedes-Benz",
                    "Mercury",
                    "Mitsubishi",
                    "Nissan",
                    "Oldsmobile",
                    "Panoz",
                    "Plymouth",
                    "Polestar",
                    "Pontiac",
                    "Porsche",
                    "Ram",
                    "Rivian",
                    "Rolls-Royce",
                    "SRT",
                    "Saab",
                    "Saturn",
                    "Scion",
                    "Smart",
                    "Subaru",
                    "Suzuki",
                    "Tesla",
                    "Toyota",
                    "Volkswagen",
                    "Volvo"
                  ]
                },
                "locationSlug": {
                  "title": "Location",
                  "type": "string",
                  "description": "City name (`Montreal`, `Dallas, Texas`), postal code, or Marketplace city slug (`montreal`). Covers about 65 km around it.",
                  "minLength": 1
                }
              },
              "required": [
                "locationSlug"
              ]
            }
          },
          "searchRadiusKm": {
            "title": "Search radius (km)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How far around each row's location to search. Facebook shows logged-out visitors about 65 km around one point, whatever radius the site offers; a larger value here searches several overlapping areas and removes duplicates. **Maximum listings per search** still applies per row.",
            "default": 65
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency. Leave empty for no maximum."
          },
          "conditions": {
            "title": "Condition",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for any condition.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used – like new",
                "Used – good",
                "Used – fair"
              ]
            }
          },
          "dateListed": {
            "title": "Date listed",
            "enum": [
              "all",
              "last_24_hours",
              "last_7_days",
              "last_30_days"
            ],
            "type": "string",
            "description": "Only listings posted within this time.",
            "default": "all"
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "all",
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Shipping is mostly offered in the US.",
            "default": "all"
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "available",
              "sold"
            ],
            "type": "string",
            "description": "Available listings, or listings already sold.",
            "default": "available"
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend",
              "creation_time_ascend",
              "distance_descend",
              "vehicle_mileage_ascend",
              "vehicle_mileage_descend",
              "vehicle_year_descend",
              "vehicle_year_ascend"
            ],
            "type": "string",
            "description": "Order of results. Mileage and year sorts apply to vehicle rows only.",
            "default": "best_match"
          },
          "exactMatch": {
            "title": "Exact keyword match",
            "type": "boolean",
            "description": "Match the search words more strictly.",
            "default": false
          },
          "vehicleMinYear": {
            "title": "Year from",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Earliest model year. Vehicle rows only."
          },
          "vehicleMaxYear": {
            "title": "Year to",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Latest model year. Vehicle rows only."
          },
          "vehicleMinMileage": {
            "title": "Mileage from",
            "minimum": 0,
            "type": "integer",
            "description": "Odometer, in the units local listings use. Vehicle rows only."
          },
          "vehicleMaxMileage": {
            "title": "Mileage to",
            "minimum": 0,
            "type": "integer",
            "description": "Odometer, in the units local listings use. Vehicle rows only."
          },
          "vehicleTransmission": {
            "title": "Transmission",
            "enum": [
              "all",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Vehicle rows only.",
            "default": "all"
          },
          "startUrls": {
            "title": "Marketplace search links",
            "type": "array",
            "description": "Set up a search on Facebook Marketplace (any category, any filters), copy the link from the address bar and paste it here. Each link is scraped as it is: the filters above do not apply to links.\n\nExample: `https://www.facebook.com/marketplace/toronto/search?query=sofa&maxPrice=300`",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "itemUrls": {
            "title": "Listing links",
            "type": "array",
            "description": "Links to single listings (`facebook.com/marketplace/item/...`). Each one returns the full listing and is billed as a listing detail.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxListings": {
            "title": "Maximum listings per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit for each search row and each search link. Total cost grows with this value times the number of searches.",
            "default": 10
          },
          "fetchDetails": {
            "title": "Fetch detailed information",
            "type": "boolean",
            "description": "Adds the full description, all photos and videos, seller type and dealership contacts, vehicle specs and every other listing field. Each detailed listing is billed as a listing detail.",
            "default": false
          },
          "deduplicateListings": {
            "title": "Remove duplicates across searches",
            "type": "boolean",
            "description": "Save each listing once, even when several searches find it.",
            "default": false
          },
          "monitoringMode": {
            "title": "Only new listings (monitoring)",
            "type": "boolean",
            "description": "For scheduled runs: save only listings posted since the previous run of the same search. Nothing extra is charged; you pay only for the new listings saved.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}