{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper — Vehicles, Rentals & Alerts",
    "description": "Scrape Facebook Marketplace listings by keyword, city, coordinates, category, URL or ID. Get prices, descriptions, all photos, vehicle and rental fields, and monitor new listings and price drops. No login or cookies; full details included.",
    "version": "1.0",
    "x-build-id": "GFp3DfspxSracMdJa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-lab-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/valev-lab~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-lab-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/valev-lab~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-lab-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "listingUrls"
            ],
            "type": "string",
            "description": "Search by keyword and location, browse one category, or read exact listing URLs/IDs.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Each query is combined with each location.",
            "items": {
              "type": "string"
            },
            "default": [
              "iphone"
            ]
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Marketplace city slugs/names (sofia, berlin, New York) or objects such as {\"lat\":42.6977,\"lng\":23.3219,\"name\":\"Sofia center\"}.",
            "default": [
              "sofia"
            ]
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search radius around Facebook's city center or supplied coordinates.",
            "default": 65
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Minimum listing price in the searched Marketplace currency."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Maximum listing price in the searched Marketplace currency."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "new",
              "used-like-new",
              "good",
              "fair"
            ],
            "type": "string",
            "description": "Facebook Marketplace condition filter."
          },
          "daysSinceListed": {
            "title": "Listed within (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Keep listings Facebook marks as posted within 1, 7 or 30 days."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "newest",
              "price asc",
              "price desc",
              "distance"
            ],
            "type": "string",
            "description": "Facebook's server-side result order."
          },
          "deliveryMethod": {
            "title": "Delivery",
            "enum": [
              "local pickup",
              "shipping"
            ],
            "type": "string",
            "description": "Require local pickup or shipping where Facebook supports the option."
          },
          "category": {
            "title": "Category slug",
            "type": "string",
            "description": "Examples: vehicles, propertyrentals, electronics, apparel, classifiedsgroups.",
            "default": "vehicles"
          },
          "vehicle": {
            "title": "Vehicle filters",
            "type": "object",
            "description": "Optional make, model, minYear, maxYear and maxMileage. Make/model names resolve against Facebook's public taxonomy.",
            "default": {}
          },
          "rental": {
            "title": "Rental filters",
            "type": "object",
            "description": "Optional bedrooms, minPrice and maxPrice.",
            "default": {}
          },
          "listingUrls": {
            "title": "Listing URLs or IDs",
            "type": "array",
            "description": "Exact /marketplace/item/ links or numeric listing IDs for listingUrls mode.",
            "items": {
              "type": "string"
            }
          },
          "maxListingsPerQuery": {
            "title": "Max listings per query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum unique candidates read for each query/location or category/location pair.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "Open each listing for description, all photos, coordinates and structured vehicle/rental fields. Included in the listing price.",
            "default": true
          },
          "monitorMode": {
            "title": "Only new listings & price drops",
            "type": "boolean",
            "description": "Return only first-seen listings and lower prices; unchanged rows are free.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
            "type": "string",
            "description": "Use a stable named KeyValueStore for one schedule.",
            "default": "facebook-marketplace-scraper-monitor"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "HTTPS endpoint receiving one JSON batch of delivered new listings and price drops. Slack/Discord usually need a Make/Zapier adapter."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Direct anonymous HTTP first, then country-matched Apify Residential or custom proxy URLs after a block.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}