{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "[ 1k/1.49$ ] Facebook Marketplace Scraper searches listings by keyword and location with category, price, condition, sort, listing age and delivery filters, and returns descriptions, photos, condition, category, seller, exact location, delivery flags and status. No login.",
    "version": "0.1",
    "x-build-id": "kFYfcEYrR6XzEuAPf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-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/alpha-scraper~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-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/alpha-scraper~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-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 queries",
            "type": "array",
            "description": "Keywords to search for, e.g. iphone. Every query is searched in every location (one search per query x location). Clear the list to only browse a 'Category' or only run 'Start URLs'.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Marketplace city slugs (nyc, london, austin), numeric city-page ids, or free-text city names such as Austin, TX (matched to a Facebook city, with an OpenStreetMap geocoder fallback). Leave empty to use Facebook's default Marketplace location. Ignored when 'Latitude' and 'Longitude' are set.",
            "default": [
              "nyc"
            ],
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Optional explicit latitude. Set it together with 'Longitude' to search around exact coordinates; this overrides 'Locations'."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Optional explicit longitude. Set it together with 'Latitude'."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Optional category slug (e.g. electronics, vehicles, home, free) or numeric category id. With a search query the results are limited to that category. Without a query the category page itself is browsed (clear 'Search queries'), which Facebook serves logged-out only for 'vehicles' and 'propertyrentals'."
          },
          "startUrls": {
            "title": "Start URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Marketplace search or category URLs (https://www.facebook.com/marketplace/nyc/search?query=bike) or single listing URLs (https://www.facebook.com/marketplace/item/<id>/). The filters below are applied to search / category URLs, but filters written in the URL itself win. If you leave 'Search queries' at the default example (iphone), only these URLs are run. Listing URLs are always fetched in full and are not counted by 'Max items'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "radiusKm": {
            "title": "Search radius",
            "minimum": 1,
            "type": "integer",
            "description": "Search radius around the location in kilometres. Facebook's default is 65; Facebook accepts 1, 2, 5, 10, 20, 40, 60, 80, 100, 250 and 500."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings priced at or above this amount."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings priced at or below this amount."
          },
          "condition": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in one of the selected conditions. Applies to keyword searches (not to browsing a category without a keyword).",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "suggested",
              "newest",
              "price_low",
              "price_high",
              "distance"
            ],
            "type": "string",
            "description": "Order of the results."
          },
          "daysSinceListed": {
            "title": "Listed within",
            "enum": [
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted within this many days."
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Only listings offered with this delivery method."
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "in stock",
              "out of stock"
            ],
            "type": "string",
            "description": "Only listings that are in stock or out of stock."
          },
          "requiredKeywords": {
            "title": "Required keywords",
            "type": "array",
            "description": "Keep only listings whose title contains ALL of these words (case-insensitive, whole words; 'case' also matches 'cases' but not 'bookcase'). Not applied to listing URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop listings whose title contains ANY of these words (same matching rules as 'Required keywords'). Not applied to listing URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "One extra request per listing: description, all photos, condition, category, seller (name, id, join date, ratings), exact coordinates, delivery / shipping flags and status. Turn off for a faster run that keeps only what the search results show.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listings per search - every query x location combination and every search / category URL gets its own limit, so N searches return up to N x this value.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}