{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper – Listings, Prices & Sellers",
    "description": "Scrape Facebook Marketplace by keyword, location, category, or URL. Extract prices, descriptions, photos, seller data, vehicles, status, and changes.",
    "version": "0.0",
    "x-build-id": "HKoZcjn854cF1AkXY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapingmonkey~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapingmonkey-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/scrapingmonkey~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapingmonkey-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/scrapingmonkey~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapingmonkey-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "browse",
              "details",
              "status",
              "monitor",
              "auto"
            ],
            "type": "string",
            "description": "Choose discovery, detail, status, monitoring, or automatic URL routing.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One or more products or phrases to search for.",
            "items": {
              "type": "string"
            },
            "default": [
              "bicycle"
            ]
          },
          "startUrls": {
            "title": "Marketplace URLs",
            "type": "array",
            "description": "Location, category, search, or individual item URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingIds": {
            "title": "Listing IDs or item URLs",
            "type": "array",
            "description": "Used by details and status modes.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location slug",
            "type": "string",
            "description": "The location segment from a Marketplace URL, for example newyork or london.",
            "default": "newyork"
          },
          "radiusKm": {
            "title": "Search radius",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum search distance around the selected Marketplace location, from 1 to 500 kilometers.",
            "default": 65
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum listing price in the currency used by the selected Marketplace region."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum listing price in the currency used by the selected Marketplace region."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend"
            ],
            "type": "string",
            "description": "Order listings by best match, newest first, price, or distance.",
            "default": "best_match"
          },
          "conditions": {
            "title": "Conditions",
            "type": "array",
            "description": "Marketplace condition values such as new, used_like_new, used_good, or used_fair.",
            "items": {
              "type": "string"
            }
          },
          "deliveryMethods": {
            "title": "Delivery methods",
            "type": "array",
            "description": "Optional Marketplace delivery method values used to narrow search results.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs",
            "type": "array",
            "description": "Optional Facebook Marketplace category identifiers used to restrict discovery.",
            "items": {
              "type": "string"
            }
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "all",
              "in_stock",
              "out_of_stock"
            ],
            "type": "string",
            "description": "Return all listings or restrict results by the public availability state.",
            "default": "all"
          },
          "dateListed": {
            "title": "Date listed",
            "enum": [
              "all",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Restrict search results to listings published within the selected recent period.",
            "default": "all"
          },
          "exactMatch": {
            "title": "Exact match",
            "type": "boolean",
            "description": "Prefer listings that match the supplied search phrase exactly when the public search surface supports it.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum listings per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of normalized listing rows saved for each search term, URL, or direct input.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum pages per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of public result pages requested for each discovery input.",
            "default": 20
          },
          "includeDetails": {
            "title": "Fetch full details",
            "type": "boolean",
            "description": "Visit every discovered item for description, seller, media, and category-specific fields.",
            "default": false
          },
          "includeMedia": {
            "title": "Include media URLs",
            "type": "boolean",
            "description": "Keep public listing image and video URLs when Facebook exposes them.",
            "default": true
          },
          "includeSeller": {
            "title": "Include public seller fields",
            "type": "boolean",
            "description": "Keep seller identity and profile fields only when they are publicly available without login.",
            "default": true
          },
          "includeVehicleDetails": {
            "title": "Include vehicle details",
            "type": "boolean",
            "description": "Keep public vehicle attributes such as make, model, year, mileage, transmission, and body style when available.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring output",
            "enum": [
              "off",
              "onlyNew",
              "newAndChanged"
            ],
            "type": "string",
            "description": "Save every result, only newly discovered listings, or new and changed listings compared with previous runs.",
            "default": "off"
          },
          "monitorKey": {
            "title": "Monitor state key",
            "type": "string",
            "description": "Stable namespace used to keep independent monitoring histories separate.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of Marketplace input jobs processed concurrently.",
            "default": 3
          },
          "includeRaw": {
            "title": "Include sanitized raw data",
            "type": "boolean",
            "description": "Include a sanitized public source object for advanced processing; this increases dataset size.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}