{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper — New Listings Monitor",
    "description": "Watch Facebook Marketplace searches by city, radius, price and condition. Every run flags new listings and price drops since the last run, with price, previous price, location, distance, seller, photo and link. Only-new mode for alerts; optional details. No login.",
    "version": "0.1",
    "x-build-id": "aoX0mwhfa4X9OAcjU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inovaflow~facebook-marketplace-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inovaflow-facebook-marketplace-monitor",
        "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/inovaflow~facebook-marketplace-monitor/runs": {
      "post": {
        "operationId": "runs-sync-inovaflow-facebook-marketplace-monitor",
        "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/inovaflow~facebook-marketplace-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-inovaflow-facebook-marketplace-monitor",
        "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": [
          "monitorName"
        ],
        "properties": {
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Any name, e.g. `road-bike-deals`. Runs with the same name share one memory, so `isNew` and `priceDropped` compare against the previous run of this monitor. Use a new name to start fresh.",
            "default": "my-marketplace-monitor"
          },
          "searchQueries": {
            "title": "Search queries",
            "maxItems": 20,
            "type": "array",
            "description": "What to look for, one per line — the words you would type in Marketplace search: `road bike`, `iphone 15`, `herman miller chair`.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "maxItems": 20,
            "type": "array",
            "description": "Where to search, one per line: a city (`Austin, TX`, `Berlin`, `Toronto, ON`), a ZIP code, a Marketplace city slug (the part after /marketplace/ in its URL, like `nyc`), or coordinates `40.71,-74.00`.",
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far from the location to look. Facebook itself mixes in listings from well outside the radius when sorting by newest; the Actor measures each listing's distance and drops those further away (see the option below). 40 km ≈ 25 miles.",
            "default": 40
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency. Leave empty for no maximum."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only these conditions. Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used – like new",
                "Used – good",
                "Used – fair"
              ]
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "any",
              "apparel",
              "appliances",
              "bicycles",
              "electronics",
              "entertainment",
              "family",
              "furniture",
              "garden",
              "hobbies",
              "home",
              "instruments",
              "jewelry",
              "pets",
              "sports",
              "tools",
              "toys"
            ],
            "type": "string",
            "description": "Narrow the search to one Marketplace category. For categories not listed here (vehicles, rentals, free stuff…), paste the category page as a search URL below.",
            "default": "any"
          },
          "daysSinceListed": {
            "title": "Listed within",
            "enum": [
              "any",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted in this window.",
            "default": "any"
          },
          "deliveryMethod": {
            "title": "Delivery",
            "enum": [
              "all",
              "local_pickup",
              "shipping"
            ],
            "type": "string",
            "description": "`local_pickup` = pick-up / meet-up only, `shipping` = listings the seller ships.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "newest",
              "price_low",
              "price_high",
              "distance",
              "best_match"
            ],
            "type": "string",
            "description": "`newest` suits a monitor: fresh listings first, and a monitor run stops early once the latest pages hold nothing new.",
            "default": "newest"
          },
          "searchUrls": {
            "title": "Marketplace search URLs (optional)",
            "maxItems": 30,
            "type": "array",
            "description": "Or paste searches straight from facebook.com/marketplace — a search or category page with the filters you set there. Each URL is monitored as its own search, with its own location and filters.",
            "items": {
              "type": "string"
            }
          },
          "maxListingsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many listings (within the radius) to check per search and run. Facebook serves 24 per page. Also caps what you pay.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new listings and price drops",
            "type": "boolean",
            "description": "On: each run returns only listings this monitor has not shown you before, plus listings whose price went down since the last run — ideal for alerts. Off: every listing, each flagged with `isNew` and `priceDropped`. The first run of a monitor counts everything as new.",
            "default": false
          },
          "includeDetails": {
            "title": "Add listing details (paid add-on)",
            "type": "boolean",
            "description": "Opens each returned listing for its description, condition, category, all photos and exact spot (so the distance is exact). Charged per listing on top of the listing price.",
            "default": false
          },
          "keepOutsideRadius": {
            "title": "Keep listings outside the radius",
            "type": "boolean",
            "description": "Off (default): listings whose town is further than the radius are dropped and never charged. On: keep everything Facebook returns, each with its `distanceKm`.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Searches run at the same time. Lower it if the log shows many retries.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy is required — Facebook answers Marketplace searches only for residential IPs. Traffic is small (a few KB per listing).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}