{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace : Listing Location Details Scraper",
    "description": "Facebook Marketplace Scraper extracts listings from Facebook Marketplace, capturing titles, prices, photos, locations, seller info, descriptions, and timestamps. Ideal for product research, price tracking, lead generation, and automating structured Marketplace data collection at scale.",
    "version": "0.1",
    "x-build-id": "7XmtAVXWMu99rATXZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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": {
          "cities": {
            "title": "🏙️ Cities to scan",
            "type": "array",
            "description": "One search per city. Accepts city names/slugs (e.g. \"Seattle\", \"Los Angeles\") or full Marketplace URLs. Combined with the search term below. Every row is tagged with the exact cityQueried value. Example: [\"seattle\", \"portland\"].",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "🔎 Search term",
            "type": "string",
            "description": "Keyword searched in each city above (e.g. \"bike\", \"iphone\", \"sofa\"). Ignored for entries in Cities that are already full Marketplace URLs. Example: searchQuery=\"bike\" + cities=[\"seattle\"] scans bikes in Seattle."
          },
          "centerLatitude": {
            "title": "📍 Center latitude",
            "type": "number",
            "description": "Re-point every search to this latitude (overrides the city page's own center). Pair with Center longitude + Radius. Also drives the per-row distanceKm. Example: 47.6062 (Seattle). Leave empty to use each city's default center."
          },
          "centerLongitude": {
            "title": "📍 Center longitude",
            "type": "number",
            "description": "Re-point every search to this longitude (overrides the city page's own center). Pair with Center latitude + Radius. Example: -122.3321 (Seattle). Leave empty to use each city's default center."
          },
          "radiusKm": {
            "title": "🎯 Search radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far around the center to include listings, in kilometres. Applied to every search. Example: 40 = a 40 km catchment. Default is the page/FB default when empty."
          },
          "includeAreaSummary": {
            "title": "📊 Add per-city summary rows",
            "type": "boolean",
            "description": "When on, appends one aggregate row per city (type=\"area_summary\") with listingCount, avgPrice, minPrice and maxPrice. Great for comparing market density and pricing across territories. Default is false.",
            "default": false
          },
          "maxListingsPerArea": {
            "title": "🔢 Max listings per city",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on listings collected per city/URL; 0 = everything FB returns. Accepts the base `count` too. Example: 30 keeps runs quick. Default is 50."
          },
          "fullDetail": {
            "title": "🧩 Full listing detail",
            "type": "boolean",
            "description": "ON: visits each listing page for descriptions, attributes and exact coordinates (richer, slower). OFF: fast search-snippet rows. Accepts the base `deepScrape` too. Default is ON."
          },
          "areaSearchUrls": {
            "title": "🧭 Direct territory search links",
            "type": "array",
            "description": "Optional power-user input. Drop in ready-made Facebook Marketplace search URLs to scan exact territories directly, instead of (or alongside) the Cities fan-out above. Each pasted URL becomes its own area and its rows carry cityQueried=null. The base `urls` field is still accepted for backward compatibility. Example: https://www.facebook.com/marketplace/108479165840750/search/?query=bike",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify Proxy preferences. This actor always runs on residential IPs for reliability; region hints here are honoured where possible."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}