{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Facebook Marketplace Scraper extracts title, price, currency, condition, brand, model, year, mileage, location name, primary photo url, seller name, listing url for every row. Inputs: search keywords or direct URLs, location, radius, price filters, condition filter, scrape product details.",
    "version": "0.0",
    "x-build-id": "FBn7qmWaH7UyRuQS5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlix~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlix-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/crawlix~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlix-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/crawlix~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlix-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": [
          "location"
        ],
        "properties": {
          "search_queries": {
            "title": "Search Keywords / Queries (Optional)",
            "type": "array",
            "description": "One or more search terms (e.g. 'car', 'laptop'), or direct Facebook Marketplace product URLs (e.g. 'https://www.facebook.com/marketplace/item/1474645144501779/'). If left empty, the scraper will browse all available marketplace listings in the target location.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location / City / Place",
            "type": "string",
            "description": "City, town, or address to search near (e.g. 'South San Francisco, California', 'Faridpur, Dhaka, Bangladesh'). Automatically converted to Marketplace place coordinates and Place ID."
          },
          "radius": {
            "title": "Search Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search distance radius around the selected location in kilometers. Default is 65 km if left empty.",
            "default": 65
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "suggested",
              "nearest",
              "newest",
              "lowest_price",
              "highest_price"
            ],
            "type": "string",
            "description": "Sorting criteria for Marketplace listings: Suggested (default relevance), nearest geographical distance, newest listing date, lowest price, or highest price.",
            "default": "suggested"
          },
          "min_price": {
            "title": "Minimum Price (Min)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum price filter (e.g. 500). Default is 0 (or leave empty), which places no minimum price restriction and scrapes products from any price starting at 0.",
            "default": 0
          },
          "max_price": {
            "title": "Maximum Price (Max)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum price filter (e.g. 2000). Default is 0 (or leave empty), which places no upper price restriction and scrapes products across any price range.",
            "default": 0
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Filter listings by item condition (New, Used – like new, Used – good, Used – fair). Select one or more conditions. Leave empty to include all conditions regardless of state.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair"
              ],
              "enumTitles": [
                "New",
                "Used – like new",
                "Used – good",
                "Used – fair"
              ]
            },
            "default": []
          },
          "date_listed": {
            "title": "Date Listed",
            "enum": [
              "all",
              "last_24h",
              "last_7d",
              "last_30d"
            ],
            "type": "string",
            "description": "Filter listings by when they were posted: All (default), Last 24 hours, Last 7 days, or Last 30 days.",
            "default": "all"
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "available",
              "sold"
            ],
            "type": "string",
            "description": "Filter listings by item status: Available (active listings, default) or Sold (completed/archived listings).",
            "default": "available"
          },
          "max_items": {
            "title": "Max Products to Collect",
            "minimum": 1,
            "type": "integer",
            "description": "The target number of products to collect for each search keyword or location browse feed. A free Apify account collects up to 50 items in total per run across all search queries; a paid plan has no limit. The scraper continuously paginates through Facebook Marketplace until your target is reached or until no more products are available for the location. Default is 20.",
            "default": 20
          },
          "scrape_product_details": {
            "title": "Product Details ($)",
            "type": "boolean",
            "description": "When enabled, visits each product's page to collect in-depth details: full product description, item condition, detailed vehicle & product specifications, complete photo gallery (up to 20+ high-res images), video URLs, delivery options, seller join date, seller avatar photo, seller ratings, and review counts. Enables the extra per-product detail enrichment charge ($). Default is false for fast search scraping.",
            "default": false
          },
          "proxyCountry": {
            "title": "Residential Proxy Country",
            "enum": [
              "US",
              "GB",
              "AU",
              "CA",
              "DE",
              "FR",
              "NL",
              "IT",
              "ES",
              "SE",
              "NO",
              "DK",
              "FI",
              "BE",
              "AT",
              "CH",
              "IE",
              "PL",
              "PT",
              "CZ",
              "HU",
              "RO",
              "GR",
              "JP",
              "KR",
              "SG",
              "IN",
              "BR",
              "MX",
              "AR",
              "TR",
              "AF",
              "AL",
              "DZ",
              "AO",
              "AM",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BZ",
              "BJ",
              "BO",
              "BA",
              "BW",
              "BN",
              "BG",
              "BF",
              "KH",
              "CM",
              "CL",
              "CN",
              "CO",
              "CG",
              "CR",
              "HR",
              "CU",
              "CY",
              "CD",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "ET",
              "FJ",
              "GA",
              "GE",
              "GH",
              "GT",
              "GN",
              "GY",
              "HT",
              "HN",
              "HK",
              "IS",
              "ID",
              "IR",
              "IQ",
              "IL",
              "CI",
              "JM",
              "JO",
              "KZ",
              "KE",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LR",
              "LY",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MU",
              "MD",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NP",
              "NZ",
              "NI",
              "NE",
              "NG",
              "MK",
              "OM",
              "PK",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PR",
              "QA",
              "RU",
              "RW",
              "SA",
              "SN",
              "RS",
              "SL",
              "SK",
              "SI",
              "SO",
              "ZA",
              "LK",
              "SD",
              "SR",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TG",
              "TT",
              "TN",
              "TM",
              "UG",
              "UA",
              "AE",
              "UY",
              "UZ",
              "VE",
              "VN",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Select from the residential proxy country option list. The country your run connects from using residential proxies. Pick the one closest to your target market. If a country is not available right now, the run connects from the United States instead and the log says so.",
            "default": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}