{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper - Any Category & City",
    "description": "Scrape Facebook Marketplace for any category (electronics, vehicles, furniture, property, and more) or by keyword, no login. Pick a category and cities or whole countries from dropdowns (USA, UK, Canada, Australia, Europe, Mexico, Brazil). Returns id, title, price, currency, location, and image.",
    "version": "1.0",
    "x-build-id": "LstwXUYefIRqtYXr2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/swerve~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-swerve-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/swerve~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-swerve-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/swerve~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-swerve-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": {
          "category": {
            "title": "Category",
            "enum": [
              "propertyrentals",
              "propertyforsale",
              "vehicles",
              "electronics",
              "apparel",
              "furniture",
              "home",
              "appliances",
              "garden",
              "tools",
              "toys",
              "sports",
              "pets",
              "instruments",
              "books",
              "family",
              "hobbies",
              "antiques",
              "entertainment",
              "free"
            ],
            "type": "string",
            "description": "Which Facebook Marketplace category to browse. Ignored if you type a keyword below (a keyword searches across all categories). Example: Electronics.",
            "default": "electronics"
          },
          "searchQuery": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Search a specific product across ALL categories. When set, this overrides the Category dropdown above. Example: iPhone 15 Pro, PS5, road bike, IKEA sofa. Leave empty to browse the whole category you picked."
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Pick one or more cities to search (type to filter the list). Each city is swept with a small grid of points (see 'Coverage points per city') to get past Facebook's ~24-per-search limit for logged-out users. Add whole countries below to include all their major cities at once. Example: New York, USA + London, UK.",
            "items": {
              "type": "string",
              "enum": [
                "new-york",
                "los-angeles",
                "chicago",
                "houston",
                "phoenix",
                "philadelphia",
                "san-antonio",
                "san-diego",
                "dallas",
                "miami",
                "atlanta",
                "boston",
                "seattle",
                "denver",
                "washington-dc",
                "san-francisco",
                "las-vegas",
                "austin",
                "london",
                "manchester",
                "birmingham",
                "leeds",
                "glasgow",
                "liverpool",
                "edinburgh",
                "bristol",
                "toronto",
                "montreal",
                "vancouver",
                "calgary",
                "ottawa",
                "edmonton",
                "sydney",
                "melbourne",
                "brisbane",
                "perth",
                "adelaide",
                "dublin",
                "madrid",
                "barcelona",
                "valencia",
                "seville",
                "malaga",
                "berlin",
                "munich",
                "hamburg",
                "frankfurt",
                "cologne",
                "paris",
                "marseille",
                "lyon",
                "toulouse",
                "rome",
                "milan",
                "naples",
                "turin",
                "lisbon",
                "amsterdam",
                "rotterdam",
                "mexico-city",
                "guadalajara",
                "monterrey",
                "sao-paulo",
                "rio-de-janeiro",
                "brasilia",
                "tel-aviv",
                "jerusalem"
              ],
              "enumTitles": [
                "New York, USA",
                "Los Angeles, USA",
                "Chicago, USA",
                "Houston, USA",
                "Phoenix, USA",
                "Philadelphia, USA",
                "San Antonio, USA",
                "San Diego, USA",
                "Dallas, USA",
                "Miami, USA",
                "Atlanta, USA",
                "Boston, USA",
                "Seattle, USA",
                "Denver, USA",
                "Washington DC, USA",
                "San Francisco, USA",
                "Las Vegas, USA",
                "Austin, USA",
                "London, UK",
                "Manchester, UK",
                "Birmingham, UK",
                "Leeds, UK",
                "Glasgow, UK",
                "Liverpool, UK",
                "Edinburgh, UK",
                "Bristol, UK",
                "Toronto, Canada",
                "Montreal, Canada",
                "Vancouver, Canada",
                "Calgary, Canada",
                "Ottawa, Canada",
                "Edmonton, Canada",
                "Sydney, Australia",
                "Melbourne, Australia",
                "Brisbane, Australia",
                "Perth, Australia",
                "Adelaide, Australia",
                "Dublin, Ireland",
                "Madrid, Spain",
                "Barcelona, Spain",
                "Valencia, Spain",
                "Seville, Spain",
                "Malaga, Spain",
                "Berlin, Germany",
                "Munich, Germany",
                "Hamburg, Germany",
                "Frankfurt, Germany",
                "Cologne, Germany",
                "Paris, France",
                "Marseille, France",
                "Lyon, France",
                "Toulouse, France",
                "Rome, Italy",
                "Milan, Italy",
                "Naples, Italy",
                "Turin, Italy",
                "Lisbon, Portugal",
                "Amsterdam, Netherlands",
                "Rotterdam, Netherlands",
                "Mexico City, Mexico",
                "Guadalajara, Mexico",
                "Monterrey, Mexico",
                "Sao Paulo, Brazil",
                "Rio de Janeiro, Brazil",
                "Brasilia, Brazil",
                "תל אביב",
                "ירושלים"
              ]
            },
            "default": [
              "new-york"
            ]
          },
          "countries": {
            "title": "Countries (whole-country sweep)",
            "type": "array",
            "description": "Pick one or more countries (type to filter) to search ALL of that country's listed major cities at once. Combine with specific cities above; duplicates are merged. Example: United States + United Kingdom.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "CA",
                "AU",
                "IE",
                "ES",
                "DE",
                "FR",
                "IT",
                "PT",
                "NL",
                "MX",
                "BR",
                "IL"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Canada",
                "Australia",
                "Ireland",
                "Spain",
                "Germany",
                "France",
                "Italy",
                "Portugal",
                "Netherlands",
                "Mexico",
                "Brazil",
                "Israel"
              ]
            }
          },
          "radiusKm": {
            "title": "Search radius per city (km)",
            "minimum": 1,
            "type": "integer",
            "description": "How far around each city center to search, in kilometers. Larger values pull in nearby suburbs. Example: 12 (default) covers a city and its inner ring; use 20-25 to include the wider metro.",
            "default": 12
          },
          "maxPerCoord": {
            "title": "Max listings per city",
            "minimum": 1,
            "type": "integer",
            "description": "Stop collecting cards from a single city after this many. Facebook serves at most ~24 to logged-out users per search point, so coverage comes from more points/cities. Example: 40. No upper cap.",
            "default": 40
          },
          "matchCityOnly": {
            "title": "Restrict to the exact city name",
            "type": "boolean",
            "description": "Off by default. Each search returns the whole metro area around your city, so Facebook includes nearby suburbs (a New York search also returns Brooklyn, Yonkers, Jersey City). Turn this ON to keep only listings whose own city name matches your selection exactly (this drops the surrounding suburbs).",
            "default": false
          },
          "cityCoveragePoints": {
            "title": "Coverage points per city (property only)",
            "minimum": 1,
            "type": "integer",
            "description": "Only used for the two Property categories, which are searched by coordinate: it sweeps several points across the city to get past Facebook's ~24-per-search limit. Keyword search and all other categories are searched by city and ignore this (they return the city's listings in one request). Example: 5.",
            "default": 5
          },
          "fetchDetails": {
            "title": "Fetch full description per listing (slower)",
            "type": "boolean",
            "description": "When on, opens each listing's detail page to read the FULL description, title, and image. Turning it off is much faster but returns only card-level data (price, city, short title, thumbnail) and an empty description. Example: leave on.",
            "default": true
          },
          "extraCoords": {
            "title": "Extra coordinates (advanced)",
            "type": "array",
            "description": "Search arbitrary points not in the city dropdown. Each entry is { label, lat, lng, radiusKm, countryCode, currency }. lat/lng set the Marketplace location; countryCode (ISO-2, e.g. 'US', 'ES', 'AU') picks the proxy country and currency. Example: { \"label\": \"Valencia\", \"lat\": 39.4699, \"lng\": -0.3763, \"radiusKm\": 12, \"countryCode\": \"ES\" }. countryCode defaults to US."
          },
          "knownDetailIds": {
            "title": "Known listing ids (skip detail fetch)",
            "type": "array",
            "description": "Listing ids you already have full details for (from a previous run). The actor ships these as cheap card-level rows and SKIPS their detail page; only new ids get the (expensive) detail enrichment. Use this on re-scans to cut cost. Leave empty to enrich every listing. Example: [\"1007384061689614\", \"1088244741046904\"]."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Facebook serves a login wall to datacenter IPs and ignores non-local IPs for location. The actor uses Apify RESIDENTIAL proxy and automatically picks each city's country (US for US cities, UK for UK cities, etc.). Leave this as the default unless you have a reason to pin a single proxy country.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}