{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Scrape Facebook Marketplace search results and listing details, with prices, photos, sellers, locations and item status as clean structured data. Works with Apify MCP and the API.",
    "version": "1.0",
    "x-build-id": "IxvWVQjs4mN712u06"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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 words",
            "type": "array",
            "description": "What to look for, for example bike, sofa, iPhone 15, Toyota Camry. One search per word.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Cities",
            "type": "array",
            "description": "City and state or country, for example Austin, TX or London, UK. Every search runs in every city. The Actor picks the right city (Austin, Texas, not Austin, Illinois).",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Marketplace search links (optional)",
            "type": "array",
            "description": "Paste a Marketplace search or category link from your browser. The search word, price range and city in the link are used.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categoryId": {
            "title": "Category ID (optional)",
            "type": "string",
            "description": "Marketplace category number (digits). Use it to browse a whole category without a search word."
          },
          "itemUrls": {
            "title": "Item links (optional)",
            "type": "array",
            "description": "Direct Marketplace item links to read in full (description, all photos, seller).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "itemIds": {
            "title": "Item IDs (optional)",
            "type": "array",
            "description": "Marketplace item numbers, when you do not have the full link.",
            "items": {
              "type": "string"
            }
          },
          "maxListings": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many listings across all searches and cities. Free plan: 25.",
            "default": 100
          },
          "includeItemDetails": {
            "title": "Add full item details",
            "type": "boolean",
            "description": "Also read each listing in full: description, all photos, attributes, seller rating and member since. Charged per item detail.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new listings and price drops",
            "type": "boolean",
            "description": "Skip listings you already saw in a previous run of the same search. Rows show changeType new or price_drop. Good for schedules.",
            "default": false
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "number",
            "description": "How far around the city to search."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings at or above this price."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Only listings at or below this price."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "suggested",
              "distance_ascend",
              "creation_time_descend",
              "price_ascend",
              "price_descend"
            ],
            "type": "string",
            "description": "Order of results.",
            "default": "suggested"
          },
          "deliveryMethod": {
            "title": "Delivery",
            "enum": [
              "all",
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Local pickup, shipping, or both.",
            "default": "all"
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used_like_new",
              "used_good",
              "used_fair"
            ],
            "type": "string",
            "description": "Item condition.",
            "default": "all"
          },
          "dateListed": {
            "title": "Listed within",
            "enum": [
              "all",
              "last_24_hours",
              "last_7_days",
              "last_30_days"
            ],
            "type": "string",
            "description": "Only listings posted in this period.",
            "default": "all"
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "in_stock",
              "sold",
              "all"
            ],
            "type": "string",
            "description": "Available only (default), sold only, or both.",
            "default": "in_stock"
          },
          "latitude": {
            "title": "Latitude (optional)",
            "type": "number",
            "description": "Search around exact coordinates instead of a city name. Use with longitude."
          },
          "longitude": {
            "title": "Longitude (optional)",
            "type": "number",
            "description": "Use with latitude."
          },
          "includeRawData": {
            "title": "Include raw source data",
            "type": "boolean",
            "description": "Attach the unprocessed source object to each row. Makes the dataset larger.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}