{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper - Listings, Prices & New Items",
    "description": "Scrape Facebook Marketplace listings by keyword and city, category or link, with no login and no cookies: price, location, photos, date, status, vehicle data and description. Goes past the 24-per-search cap, tracks new listings and price drops. No seller data.",
    "version": "0.1",
    "x-build-id": "wmE4XyJKdE0HdpAfQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-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/scrapewise~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-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/scrapewise~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search on Marketplace, one per line (for example 'standing desk', 'toyota camry', 'iphone 16 pro'). Every term is searched in every location below. Also accepts 'queries', 'searchQueries' and 'keywords'.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations (cities)",
            "type": "array",
            "description": "Marketplace city slug or city name, one per line: nyc, la, chicago, houston, miami, london, toronto, sydney, 'New York', 'Los Angeles'... For any other place, open Marketplace in that city and copy the word or number right after /marketplace/ in the address bar (for example 108424279189115). Results stay in that city: the search runs from a residential IP in the city's country. Defaults to nyc when empty. Also accepts 'cities' and 'location'.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (optional)",
            "type": "array",
            "description": "Marketplace category slugs to browse in each location, one per line: vehicles, propertyrentals, electronics, furniture, home, apparel, toys, sports, instruments, free... Category pages ignore search terms; to search inside a category, use a search term instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Marketplace links (optional)",
            "type": "array",
            "description": "Paste links from your browser: searches (https://www.facebook.com/marketplace/nyc/search?query=desk&minPrice=50), categories (https://www.facebook.com/marketplace/la/vehicles) or single listings (https://www.facebook.com/marketplace/item/1234567890/). Filters in a search link are kept. A single listing link always returns the full listing details. Also accepts 'urls'.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Unique listings per search term and location (or per link). Facebook shows only 24 listings per search page to visitors; with 'Go past 24 listings' on, the Actor combines filter variations to reach about 100 to 300 per search in big cities.",
            "default": 50
          },
          "maxItems": {
            "title": "Max listings for the whole run (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap across all searches together, for a fixed budget per run. Leave empty or 0 for no run cap."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or above this price, in the local currency of the location. Sent to Facebook and checked again on every row."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or below this price, in the local currency of the location."
          },
          "itemCondition": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. Leave empty for any condition.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "daysSinceListed": {
            "title": "Listed in the last",
            "enum": [
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted in this period. Leave empty for any date."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend"
            ],
            "type": "string",
            "description": "Order of the first page read. With 'Go past 24 listings' on, the other orders are also used to find more listings (each row says which variation found it)."
          },
          "deepSearch": {
            "title": "Go past 24 listings per search",
            "type": "boolean",
            "description": "Facebook shows only 24 listings per search to visitors and has no page 2 without a login. When on, the Actor re-runs the search with other sort orders, dates, conditions and price bands and keeps only listings not seen yet. Turn off to read only the first 24.",
            "default": true
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "Opens each listing page to add the full description, all photos, condition, category path, approximate location (about 1 km) and, for cars, make, model, trim, odometer, transmission, fuel, colors, owners, title status and VIN when the seller gave them. One extra page per listing, charged as 'Listing details added'.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new listings since the last run",
            "type": "boolean",
            "description": "Remembers which listings each search already returned (in a key-value store on your account named 'facebook-marketplace-scraper-state') and delivers only listings not seen before, newest first. Seen listings are not delivered and not charged. With 'Track price changes' on, listings whose price moved are delivered too. Delete the store to start over.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Track price changes",
            "type": "boolean",
            "description": "Compares every listing with the previous runs of the same search and adds isNewListing, firstSeenAt, previousPrice, priceChange and isPriceDrop. Schedule the same Task daily to catch price drops.",
            "default": false
          },
          "country": {
            "title": "Country for numeric locations",
            "type": "string",
            "description": "Two-letter country code (US, GB, CA, AU, DE...) used for the residential IP when a location is a number or a slug the Actor does not know yet. Known city slugs always use their own country.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy in the location's country (included in the price). Facebook shows a login wall to datacenter IPs, so keep the residential group.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}