{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper - Listings, Prices & Sellers",
    "description": "Scrape Facebook Marketplace listings by keyword and city, category or pasted URL: title, price, photos, location, seller, listing date and status. Optional details: description, coordinates, all photos, seller rating, vehicle specs. Only-new monitoring. No login.",
    "version": "0.1",
    "x-build-id": "KQiS8GB169ga7Pk35"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eiv~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eiv-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/eiv~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eiv-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/eiv~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eiv-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 look for, one per line, e.g. \"bike\" or \"iphone 13\". Each term is searched in every location below (and in every category, if you pick some). Leave empty to browse categories instead.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Where to search, one per line: a city (\"New York, NY\", \"London\", \"Vilnius, Lithuania\"), a postal code (\"10001\"), or \"latitude, longitude\". Facebook decides the search area around it (about 60 km for a city). Needed for search terms and categories; pasted URLs carry their own location.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional. With search terms: only listings in these categories. Without search terms: browse these categories near each location. Home improvement and office supplies can be browsed but not combined with a search term.",
            "items": {
              "type": "string",
              "enum": [
                "vehicles",
                "electronics",
                "home",
                "garden",
                "home-improvements",
                "apparel",
                "family",
                "toys",
                "hobbies",
                "entertainment",
                "sports",
                "instruments",
                "pets",
                "office-supplies",
                "classifieds",
                "free"
              ],
              "enumTitles": [
                "Vehicles",
                "Electronics",
                "Home goods",
                "Garden & outdoor",
                "Home improvement supplies",
                "Apparel",
                "Family",
                "Toys & games",
                "Hobbies",
                "Entertainment",
                "Sporting goods",
                "Musical instruments",
                "Pet supplies",
                "Office supplies",
                "Classifieds",
                "Free stuff"
              ]
            }
          },
          "urls": {
            "title": "Marketplace URLs or listing links",
            "type": "array",
            "description": "Optional. Paste Facebook Marketplace URLs straight from your browser: searches (facebook.com/marketplace/nyc/search?query=bike&maxPrice=300), categories (facebook.com/marketplace/la/vehicles), city pages, or single listings (facebook.com/marketplace/item/123456789). A URL's own filters win over the filters below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (for chaining Actors)",
            "type": "array",
            "description": "The same as the field above, in the URL-list shape other Actors output, so a previous Actor's results can be fed straight in.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend"
            ],
            "type": "string",
            "description": "Facebook's order of results. \"Date listed: newest first\" suits monitoring and makes date limits stop paging early.",
            "default": "best_match"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. In the local currency of the location (dollars in New York, euros in Paris)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. In the local currency of the location. Use 0 for free items only."
          },
          "itemCondition": {
            "title": "Condition",
            "type": "array",
            "description": "Optional. 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": "Date listed",
            "enum": [
              "any",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Only listings posted within the last day, week or month.",
            "default": "any"
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "available",
              "sold"
            ],
            "type": "string",
            "description": "Listings for sale now, or sold ones (useful for sold-price research).",
            "default": "available"
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "enum": [
              "all",
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Local pickup only, shipping only, or both.",
            "default": "all"
          },
          "exactMatch": {
            "title": "Exact match",
            "type": "boolean",
            "description": "Ask Facebook for listings that match the search term more exactly (fewer loosely related results).",
            "default": false
          },
          "listedAfter": {
            "title": "Listed after",
            "type": "string",
            "description": "Optional. Keep only listings posted on or after this date, e.g. 2026-11-01 or \"3 days\". Older listings are dropped before charging; with \"newest first\" paging stops at the first page that is entirely older."
          },
          "includeKeywords": {
            "title": "Title must mention",
            "type": "array",
            "description": "Optional. Keep only listings whose title mentions at least one of these words (case-insensitive), e.g. \"trek\", \"specialized\". Checked before charging.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Title must not mention",
            "type": "array",
            "description": "Optional. Drop listings whose title mentions any of these words, e.g. \"kids\", \"broken\", \"parts\". Checked before charging. A short word also matches longer ones (\"car\" matches \"cargo\").",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Listing details",
            "type": "boolean",
            "description": "Read each listing's page data too: full description, exact coordinates, condition and attributes, all photos, seller rating and join date, shipping, and vehicle specs (make, model, mileage, transmission, title status). Charged as one extra \"listing-details\" event per listing that got them: $3.00 per 1,000 on Starter, $2.50 on Business. About 5x slower.",
            "default": false
          },
          "onlyNewListings": {
            "title": "Only new listings",
            "type": "boolean",
            "description": "For scheduled runs: deliver only listings this search has not delivered before, plus listings whose price or status changed (marked in changeType, with the previous price). Unchanged listings are skipped and never charged. Works best with \"newest first\".",
            "default": false
          },
          "monitoringStoreName": {
            "title": "Monitoring memory name",
            "type": "string",
            "description": "Name of the key-value store in your account that remembers what each search delivered. Use a different name for independent monitors that share searches.",
            "default": "facebook-marketplace-monitor"
          },
          "resetMonitoring": {
            "title": "Forget what was delivered before",
            "type": "boolean",
            "description": "Start this run with an empty memory: everything found is delivered (and charged) again, and the memory starts over.",
            "default": false
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many listings in total. You pay per listing, so this is also your cost cap for the run.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many listings from any single search (one term in one location, one category, one URL), so one big search cannot use the whole budget.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Keep the default (Apify residential). Facebook answers Marketplace searches only to residential addresses: Apify's own and datacenter addresses are refused on the first request. Residential traffic is included in the price per listing.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at the same time (listing details are read 6 at a time within each search).",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one response before trying another address.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for failed connections when no proxy is used. With a proxy, a refused request moves to a new address instead (up to 6).",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}