{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace [$0.9💰] Scraper",
    "description": "Scrape facebook.com Marketplace listings by keyword + location with price, condition, radius & detail enrichment. Incremental new-listing monitoring, MCP export, no login required.",
    "version": "0.1",
    "x-build-id": "GomGUmBiHuvqTgwAB"
  },
  "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 search URLs. Build the search you want in your browser (keyword, price, condition, recency), copy the URL from the address bar, and paste it here. Each URL runs as its own search with its filters, and results from multiple URLs are merged and deduplicated. Paste a search-results 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 — if a pasted URL has no readable city, also set the Location below so results are anchored correctly. 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\"). 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
          },
          "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": []
          },
          "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. Off by default, because an empty query otherwise returns thousands of unrelated listings. Only turn this on if you deliberately want to browse everything near a location.",
            "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. Residential US is recommended and used by default.",
            "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."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}