{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace [$1.5💰] Get newest items ASAP",
    "description": "💰$1.50 per 1,000 Unlock valuable insights from Facebook Marketplace effortlessly – perfect for market research, price tracking, and competitor analysis, all while staying anonymous.",
    "version": "0.0",
    "x-build-id": "ZyKjBL9UmBix9ss10"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~facebook-marketplace-scraper-ppe/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-facebook-marketplace-scraper-ppe",
        "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/memo23~facebook-marketplace-scraper-ppe/runs": {
      "post": {
        "operationId": "runs-sync-memo23-facebook-marketplace-scraper-ppe",
        "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/memo23~facebook-marketplace-scraper-ppe/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-facebook-marketplace-scraper-ppe",
        "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": {
          "startUrls": {
            "title": "URLs of the Marketplace search pages to scrape",
            "type": "array",
            "description": "Paste one or more Facebook Marketplace URLs such as `'https://www.facebook.com/marketplace/nyc/search/?query=sleeper%20trucks'`.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Keyword to search",
            "type": "string",
            "description": "Search term to use when building a Marketplace search URL."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "best_match",
              "creation_time_descend",
              "price_ascend",
              "price_descend",
              "distance_ascend"
            ],
            "type": "string",
            "description": "Sort order used when building the Marketplace search.",
            "default": "best_match"
          },
          "daysSinceListed": {
            "title": "Days Since Listed",
            "enum": [
              "0",
              "1",
              "7",
              "30"
            ],
            "type": "string",
            "description": "Preset age filter matching the reference repo.",
            "default": "0"
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "in stock",
              "out of stock"
            ],
            "type": "string",
            "description": "Availability filter used when building the Marketplace search.",
            "default": "in stock"
          },
          "deliveryMethod": {
            "title": "Delivery",
            "enum": [
              "all",
              "local_pick_up",
              "shipping"
            ],
            "type": "string",
            "description": "Delivery filter used when building the Marketplace search.",
            "default": "all"
          },
          "conditionNew": {
            "title": "Condition: New",
            "type": "boolean",
            "description": "Include new items in the generated Marketplace URL.",
            "default": false
          },
          "conditionUsedLikeNew": {
            "title": "Condition: Used - like new",
            "type": "boolean",
            "description": "Include used-like-new items in the generated Marketplace URL.",
            "default": false
          },
          "conditionUsedGood": {
            "title": "Condition: Used - good",
            "type": "boolean",
            "description": "Include used-good items in the generated Marketplace URL.",
            "default": false
          },
          "conditionUsedFair": {
            "title": "Condition: Used - fair",
            "type": "boolean",
            "description": "Include used-fair items in the generated Marketplace URL.",
            "default": false
          },
          "minPrice": {
            "title": "Min. Price",
            "type": "integer",
            "description": "Minimum listing price for the generated Marketplace URL.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max. Price",
            "type": "integer",
            "description": "Maximum listing price for the generated Marketplace URL.",
            "default": 0
          },
          "countryPreset": {
            "title": "Country preset",
            "enum": [
              "",
              "usa",
              "usa_full",
              "can",
              "mex",
              "bra",
              "arg",
              "aus",
              "nzl",
              "ind",
              "gbr",
              "fra",
              "spa"
            ],
            "type": "string",
            "description": "Optional nationwide preset based on the reference repo. When selected, the actor generates multiple Marketplace URLs that cover the chosen country. Leave this empty to use a single Marketplace location below.",
            "default": ""
          },
          "marketplaceLocation": {
            "title": "Marketplace location",
            "type": "string",
            "description": "Marketplace location slug such as `phoenix`, `nyc`, `prague`, or `melbourne`. This is used for a single generated URL when no country preset is selected."
          },
          "radiusKm": {
            "title": "Search radius (km)",
            "type": "integer",
            "description": "Search radius in kilometers for the generated Marketplace URL.",
            "default": 200
          },
          "exact": {
            "title": "Exact search",
            "type": "boolean",
            "description": "If checked, Facebook will try to match the search query more exactly when the generated URL is used.",
            "default": false
          },
          "categoryId": {
            "title": "Category ID (advanced)",
            "type": "string",
            "description": "Optional Facebook Marketplace category ID to append as `category_id` in the generated URL."
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Optional latitude for precise pinned-location searches. Provide longitude too."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Optional longitude for precise pinned-location searches. Provide latitude too."
          },
          "includeSeller": {
            "title": "Include Seller data and more details about the item",
            "type": "boolean",
            "description": "If checked, the scraper will try to open the item page and scrape more data about the item.",
            "default": false
          },
          "flattenOutput": {
            "title": "Flatten output for easier use",
            "type": "boolean",
            "description": "If checked, the actor will export a cleaner, flatter dataset with top-level fields like title, description, location, and pricing. Leave it off to keep the current response format for existing integrations.",
            "default": false
          },
          "monitoringMode": {
            "title": "Run in monitoring mode where only newly items compared to previous runs will be scraped",
            "type": "boolean",
            "description": "If checked, it will only scrape newly items compared to what has been scraped in previous runs.",
            "default": false
          },
          "preciseLocation": {
            "title": "Precise location filtering",
            "type": "boolean",
            "description": "If checked, the scraper will enforce strict geo-filtering. It will use latitude/longitude from the URL (e.g. &latitude=39.04&longitude=-77.49&radius=65) instead of coordinates inferred by Facebook from the proxy IP. Results whose location falls outside the requested radius will be discarded. Recommended when Facebook redirects away from the city slug and returns listings from the wrong region.",
            "default": false
          },
          "locationResultsMode": {
            "title": "How should location be handled?",
            "enum": [
              "maximize_results",
              "mark_far_results",
              "only_nearby_results"
            ],
            "type": "string",
            "description": "Choose whether to keep as many Facebook results as possible, keep them but mark far-away ones, or only keep listings that fall inside the resolved search radius after checking item detail pages.",
            "default": "maximize_results"
          },
          "cookies": {
            "title": "Cookies",
            "type": "array",
            "description": "Optional Facebook cookies exported from a browser extension such as EditThisCookie. If provided, the actor will sanitize and reuse them for both URL-based searches and filter-generated searches."
          },
          "maxItems": {
            "title": "Maximum items per crawl",
            "type": "integer",
            "description": "Maximum number of items that will be scraped per crawl.",
            "default": 100
          },
          "minDelay": {
            "title": "Min delay for API call",
            "type": "integer",
            "description": "Minimum delay to wait before calling the new items from API.",
            "default": 5
          },
          "maxDelay": {
            "title": "Max delay for API call",
            "type": "integer",
            "description": "Maximum delay to wait before calling the new items from API",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "type": "integer",
            "description": "Maximum number of pages that can be processed at the same time.",
            "default": 10
          },
          "minConcurrency": {
            "title": "Min Concurrency",
            "type": "integer",
            "description": "Minimum number of pages that will be processed at the same time.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max Request Retries",
            "type": "integer",
            "description": "Number of times the crawler will retry a failed request before giving up. Keep this low (5-10) so a single deterministic error cannot burn the entire run timeout on retries.",
            "default": 10
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}