{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper — Listings, Prices & Vehicles",
    "description": "Scrape Facebook Marketplace by keyword or URL. Export title, price, location, photos, vehicle specs, and listing status. Privacy-safe mode, monitoring, batch keywords. Fast curl_cffi HTTP scraper with residential proxy support.",
    "version": "1.2",
    "x-build-id": "cwL013llUOIJG9hpm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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": {
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search on Facebook Marketplace. The actor builds the search URL for you."
          },
          "searchQueries": {
            "title": "Search queries (batch)",
            "type": "array",
            "description": "Optional extra keywords. Combined with searchQuery for larger result sets; listings are deduplicated across queries.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Facebook Marketplace search or item URLs. Each URL is scraped independently.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "marketplaceLocation": {
            "title": "Marketplace location",
            "type": "string",
            "description": "City slug or name (e.g. phoenix, nyc, los angeles). Used when searchQuery is set without a start URL.",
            "default": "phoenix"
          },
          "radiusKm": {
            "title": "Search radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search radius in kilometers around the marketplace location.",
            "default": 65
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum listing price filter in local currency."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing price filter in local currency."
          },
          "daysSinceListed": {
            "title": "Days since listed",
            "enum": [
              "",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only return listings posted within this period.",
            "default": ""
          },
          "itemCondition": {
            "title": "Item condition",
            "type": "string",
            "description": "Comma-separated condition filter: new, used_like_new, used_good, used_fair."
          },
          "categoryId": {
            "title": "Category ID",
            "type": "string",
            "description": "Optional Marketplace category slug (e.g. vehicles, electronics, free)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "creation_time_descend",
              "distance_ascend",
              "price_ascend",
              "price_descend"
            ],
            "type": "string",
            "description": "Marketplace search sort order.",
            "default": "best_match"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of listings to scrape per search or URL.",
            "default": 50
          },
          "includeSeller": {
            "title": "Include seller & full details",
            "type": "boolean",
            "description": "Visit each listing detail page for full description, all photos, attributes, seller data, and vehicle specs.",
            "default": false
          },
          "flattenOutput": {
            "title": "Flatten output",
            "type": "boolean",
            "description": "Flatten nested objects (vehicle, seller, location) into top-level fields for spreadsheets.",
            "default": false
          },
          "monitoringMode": {
            "title": "Monitoring mode",
            "type": "boolean",
            "description": "Emit only listings not seen in previous runs of the same search configuration.",
            "default": false
          },
          "compareWithEbay": {
            "title": "Compare with eBay sold prices",
            "type": "boolean",
            "description": "Attach eBay sold-price arbitrage metrics (median sold price, margin, demand score) per unique keyword.",
            "default": false
          },
          "privacySafeMode": {
            "title": "Privacy-safe mode",
            "type": "boolean",
            "description": "Recommended default. Strips seller identity, redacts emails/phones in descriptions, and removes precise coordinates and VIN from output.",
            "default": true
          },
          "excludeSellerData": {
            "title": "Exclude seller data",
            "type": "boolean",
            "description": "Remove seller name and profile from output. Ignored when privacySafeMode is enabled.",
            "default": true
          },
          "redactDescriptionPii": {
            "title": "Redact contact info in descriptions",
            "type": "boolean",
            "description": "Mask emails, phone numbers, and messenger links found in listing descriptions. Ignored when privacySafeMode is enabled.",
            "default": true
          },
          "excludeCoordinates": {
            "title": "Exclude coordinates",
            "type": "boolean",
            "description": "Remove latitude and longitude from output (city and state are kept). Ignored when privacySafeMode is enabled.",
            "default": true
          },
          "excludeVin": {
            "title": "Exclude VIN",
            "type": "boolean",
            "description": "Remove vehicle VIN from output. Ignored when privacySafeMode is enabled.",
            "default": true
          },
          "cookies": {
            "title": "Facebook cookies",
            "type": "array",
            "description": "Optional Facebook session cookies (e.g. c_user, xs, datr). Enables seller identity and deeper pagination."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Residential proxies geo-matched to the target marketplace country are required for stable access.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}