{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper + Real Time Notifications",
    "description": "Search and scrape Facebook Marketplace by keyword for any category — electronics, furniture, clothing, and more. Features exact listing dates, real-time Discord alerts, age filtering, and deduplication. Built with advanced techniques for the lowest cost per run. Export to JSON, CSV, or Excel.",
    "version": "0.0",
    "x-build-id": "Elmwfj4QxNzAFO7h6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/raidr-api~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-raidr-api-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/raidr-api~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-raidr-api-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/raidr-api~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-raidr-api-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",
        "required": [
          "location",
          "proxyConfiguration"
        ],
        "properties": {
          "searchMode": {
            "title": "🔀 Search Mode",
            "enum": [
              "simple",
              "advanced"
            ],
            "type": "string",
            "description": "Simple: One set of filters applied to all search terms.\nAdvanced: Each search term gets its own price range, days listed, keywords, and result limit.",
            "default": "simple"
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "Where to search. Enter a city, address, or postal code. The scraper automatically looks up coordinates.\n\nExamples: 'Toronto, Ontario', 'New York, NY', '90210', 'London, UK'"
          },
          "radiusKm": {
            "title": "🎯 Search Radius",
            "enum": [
              "1",
              "2",
              "5",
              "10",
              "20",
              "40",
              "65",
              "100",
              "250",
              "500"
            ],
            "type": "string",
            "description": "How far from your location to search.",
            "default": "65"
          },
          "searchTerms": {
            "title": "🔤 Search Terms",
            "type": "array",
            "description": "Keywords to search for on Facebook Marketplace. Each term is searched separately.\n\nExamples: 'iPhone 14', 'PS5', 'mountain bike', 'vintage furniture'",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "💰 Minimum Price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter in dollars. Leave empty or 0 for no minimum.\n\nExample: Enter 50 to only see items $50 and above",
            "default": 0
          },
          "maxPrice": {
            "title": "💰 Maximum Price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter in dollars. Leave empty or 0 for no maximum.\n\nExample: Enter 500 to only see items $500 and below",
            "default": 0
          },
          "daysListed": {
            "title": "📅 Days Listed",
            "enum": [
              "",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only show listings posted within this time period (Facebook's listing age filter)",
            "default": ""
          },
          "listingsPerSearch": {
            "title": "📊 Results per Search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum listings to fetch per search term. Facebook returns ~24 listings per page.\n\nRecommended: 24-100 for most use cases",
            "default": 24
          },
          "filterKeywords": {
            "title": "🔤 Title Filter Keywords",
            "type": "array",
            "description": "Optional: Only include listings with these words in the title (case-insensitive). Leave empty to include all results.\n\nExample: For 'iPhone' search, filter by 'Pro', 'Max' to find only Pro/Max models",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searches": {
            "title": "🚀 Advanced Searches",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Add one or more searches. Each search has its own search term and individual filters.\n\nExample: Track PS5 at $300-$500 with keywords 'with controllers, brand new' AND iPhone at $600-$800 with keywords 'unlocked, 1TB'.",
            "items": {
              "type": "object",
              "properties": {
                "searchTerm": {
                  "title": "Search Term",
                  "type": "string",
                  "description": "What to search for (e.g. 'PS5', 'iPhone 15 Pro')",
                  "editor": "textfield",
                  "minLength": 1
                },
                "minPrice": {
                  "title": "Minimum Price ($)",
                  "type": "integer",
                  "description": "Minimum price in dollars for this search. 0 or empty = no minimum.",
                  "editor": "number",
                  "minimum": 0
                },
                "maxPrice": {
                  "title": "Maximum Price ($)",
                  "type": "integer",
                  "description": "Maximum price in dollars for this search. 0 or empty = no maximum.",
                  "editor": "number",
                  "minimum": 0
                },
                "daysListed": {
                  "title": "Days Listed",
                  "type": "string",
                  "description": "Only include listings from this time period.",
                  "editor": "select",
                  "enum": [
                    "",
                    "1",
                    "7",
                    "30"
                  ],
                  "enumTitles": [
                    "Any time",
                    "Last 24 hours",
                    "Last 7 days",
                    "Last 30 days"
                  ]
                },
                "filterKeywords": {
                  "title": "Filter Keywords (comma-separated)",
                  "type": "string",
                  "description": "Only include listings with these words in the title (case-insensitive, comma-separated). Leave empty to include all.\n\nExample: 'unlocked, 1TB, excellent condition'",
                  "editor": "textfield"
                },
                "listingsPerSearch": {
                  "title": "Results Limit",
                  "type": "integer",
                  "description": "Max listings for this search. Leave empty to use the global default.",
                  "editor": "number",
                  "minimum": 1,
                  "maximum": 500,
                  "default": 24,
                  "prefill": 24
                }
              },
              "required": [
                "searchTerm"
              ]
            }
          },
          "fetchDetailedItems": {
            "title": "📦 Fetch Full Details",
            "type": "boolean",
            "description": "Get complete information for each listing including:\n- Full description\n- Seller information\n- All photos\n- Exact posting time\n- Condition details\n\nSlower but provides much richer data. Required for age filtering.",
            "default": false
          },
          "fetchListingMedia": {
            "title": "🖼️ Fetch Listing Photos & Videos",
            "type": "boolean",
            "description": "Fetch the complete photo gallery and any pre-recorded videos for each listing via Facebook's media viewer endpoint. Populates an `extraListingMedia` field with `listing_photos` (all image URIs with dimensions & alt-text) and `listing_videos` (playable URLs + thumbnails).\n\nIndependent of 📦 Fetch Full Details — enable either, both, or neither. Adds one extra proxy request per listing.",
            "default": false
          },
          "maxListingAge": {
            "title": "⏰ Maximum Listing Age",
            "enum": [
              "",
              "1h",
              "6h",
              "12h",
              "24h",
              "2d",
              "7d",
              "30d"
            ],
            "type": "string",
            "description": "Filter by actual posting time (more accurate than 'Days Listed'). Requires 'Fetch Full Details' to be enabled.",
            "default": ""
          },
          "useDeduplication": {
            "title": "🔄 Skip Previously Seen",
            "type": "boolean",
            "description": "Remember listings from previous runs and skip them. Useful for monitoring new listings over time.",
            "default": true
          },
          "discordWebhookUrl": {
            "title": "🔗 Webhook URL",
            "type": "string",
            "description": "Discord webhook URL for notifications. Leave empty to disable.\n\nHow to get a webhook: Discord Server Settings > Integrations > Webhooks > New Webhook > Copy URL",
            "default": ""
          },
          "discordNotifyOnlyNew": {
            "title": "🆕 New Items Only",
            "type": "boolean",
            "description": "Only send notifications for items not seen in previous runs",
            "default": true
          },
          "discordImageDisplay": {
            "title": "🖼️ Image Style",
            "enum": [
              "thumbnail",
              "full",
              "none"
            ],
            "type": "string",
            "description": "How to show listing images in Discord",
            "default": "thumbnail"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. You MUST use residential proxies for Facebook scraping to work.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CA"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}