{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper - Listings, Prices & Price Drops",
    "description": "Scrape Facebook Marketplace listings by keyword + city, category or URL: price, original price, location, photos, category, date listed, sold status. Add-on: description, all photos, condition, coordinates, vehicle and property data. Monitor mode returns only new listings and price drops. No login.",
    "version": "0.1",
    "x-build-id": "OudJHCvDtb8Zdm2p9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-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/topapi~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-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/topapi~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-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": {
          "searchQueries": {
            "title": "🔎 Search keywords",
            "type": "array",
            "description": "What to search for on Marketplace, one per line, e.g. \"bike\", \"iphone 15\", \"honda civic\". Leave empty to browse the categories below instead. Facebook's search is fuzzy: turn on 'Only listings that contain the keyword' for strict results.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "City, \"City, State\", postal code or \"lat,lng\", e.g. \"Austin, TX\", \"London, UK\", \"90210\", \"40.71,-74.00\". Several places: separate with ; (\"Austin, TX; Dallas, TX\"). Empty = New York, NY."
          },
          "radiusKm": {
            "title": "📏 Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search radius around the location in km (Facebook's own filter; for visitors Facebook treats it as a hint, ~65 km). With 'Include listing details' on, listings farther than this are removed. Empty = Facebook's default."
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Marketplace categories. Without keywords, each category is browsed; with keywords, each keyword is searched inside each category. Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "vehicles",
                "propertyrentals",
                "propertyforsale",
                "electronics",
                "home",
                "home-improvements",
                "garden",
                "apparel",
                "family",
                "toys",
                "sports",
                "hobbies",
                "instruments",
                "entertainment",
                "office-supplies",
                "pets",
                "classifieds",
                "free"
              ],
              "enumTitles": [
                "Vehicles",
                "Property Rentals",
                "Home Sales",
                "Electronics",
                "Home Goods",
                "Home Improvement Supplies",
                "Garden & Outdoor",
                "Apparel",
                "Family",
                "Toys & Games",
                "Sporting Goods",
                "Hobbies",
                "Musical Instruments",
                "Entertainment",
                "Office Supplies",
                "Pet Supplies",
                "Classifieds",
                "Free Stuff"
              ]
            }
          },
          "listingUrls": {
            "title": "🔗 Listing or search URLs",
            "type": "array",
            "description": "Marketplace listing URLs or ids (e.g. https://www.facebook.com/marketplace/item/1720207995949881/ or 1720207995949881), or a Marketplace search/category URL copied from your browser, which keeps its own filters (e.g. https://www.facebook.com/marketplace/la/search?query=sofa&maxPrice=300).",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "💲 Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this amount, e.g. 50. Empty = no minimum."
          },
          "maxPrice": {
            "title": "💲 Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this amount, e.g. 500. 0 = free items only. Empty = no maximum."
          },
          "condition": {
            "title": "🏷️ Condition",
            "type": "array",
            "description": "Only listings in these conditions. 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"
              ]
            }
          },
          "sortBy": {
            "title": "🔀 Sort by",
            "enum": [
              "best_match",
              "newest",
              "price_asc",
              "price_desc",
              "distance"
            ],
            "type": "string",
            "description": "\"Newest first\" is the one for monitoring new listings (Facebook widens the area a little for it). \"Distance\" keeps results closest to the location.",
            "default": "best_match"
          },
          "daysSinceListed": {
            "title": "📅 Date listed",
            "enum": [
              "",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted within this window (Facebook's own filter; every row also carries listedAt). Pairs well with a daily schedule.",
            "default": ""
          },
          "mustContainQuery": {
            "title": "🎯 Only listings that contain the keyword",
            "type": "boolean",
            "description": "Keep only listings whose title contains every word of the keyword (case-insensitive). Facebook also returns related items (\"bike\" finds bike racks and helmets); this makes results strict.",
            "default": false
          },
          "excludeKeywords": {
            "title": "🚫 Exclude words",
            "type": "string",
            "description": "Drop listings whose title (and description, when details are on) contains any of these words, comma-separated, e.g. \"parts, broken, wanted, rent\". Leave empty for no exclusions."
          },
          "includeListingDetails": {
            "title": "📋 Include listing details",
            "type": "boolean",
            "description": "Adds the full description, every photo, condition and attributes, exact coordinates and distance, postal code, shipping flag, vehicle data (year, make, model, mileage, transmission, fuel, colours, title status, owners) and property data (type, beds, baths, address, walk/transit scores).",
            "default": false
          },
          "monitorMode": {
            "title": "🔁 Only new listings and price drops",
            "type": "boolean",
            "description": "Remembers every listing per search (in the named store below) and returns only listings not delivered before, plus known listings whose price dropped (changeType PRICE_DROP with previousPrice and priceDelta). Pair with 'Newest first' and an hourly or daily schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "🗄️ Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that keeps what earlier runs delivered, e.g. \"bikes-austin\". Use one name per alert; change it to start over.",
            "default": "facebook-marketplace-monitor"
          },
          "maxResultsPerQuery": {
            "title": "🔢 Max listings per search",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap per keyword x category x location. Facebook pages 24 listings per request and paged 734 for one search in testing. 0 = no cap (up to 5,000).",
            "default": 100
          },
          "maxItems": {
            "title": "🧮 Max listings in total",
            "minimum": 0,
            "type": "integer",
            "description": "Cap for the whole run across all searches and listing URLs. 0 = no total cap.",
            "default": 0
          },
          "compact": {
            "title": "🗜️ Compact output",
            "type": "boolean",
            "description": "Core fields only (title, price, location, photo, date, category, details, monitor fields) - small rows for AI agents, MCP and spreadsheets.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Facebook serves Marketplace to residential IPs and redirects datacenter IPs to its login page, so residential is the default. Any other choice falls back to residential automatically when Facebook walls it.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}