{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper & Monitor",
    "description": "Scrape Facebook Marketplace by keyword and city, or from any search URL. No login or cookies. Monitor mode returns only new listings and price drops, and never bills for listings it has already delivered. Includes price cuts, vehicle mileage and photos.",
    "version": "0.3",
    "x-build-id": "I0uW1MiLKisfMfmmV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydedata~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydedata-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/hydedata~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hydedata-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/hydedata~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hydedata-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "What to search for. Each keyword is a separate search in the location below.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, neighborhood or ZIP code, e.g. \"Orlando, FL\" or \"78704\". Facebook searches roughly 40 miles around it. Required with search keywords."
          },
          "extraLocations": {
            "title": "More locations (optional)",
            "type": "array",
            "description": "Run the same keywords in more cities or ZIP codes. Each keyword and location pair is its own search.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Marketplace search URLs (advanced)",
            "type": "array",
            "description": "Optional. Run a search on facebook.com/marketplace in your browser with any filters (category, condition, etc.) and paste the URL. Can be used with or instead of keywords.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "strictKeywordMatch": {
            "title": "Only keep listings whose title matches the keywords",
            "type": "boolean",
            "description": "Facebook mixes loosely related listings into searches (a \"honda civic\" search also returns other cars and parts). When on, a listing is kept only if its title contains every keyword word (\"bike\" also matches \"bikes\"). Dropped listings aren't charged. May drop relevant listings with unusual titles.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude listings with these words",
            "type": "array",
            "description": "Drop listings whose title contains any of these words or phrases, e.g. \"parts\", \"wanted\", \"for parts\". Dropped listings aren't charged.",
            "items": {
              "type": "string"
            }
          },
          "vehiclesOnly": {
            "title": "Vehicles only",
            "type": "boolean",
            "description": "Keep only listings in Facebook's Vehicles category: cars, trucks, motorcycles, boats and RVs. Drops the parts and accessories that mention the model (tires, hardtops, bumpers). Dropped listings aren't charged. A vehicle the seller filed in another category is dropped too.",
            "default": false
          },
          "daysSinceListed": {
            "title": "Listed within",
            "enum": [
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted in this window."
          },
          "itemCondition": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. Leave empty for any condition. Vehicles usually have no condition set, so leave this empty for car searches.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used, like new",
                "Used, good",
                "Used, fair"
              ]
            }
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Only listings offering local pickup, or only listings that ship."
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of listings delivered per keyword or search URL. Facebook shows 24 listings per search page; above that, the Actor splits the search into price ranges to reach this number.",
            "default": 50
          },
          "sortNewestFirst": {
            "title": "Sort newest first",
            "type": "boolean",
            "description": "Adds the newest-first sort to each search. Recommended for monitoring.",
            "default": true
          },
          "autoPriceBands": {
            "title": "Split into price ranges automatically",
            "type": "boolean",
            "description": "When a search has more listings than one page (24), split it into narrower price ranges until Max listings per search is reached. The extra pages aren't charged; you pay for the listings they find. In monitor mode, a search only splits while every listing on the page is new.",
            "default": true
          },
          "priceBands": {
            "title": "Manual price ranges (optional)",
            "type": "array",
            "description": "Set your own price ranges instead of automatic ones, e.g. [{\"min\":0,\"max\":200},{\"min\":201,\"max\":1000}]. Each range is one search page.",
            "default": []
          },
          "includeDetails": {
            "title": "Add listing details",
            "type": "boolean",
            "description": "For each delivered listing, also get its description, condition, currency, every photo, and for vehicles: year, make, model, trim, mileage, transmission, fuel, colors, title status, private or dealer seller, and VIN and owners when the seller filled them in. Charged per listing that gets details. In monitor mode only new listings and price drops are fetched. Seller names and contact details are never collected.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (new listings and price drops only)",
            "type": "boolean",
            "description": "Remembers what previous runs returned and only outputs new listings or price drops. Use with a Schedule. The first run returns everything as the baseline.",
            "default": false
          },
          "notifyWebhookUrl": {
            "title": "Send new listings to a webhook (optional)",
            "type": "string",
            "description": "Paste a Discord or Slack incoming webhook URL to get each run's listings as a message, with photo, price and link. Any other URL gets the listings as JSON. Only sent when the run delivers something, so quiet monitor runs stay silent."
          },
          "stateStoreName": {
            "title": "Monitor state store name",
            "type": "string",
            "description": "Named key-value store that keeps monitor memory between runs. Use different names to run independent monitors.",
            "default": "fb-marketplace-monitor-state"
          },
          "stateRetentionDays": {
            "title": "Forget listings after (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Listings not seen for this many days are dropped from monitor memory.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use residential proxies. Facebook redirects datacenter IPs to its login page.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}