{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace [$0.9💰] Scraper",
    "description": "Scrape facebook.com Marketplace listings by keyword, category or location with price, condition, radius and detail enrichment. Paste any Marketplace search or category URL, or browse a whole category without a keyword. No login required.",
    "version": "0.1",
    "x-build-id": "ouIgbzkRQjftVCxNd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-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": {
          "query": {
            "title": "🔍 Search keyword",
            "type": "string",
            "description": "What to search for (e.g. \"used bicycle\", \"iphone 15\"). Paste a JSON array like [\"bike\",\"scooter\"] to run several searches in one go. Leave empty only if you turn on \"Browse without a query\" below — otherwise an empty query is a no-op."
          },
          "startUrls": {
            "title": "🔗 Start URLs (paste-mode)",
            "type": "array",
            "description": "Paste one or more Facebook Marketplace URLs. Build the view you want in your browser (keyword, category, price, condition, recency), copy the URL from the address bar, and paste it here. Both kinds work: keyword searches (`/marketplace/london/search?query=...`) and category pages with no keyword at all (`/marketplace/category/vehicles`, `/marketplace/london/vehicles`). Each URL runs as its own search with its filters, and results from multiple URLs are merged and deduplicated. Paste a search or category URL, not an individual listing URL. Takes precedence over Search keyword and the filters below. Tip: Facebook hides the city behind an internal location code in the URL, and category URLs carry no city at all — if a pasted URL has no readable city, also set the Location below, otherwise there is nothing to anchor the search to. The legacy field name `searchUrls` is also accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "City or area to search around (e.g. \"Seattle, WA\", \"Austin, Texas\"). Paste a JSON array like [\"Seattle, WA\",\"Portland, OR\",\"Boise, ID\"] to cover several cities in one run — each is searched separately and the results are merged and deduplicated, which is how you cover a region or a whole country. Required unless you provide coordinates below."
          },
          "radiusKm": {
            "title": "📏 Search radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far around the location to search, in kilometers.",
            "default": 65
          },
          "strictRadius": {
            "title": "📍 Strict radius",
            "type": "boolean",
            "description": "Facebook treats the search radius as a hint, not a limit — a 65 km search routinely returns listings 75 km away. Turn this on to drop listings measured outside your radius. It needs listing detail enabled, since only the item page carries the listing's own coordinates, and it returns fewer results by design. Every record reports its measured `distanceKm` either way, so you can filter yourself instead.",
            "default": false
          },
          "latitude": {
            "title": "🌐 Latitude (advanced)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Optional. Exact latitude to search around — overrides Location. Pair with Longitude."
          },
          "longitude": {
            "title": "🌐 Longitude (advanced)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Optional. Exact longitude to search around. Pair with Latitude."
          },
          "minPrice": {
            "title": "💵 Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this amount (in the marketplace's local currency)."
          },
          "maxPrice": {
            "title": "💵 Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this amount."
          },
          "conditions": {
            "title": "🏷️ Condition",
            "type": "array",
            "description": "Only listings in the selected condition(s). 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"
              ]
            },
            "default": []
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Browse one or more Marketplace categories. Each selected category runs as its own search and the results are merged, because Facebook only accepts one category per search. Works with or without a Search keyword: with a keyword it narrows the search to those categories, without one it browses them. Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "vehicles",
                "propertyforsale",
                "propertyrentals",
                "apparel",
                "electronics",
                "home",
                "garden",
                "home-improvements",
                "family",
                "toys",
                "hobbies",
                "sports",
                "instruments",
                "pets",
                "office-supplies",
                "entertainment",
                "classifieds",
                "free"
              ],
              "enumTitles": [
                "Vehicles",
                "Property for sale",
                "Property for rent",
                "Clothing",
                "Electronics",
                "Home goods",
                "Garden and outdoors",
                "Home improvement supplies",
                "Family",
                "Toys and games",
                "Hobbies",
                "Sporting goods",
                "Musical instruments",
                "Pet supplies",
                "Office supplies",
                "Entertainment",
                "Classifieds",
                "Free stuff"
              ]
            },
            "default": []
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "relevance",
              "newest",
              "price_low_to_high",
              "price_high_to_low",
              "distance"
            ],
            "type": "string",
            "description": "Order the results. `newest` is the one to use for monitoring — it asks Facebook for the most recently listed items first. Sorting by newest needs listing detail enabled, because the listing date only exists on the item page. Results are re-sorted on delivery, so the order holds across the whole run and not just within one page.",
            "default": "relevance"
          },
          "availableOnly": {
            "title": "✅ Available listings only",
            "type": "boolean",
            "description": "Exclude listings already marked sold or pending. On by default — turn it off to include sold items, which is useful for price research.",
            "default": true
          },
          "deliveryMethod": {
            "title": "🚚 Delivery method",
            "enum": [
              "any",
              "local_pickup",
              "shipping"
            ],
            "type": "string",
            "description": "Restrict to listings offering local pickup, or to those offering shipping. `any` keeps both.",
            "default": "any"
          },
          "daysSinceListed": {
            "title": "🕒 Listed within (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Only listings posted within the last N days. Leave empty for any time."
          },
          "categoryId": {
            "title": "🗂️ Category ID (advanced)",
            "type": "string",
            "description": "Optional Facebook Marketplace category ID to restrict results."
          },
          "strictQueryMatch": {
            "title": "🎯 Strict query match",
            "type": "boolean",
            "description": "Drop listings whose title is missing your search terms. Facebook ranks loosely (a \"4002019\" search can return \"4002017\"), so this keeps results on-topic. Turn off to get Facebook's full fuzzy ranking, including loosely related items.",
            "default": true
          },
          "browseWithoutQuery": {
            "title": "🌊 Browse without a query",
            "type": "boolean",
            "description": "Allow running with an empty search keyword to pull the whole location feed. Results are gathered from every top-level Marketplace category around your Location, so the run is spread across the full marketplace rather than a single keyword. Off by default, because browsing everything returns thousands of unrelated listings. Set Max results deliberately when you turn this on. To browse one category instead of all of them, paste its URL into Start URLs.",
            "default": false
          },
          "maxResults": {
            "title": "💯 Max results",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of listings to return (0 = as many as available).",
            "default": 50
          },
          "includeDetails": {
            "title": "📋 Include full details",
            "type": "boolean",
            "description": "Fetch each listing's full description, attributes (condition, type…) and post date. Turn off for faster, cheaper, lighter results.",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "✂️ Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate descriptions to N characters (0 = no truncation). Useful for AI/agent workflows.",
            "default": 0
          },
          "compact": {
            "title": "📦 Compact output",
            "type": "boolean",
            "description": "Return only the core fields — ideal for AI agents and MCP workflows.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental mode",
            "type": "boolean",
            "description": "Track listings across runs and only return NEW and UPDATED ones since last run. Perfect for monitoring new listings.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State key (advanced)",
            "type": "string",
            "description": "Optional stable identifier for the tracked search. Leave empty to auto-generate from your search inputs."
          },
          "emitUnchanged": {
            "title": "🔁 Include unchanged",
            "type": "boolean",
            "description": "When incremental mode is on, also return listings that haven't changed since last run.",
            "default": false
          },
          "proxy": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Proxy configuration. Keep the default setting — other proxy options return no data at all. Apify bills the default proxy by data volume, so a small monthly credit is used up quickly.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "telegramToken": {
            "title": "🔑 Telegram bot token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID. Required when a Telegram token is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp access token",
            "type": "string",
            "description": "WhatsApp Cloud API access token. Recipient must have messaged the business number within the last 24h."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp phone number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID. Required when a WhatsApp token is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"14155552671\")."
          },
          "webhookUrl": {
            "title": "🪝 Webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run. Works with n8n / Make / Zapier / custom backends."
          },
          "webhookHeaders": {
            "title": "📋 Webhook headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "notificationLimit": {
            "title": "📊 Max listings per notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum listings included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify only new/updated",
            "type": "boolean",
            "description": "In incremental mode, only notify for NEW and UPDATED listings.",
            "default": false
          },
          "appConnector": {
            "title": "Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations (Notion, Slack, Google Sheets, Linear…) to receive your results."
          },
          "mcpIssueTeam": {
            "title": "Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team the summary issue is created under, if required."
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude Empty Fields",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before output. Reduces payload size.",
            "default": false
          },
          "descriptionFormat": {
            "title": "📝 Description Format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Choose which representation of the listing description to include. `all` keeps every variant; the others keep only the selected one.",
            "default": "all"
          },
          "cityName": {
            "title": "🏙️ City Name",
            "type": "string",
            "description": "City or region to search in (e.g. \"Berlin\", \"Madrid\"). Alias for Location — either field works."
          },
          "lat": {
            "title": "🌐 Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "GPS latitude. Pair with lon. Ignored when cityName is set."
          },
          "lon": {
            "title": "🌐 Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "GPS longitude. Pair with lat."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}