{
  "openapi": "3.0.1",
  "info": {
    "title": "🛒 Facebook Marketplace Scraper - Prices & Contacts",
    "description": "Scrape Facebook Marketplace without login - title, price, location, photos, seller, condition, status, shipping & vehicle specs, plus the seller's email & phone for leads. Search by keyword, category or URL. Dedup, filters, real-time webhook. From $2.5/1K.",
    "version": "3.3",
    "x-build-id": "FCVbL5SFqWM8YlNet"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apivault_labs~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apivault_labs-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/apivault_labs~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apivault_labs-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/apivault_labs~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apivault_labs-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "urls"
            ],
            "type": "string",
            "description": "How to find listings: 'search' (keyword + location), 'category' (category + location), or 'urls' (direct listing/search URLs). If you fill several inputs, all are used.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search, e.g. [\"iphone 15\", \"mountain bike\"]. Used in 'search' mode.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Facebook Marketplace location slug, e.g. 'nyc', 'la', 'london'. Used by search and category modes. Leave empty for the generic search route."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Marketplace category slugs to browse, e.g. [\"vehicles\", \"electronics\", \"propertyrentals\"]. Used in 'category' mode.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Listing / search URLs",
            "type": "array",
            "description": "Direct Marketplace URLs: item pages (/marketplace/item/<id>), search or category URLs, or bare numeric item IDs. Used in 'urls' mode.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on listings saved across the whole run (you are billed per listing). 1-2000.",
            "default": 100
          },
          "enrichContacts": {
            "title": "Extract seller contacts (email / phone)",
            "type": "boolean",
            "description": "Scan listing title + description for seller email and phone — many sellers paste them to bypass Facebook messaging. Turns this into a lead list.",
            "default": true
          },
          "enrichDetails": {
            "title": "Enrich from each listing's detail page",
            "type": "boolean",
            "description": "For search/category results, also fetch each listing's own page to fill in full description, seller, coordinates and contacts the search card omitted. Doubles requests per listing — opt-in.",
            "default": false
          },
          "expandCoverage": {
            "title": "Expand coverage (more results per term)",
            "type": "boolean",
            "description": "When maxItems is above ~24, re-query each search term across several sort orders (newest, price asc/desc, distance) and dedup, surfacing far more unique listings. Costs more requests. Ignored for category/URL modes.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new listings (incremental)",
            "type": "boolean",
            "description": "Remember listing IDs across runs and emit only items not seen before. Ideal for scheduled monitoring — the first run records a baseline.",
            "default": false
          },
          "notifyWebhookUrl": {
            "title": "Real-time webhook URL",
            "type": "string",
            "description": "Optional. Each new listing is POSTed as JSON to this URL the moment it's found (Zapier/Make/Discord/Slack/n8n). Combine with onlyNew for live alerts."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum price filter (search mode)."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum price filter (search mode)."
          },
          "daysSinceListed": {
            "title": "Days since listed",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Optional freshness filter — only listings posted within the last N days (search mode). 1, 7 or 30 are typical."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend"
            ],
            "type": "string",
            "description": "Optional result ordering (search mode).",
            "default": "best_match"
          },
          "maxRetries": {
            "title": "Max retries per URL",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times to retry a URL that returns a login wall or empty page (each retry rotates the mobile variant and a fresh proxy IP). 0-8.",
            "default": 3
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests. Higher is faster but more likely to trip Facebook rate limits — 3-5 recommended.",
            "default": 3
          },
          "timeout": {
            "title": "Timeout per request (seconds)",
            "minimum": 15,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for each Facebook request. Pages with lots of media can be slower.",
            "default": 45
          },
          "useResidentialProxy": {
            "title": "Use residential proxy (recommended)",
            "type": "boolean",
            "description": "Strongly recommended — Facebook blocks most datacenter IPs for Marketplace. Disable only when running locally.",
            "default": true
          },
          "proxyCountry": {
            "title": "Proxy country code",
            "type": "string",
            "description": "ISO 2-letter country code for the residential proxy (US, GB, DE...). Match it to your target location. Empty = automatic.",
            "default": "US"
          },
          "debug": {
            "title": "Debug probe",
            "type": "boolean",
            "description": "Diagnostic: when a search/category page yields no listings, emit a probe record with HTML markers instead of staying silent.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}