{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper — Listings by City, Price, Date",
    "description": "Facebook Marketplace scraper by city: name a city and a keyword and get its listings as rows — link, title, price and the crossed-out price, listed date, city and state, photo, category, mileage, delivery, sold/pending/live. Optional details: the description and every photo. No start fee.",
    "version": "1.0",
    "x-build-id": "cyVNCGc87bXXzcWAF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyfetch~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyfetch-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/steadyfetch~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyfetch-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/steadyfetch~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyfetch-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",
            "type": "array",
            "description": "Cities to search, one per line. A name like \"Austin, Texas\" or \"Seattle, Washington\" is looked up for you; a bare \"30.27,-97.74\" latitude/longitude pair skips that lookup entirely. A name Facebook cannot place leaves one uncharged row naming the city and the run carries on with the rest of the list — the lookup it cost is on us, not on you. Leave this empty and press Start for the built-in sample: nothing is searched on Facebook and there is no result fee.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search keyword",
            "type": "string",
            "description": "What to search for in each city — \"bicycle\", \"ikea desk\", \"f150\". Leave it empty for the city's own Marketplace feed. Facebook fuzzy-matches a keyword, so a misspelt word comes back with loosely-related listings rather than nothing: check the first few titles before scaling a run up.",
            "default": ""
          },
          "maxListings": {
            "title": "Max listings for the whole run",
            "type": "integer",
            "description": "Hard ceiling on delivered listing rows for the WHOLE run, across every city — not a limit per city. Exact: ask for 20 and 20 arrive. Asking for more than 5000 is clamped to 5000, and the clamp itself is never charged. Also answers to `maxItems`, `limit` and `maxResults` — the names other Marketplace scrapers use — and the smallest one present binds, with one uncharged note row saying which name was read.",
            "default": 100
          },
          "radiusKm": {
            "title": "Search radius in km",
            "type": "integer",
            "description": "How far around each city to search. Default 60. Anything outside 1–500 is clamped into that range and the clamp is never charged; one uncharged note row says what you typed and what the run used.",
            "default": 60
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "integer",
            "description": "Lowest price to return, in whole currency units, passed straight to the search. Leave it empty for no floor. Listings the band drops are never delivered and never charged."
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "integer",
            "description": "Highest price to return, in whole currency units, passed straight to the search. Leave it empty for no ceiling. If it ends up below the minimum, the run reads the two the other way round rather than returning nothing, and says so on one uncharged note row."
          },
          "condition": {
            "title": "Condition",
            "type": "string",
            "description": "Only listings in this condition. \"any\" sends no condition filter at all. A value this actor does not offer is refused on one uncharged row naming the values that work, and the run uses \"any\" rather than quietly searching a different condition.",
            "default": "any"
          },
          "daysSinceListed": {
            "title": "Listed within",
            "type": "string",
            "description": "Only listings posted inside this window. \"any\" sends no date filter. This is applied by Facebook on the search, so a narrow window buys fewer pages — it is the field a daily schedule sets. A value this actor does not offer is refused on one uncharged row naming the windows that work.",
            "default": "any"
          },
          "deliveryMethod": {
            "title": "Delivery method",
            "type": "string",
            "description": "Only listings the seller will hand over this way. \"any\" sends no delivery filter. A value this actor does not offer is refused on one uncharged row naming the values that work.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "The order Facebook returns the search in. A value this actor does not offer is refused on one uncharged row naming the orders that work, and the run uses \"best_match\" — a swapped order returns billed rows that look exactly like the ones you asked for, so it is never substituted behind your back.",
            "default": "best_match"
          },
          "availability": {
            "title": "Availability",
            "type": "string",
            "description": "\"available\" returns listings still for sale; \"sold\" returns sold ones. They are separate requests and the default never mixes them. `isSold` and `isPending` are on every row either way.",
            "default": "available"
          },
          "includeListingDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "ON adds one Listing details row per delivered listing: the seller's full description text, every photo, the attributes such as condition, the real currency code, the listing's own approximate latitude and longitude, the availability wording, the share link, and whether shipping, Buy Now and messaging are offered. Charged as one Listing details unit per row delivered, $0.012 on the Apify free plan and from $0.005 on paid plans. A listing taken down before its details are read leaves one uncharged row saying so, and the listing row above it still stands and states its own charge.",
            "default": false
          },
          "skipListingsAlreadyDelivered": {
            "title": "Skip listings you already have",
            "type": "boolean",
            "description": "ON (default): a listing already delivered to your account is skipped before anything is reserved or bought — no row, no charge — and the next new listing takes its place, so you still get the number you asked for. OFF: those listings are collected and delivered again, and charged again, which is what you want when you are watching a price change. Listings older than 90 days in your account's memory count as new again either way.",
            "default": true
          },
          "memoryKey": {
            "title": "Memory name",
            "type": "string",
            "description": "Which memory this run reads and writes. Leave it empty and it is derived from the cities, the keyword and the filters, so a scheduled run keeps its own memory by itself and two different schedules never eat each other's. Set it to share one memory across several different searches, or to give one job a memory of its own.",
            "default": ""
          },
          "maxUnresolvableCities": {
            "title": "Max unplaceable cities",
            "type": "integer",
            "description": "How many city names Facebook fails to place before the run stops trying to place any more. Default 3. Set it to 0 to never look a name up at all, which suits a run that sends only \"latitude,longitude\" pairs. Anything outside 0–20 is clamped into that range and the clamp is never charged. Every name the cap stops leaves its own uncharged row saying so.",
            "default": 3
          },
          "maxRunSeconds": {
            "title": "Max run seconds",
            "type": "integer",
            "description": "The run stops cleanly before this many seconds and reports what is left, instead of being killed by a timeout. Anything outside 30–3600 is clamped into that range and the clamp is never charged. Never charged for the listings it did not reach — they ship as uncharged rows naming the clock.",
            "default": 1800
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}