{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper & API: New Listing Alerts",
    "description": "Scrape Facebook Marketplace listings by keyword × city, category or link, no login: price, old price, city, posting time, seller, photos, details. Every run remembers its searches: get only new listings and price drops on a schedule.",
    "version": "0.1",
    "x-build-id": "Hbyp1cqL1SnOX4EUc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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 words",
            "type": "array",
            "description": "One search per line, as you would type it on Marketplace (\"iphone 15\", \"sofa\", \"honda civic\"). Every word is searched in every location below.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "One per line: a city (\"Austin, Texas\", \"London\", \"München\"), a postal code (\"10115\", \"SW1A 1AA\") or \"latitude,longitude\". Several cities = one run covers all of them; listings found in two of them are returned once.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories (browse without words)",
            "type": "array",
            "description": "Whole Marketplace categories in every location above, e.g. all Vehicles around Dallas. Optional: search words alone are enough.",
            "items": {
              "type": "string",
              "enum": [
                "vehicles",
                "propertyrentals",
                "propertyforsale",
                "electronics",
                "home",
                "garden",
                "apparel",
                "family",
                "entertainment",
                "hobbies",
                "home-improvements",
                "instruments",
                "office-supplies",
                "pets",
                "sports",
                "toys",
                "free",
                "classifieds"
              ],
              "enumTitles": [
                "Vehicles",
                "Property rentals",
                "Home sales",
                "Electronics",
                "Home goods",
                "Garden & outdoor",
                "Apparel",
                "Family",
                "Entertainment",
                "Hobbies",
                "Home improvement supplies",
                "Musical instruments",
                "Office supplies",
                "Pet supplies",
                "Sporting goods",
                "Toys & games",
                "Free stuff",
                "Classifieds"
              ]
            }
          },
          "startUrls": {
            "title": "🔗 Marketplace links",
            "type": "array",
            "description": "Optional. Any facebook.com/marketplace/ link copied from your browser: a search with its filters, a category (\"/marketplace/nyc/vehicles\") or a single listing (\"/marketplace/item/123...\"; returned with its details, good for status and price checks).",
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search radius around each location, in kilometres (65 km = 40 miles, Facebook's default).",
            "default": 65
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency of the location. Empty = no minimum."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "In the local currency of the location. Empty = no maximum."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. Empty = any condition.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "daysSinceListed": {
            "title": "Date listed",
            "enum": [
              "",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted within this period.",
            "default": ""
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "best_match",
              "price_low",
              "price_high",
              "distance"
            ],
            "type": "string",
            "description": "Order of the results. Newest first is best for alerts: a run stops as soon as it reaches listings it has already seen.",
            "default": "newest"
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "all",
              "local_pickup",
              "shipping"
            ],
            "type": "string",
            "description": "Local pickup only, shipping only, or both.",
            "default": "all"
          },
          "titleMustInclude": {
            "title": "Title must include",
            "type": "array",
            "description": "Keep only listings whose title contains every one of these words (not case sensitive). Marketplace search is broad: this drops unrelated items for free.",
            "items": {
              "type": "string"
            }
          },
          "titleExclude": {
            "title": "Title must not include",
            "type": "array",
            "description": "Drop listings whose title contains any of these words (\"broken\", \"parts\", \"case\"). Dropped listings are free.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Per search word × location, per category × location and per link.",
            "default": 100
          },
          "includeDetails": {
            "title": "📋 Listing details",
            "type": "boolean",
            "description": "Also load each listing's page: full description, condition, exact location and postal code, all photos and vehicle fields (make, model, mileage, transmission, owners). Charged per listing with details on top of the listing.",
            "default": false
          },
          "onlyNew": {
            "title": "🔔 Only new listings and price drops",
            "type": "boolean",
            "description": "Return only listings new to these searches and listings whose price went down. The first run returns everything and remembers it. Every row has isNew, previousPrice and priceDropPct either way.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every request attempt (for support).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}