{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Reliable Facebook Marketplace scraper. Works without login — extracts titles, prices, full descriptions, GPS, photos, and category attributes (vehicle make/year/mileage, property bedrooms). Built-in monitoring mode for incremental scraping. Multi-source SSR JSON parser handles FB shape changes.",
    "version": "1.0",
    "x-build-id": "ERIA6ML4wcM4ODRO4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/worshipful_knife~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-worshipful_knife-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/worshipful_knife~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-worshipful_knife-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/worshipful_knife~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-worshipful_knife-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": {
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "One or more Facebook Marketplace search or category URLs to scrape. Example: https://www.facebook.com/marketplace/newyork/search?query=laptop",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Search keyword (e.g. 'iPhone 15', 'gaming laptop'). Used with city/category to build a search URL."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City slug for the search. Use Facebook's URL slug — e.g. newyork, losangeles, sanfrancisco, chicago, london, paris, berlin, sydney, toronto, mexico. Most spellings work as-is."
          },
          "category": {
            "title": "Category",
            "enum": [
              "vehicles",
              "cars",
              "motorcycles",
              "trucks",
              "boats",
              "property-rentals",
              "property-sales",
              "electronics",
              "phones",
              "computers",
              "tablets",
              "tvs",
              "video-games",
              "cameras",
              "furniture",
              "home-garden",
              "appliances",
              "clothing",
              "shoes",
              "accessories",
              "jewelry",
              "sports",
              "musical-instruments",
              "books",
              "toys-games",
              "baby-kids",
              "pet-supplies",
              "office-supplies",
              "free-stuff",
              "garage-sale",
              "miscellaneous"
            ],
            "type": "string",
            "description": "Category slug to filter results."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "best-match",
              "newest",
              "price-low",
              "price-high",
              "distance"
            ],
            "type": "string",
            "description": "Sort order for search results."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "new",
              "used-like-new",
              "used-good",
              "used-fair"
            ],
            "type": "string",
            "description": "Filter by item condition."
          },
          "minPrice": {
            "title": "Min Price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter."
          },
          "maxPrice": {
            "title": "Max Price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter."
          },
          "radiusKm": {
            "title": "Search Radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Search radius from the city center, in kilometers. Facebook caps this around 80 km. Leave empty for FB's default."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listings to scrape. Leave empty for unlimited."
          },
          "strictMatch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "When set with a Search Keyword, only return listings whose title contains every word of the query. Filters out Facebook's broad-match noise (e.g. \"iphone 15\" no longer returns chargers).",
            "default": false
          },
          "untilDate": {
            "title": "Only listings since (ISO date)",
            "type": "string",
            "description": "Skip any listing posted before this date. Useful for incremental \"what's new since yesterday\" runs. Format: \"2026-04-01\" or \"2026-04-01T00:00:00Z\". Only applied when detail-page scraping captures a publish date."
          },
          "monitoringMode": {
            "title": "Monitoring mode (skip already-seen)",
            "type": "boolean",
            "description": "Track listing IDs across runs in a named Key-Value store and skip any IDs already pushed in earlier runs. Combine with a schedule to build an incremental feed. Set monitoringStoreName to use multiple independent watchlists.",
            "default": false
          },
          "monitoringStoreName": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "Name of the Apify Key-Value store used to remember seen IDs. Use different names to keep separate watchlists (e.g. \"fb-iphones-nyc\" vs \"fb-cars-austin\").",
            "default": "fb-marketplace-seen"
          },
          "scrapeDetails": {
            "title": "Scrape Detail Pages",
            "type": "boolean",
            "description": "Visit each listing's detail page for full description, all images, seller info, and condition. Slower but much richer data.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of parallel browser tabs (1-10). Higher = faster but more memory. Keep low (2-3) to avoid detection.",
            "default": 3
          },
          "cookieState": {
            "title": "Browser Cookie State (JSON, optional)",
            "type": "string",
            "description": "Optional Facebook session cookies as JSON. Anonymous scraping works for public card data; supply cookies only to unlock detail-page fields (description, seller name, full image set). Export with EditThisCookie or Playwright's storageState(). See README."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxies strongly recommended. Datacenter IPs are blocked by Facebook."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}