{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Search Facebook Marketplace by keyword, city, category, price, condition and date listed, with vehicle filters for make, model, year and mileage. Get title, price, location, photo, seller and posting time per listing, plus description, condition and car details. No Facebook account needed.",
    "version": "0.1",
    "x-build-id": "T4WpsOxVZblQ6lKAd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-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/automatic~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-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/automatic~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-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 terms",
            "type": "array",
            "description": "What to search for, as you would type it on Marketplace (for example bicycle or iphone 13). Each term is one search in the location below. An input with no search term, category or link returns a sample search of bicycle in nyc (up to 10 listings).",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "The city as it appears after /marketplace/ in a Marketplace link: nyc, la, chicago, houston, austin, london, toronto. A numeric location id from such a link works too. Defaults to nyc."
          },
          "category": {
            "title": "Category",
            "enum": [
              "vehicles",
              "electronics",
              "furniture",
              "household",
              "apparel",
              "family",
              "toys",
              "hobbies",
              "sports",
              "instruments",
              "entertainment",
              "garden",
              "pets",
              "classifieds",
              "free"
            ],
            "type": "string",
            "description": "Limit the results to one Marketplace category. Without search terms, the newest listings in that category are collected."
          },
          "startUrls": {
            "title": "Marketplace search links",
            "type": "array",
            "description": "Links copied from a Marketplace search or category page in your browser, for example https://www.facebook.com/marketplace/austin/vehicles/?maxPrice=9000. The link's own filters are kept.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItemsPerSearch": {
            "title": "Maximum listings per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on rows for each search term or link (up to 5,000).",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum listings in total",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap on rows for the whole run, across every search (up to 50,000). Defaults to 1000, or 10 for the empty-input sample."
          },
          "includeDetails": {
            "title": "Include full listing details",
            "type": "boolean",
            "description": "Open each listing to add its description, condition, all photos, the listing attributes, category name and vehicle details. Slower, and charged as a detail add-on per row.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price, in the local currency of the location."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price, in the local currency of the location."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "priceLowToHigh",
              "priceHighToLow",
              "distance"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "relevance"
          },
          "daysSinceListed": {
            "title": "Listed within",
            "enum": [
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted in the last 1, 7 or 30 days."
          },
          "itemCondition": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "radiusKm": {
            "title": "Search radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Distance around the location to search, in kilometres. Marketplace uses about 65 km when left empty."
          },
          "minYear": {
            "title": "Minimum model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Vehicles only: earliest model year, for example 2015. Applies to every search term; a search term and these vehicle filters together is the way to list cars. Needs a search term, or a make and model below."
          },
          "maxYear": {
            "title": "Maximum model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Vehicles only: latest model year, for example 2020."
          },
          "make": {
            "title": "Vehicle make",
            "maxLength": 60,
            "type": "string",
            "description": "Vehicles only: the make as Marketplace shows it, for example Toyota or Ford. With no search term, make and model become the search."
          },
          "model": {
            "title": "Vehicle model",
            "maxLength": 60,
            "type": "string",
            "description": "Vehicles only: the model as Marketplace shows it, for example Corolla or F-150."
          },
          "minMileage": {
            "title": "Minimum mileage",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Vehicles only: lowest mileage shown on the listing, in the unit the location uses (miles in the US)."
          },
          "maxMileage": {
            "title": "Maximum mileage",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Vehicles only: highest mileage shown on the listing, for example 120000."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}