{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Price Intelligence & Deal Finder",
    "description": "[ 1k/1.49$ ] Facebook Marketplace Price Intelligence & Deal Finder samples Marketplace search results into market insight: price statistics with outlier removal, a deal score and label per listing (deal, fair, overpriced) and one summary per search. Best deals can be enriched.",
    "version": "0.1",
    "x-build-id": "FLcIfgzt7ZVVG7TWq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~facebook-marketplace-price-intelligence-deal-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-facebook-marketplace-price-intelligence-deal-finder",
        "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/alpha-scraper~facebook-marketplace-price-intelligence-deal-finder/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-facebook-marketplace-price-intelligence-deal-finder",
        "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/alpha-scraper~facebook-marketplace-price-intelligence-deal-finder/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-facebook-marketplace-price-intelligence-deal-finder",
        "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 queries",
            "type": "array",
            "description": "Marketplace search keywords, e.g. iphone 15 pro. Every query is analysed separately for every location.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Facebook city slug, city name or numeric city-page id, e.g. nyc. Ignored when both 'Latitude' and 'Longitude' are set.",
            "default": [
              "nyc"
            ],
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Search around explicit coordinates instead of 'Locations'. Needs 'Longitude' as well; when both are set, 'Locations' is ignored."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Longitude for the coordinate search. Needs 'Latitude' as well."
          },
          "radiusKm": {
            "title": "Radius",
            "minimum": 0,
            "type": "number",
            "description": "Search radius around the location or coordinates. Leave empty for Facebook's default radius."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Optional Marketplace category slug or id that keeps the comparison set clean, e.g. electronics. If the category cannot be resolved the search runs over all categories."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings priced at or above this amount."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings priced at or below this amount."
          },
          "condition": {
            "title": "Condition",
            "uniqueItems": true,
            "type": "array",
            "description": "Only listings in these conditions. Leave empty for all conditions.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "creation_time_descend",
              "creation_time_ascend",
              "price_ascend",
              "price_descend",
              "distance_ascend",
              "distance_descend",
              "vehicle_mileage_ascend",
              "vehicle_mileage_descend",
              "vehicle_year_descend",
              "vehicle_year_ascend"
            ],
            "type": "string",
            "description": "Order of the Marketplace results. The statistics are computed on the first listings in this order, so the order changes which listings land in the sample. Leave empty for Facebook's default order."
          },
          "daysSinceListed": {
            "title": "Days since listed",
            "minimum": 1,
            "type": "integer",
            "description": "Only listings posted within the last N days."
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Only listings offering this delivery method. Leave empty for all."
          },
          "requiredKeywords": {
            "title": "Required keywords",
            "type": "array",
            "description": "The listing title must contain ALL of these words or phrases (case-insensitive, whole words; a plural s/es also matches). Keeps unrelated hits out of the sample.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Listings whose title contains ANY of these words or phrases are dropped from the sample, e.g. accessories or broken units.",
            "default": [
              "case",
              "cover",
              "screen protector",
              "charger",
              "box only",
              "for parts",
              "parts only",
              "broken",
              "cracked",
              "icloud locked"
            ],
            "items": {
              "type": "string"
            }
          },
          "outlierMethod": {
            "title": "Outlier method",
            "enum": [
              "iqr",
              "mad",
              "none"
            ],
            "type": "string",
            "description": "How outlier prices are removed before the median and the deal scores are computed. Outlier removal needs at least 5 priced listings. Outliers are never ranked as best deals.",
            "default": "iqr"
          },
          "outlierK": {
            "title": "Outlier multiplier",
            "minimum": 0,
            "type": "number",
            "description": "Width of the accepted price band: the IQR multiplier (1.5 when empty) or the MAD multiplier (3 when empty). Larger values remove fewer outliers."
          },
          "ignorePricesBelow": {
            "title": "Ignore prices below",
            "minimum": 0,
            "type": "number",
            "description": "Prices below this amount are treated as placeholders ($0, free, 'contact me') and excluded from the statistics. Set 0 to keep every price.",
            "default": 1
          },
          "dealThresholdPct": {
            "title": "Deal threshold",
            "minimum": 0,
            "type": "number",
            "description": "A listing is flagged as a deal when its price is at least this many percent below the (outlier-free) median. 0 uses the default of 20.",
            "default": 20
          },
          "overpricedThresholdPct": {
            "title": "Overpriced threshold",
            "minimum": 0,
            "type": "number",
            "description": "A listing is flagged as overpriced when its price is at least this many percent above the median. 0 uses the default of 25.",
            "default": 25
          },
          "onlyDeals": {
            "title": "Only deals",
            "type": "boolean",
            "description": "Return only the listings flagged as deals. The summary record of each search is still returned.",
            "default": false
          },
          "enrichDeals": {
            "title": "Enrich best deals",
            "type": "boolean",
            "description": "Open the listing page of the best deals (one extra request each) to add description, condition, seller and photos.",
            "default": true
          },
          "sampleSize": {
            "title": "Sample size",
            "minimum": 1,
            "type": "integer",
            "description": "Number of listings used for the price statistics. Empty uses 'Max items'; it is never smaller than 'Max items'. Use 100-300 for a robust sample. Only listings that pass the keyword filters count."
          },
          "maxDealDetails": {
            "title": "Max deal details",
            "minimum": 1,
            "type": "integer",
            "description": "How many of the best deals are enriched from their listing pages when 'Enrich best deals' is on.",
            "default": 10
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listings returned per search and location, best deals first. Each search and location also returns one extra summary record.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}