{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper - Listings, Prices, Sold Flag",
    "description": "Search Facebook Marketplace by keyword and city. One row per listing: title, price, any price cut, town, link, photo, posted date and sold status. Narrow it by price range and days listed, or change the sort order. About 24 listings a search. No login needed from you. $0.40 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "jPedLe0MlScs5PvJD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": {
          "searchTerms": {
            "title": "Search terms",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "What to look for on Marketplace. Up to 10 terms per run; the row budget below is shared evenly between them.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Where to search. A plain city name works (\"Austin, TX\", \"Manchester\", \"Toronto\"), so does a Marketplace city slug (\"nyc\", \"la\", \"sanfrancisco\"), and so does a raw \"latitude,longitude\" pair. Marketplace search is local, so this is required unless you set the coordinates below or paste a URL that carries them."
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total listings to return across all search terms. The budget is shared evenly between the terms, so four terms and 40 rows gives you ten of each. Keep it low while you are testing - you pay per row."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or above this price, in the currency of the place you are searching. Leave empty for no lower bound."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or below this price, in the currency of the place you are searching. Leave empty for no upper bound."
          },
          "condition": {
            "title": "Item condition",
            "minItems": 0,
            "maxItems": 4,
            "type": "array",
            "description": "Not applied at the moment. The search runs as if this were empty, so picking a condition does not narrow the listings that come back. It stays on the form so saved tasks that send it keep working. Facebook does not show an item's condition in search results, so there is no condition column in the output either.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "used_like_new",
                "used_good",
                "used_fair"
              ],
              "enumTitles": [
                "New",
                "Used - like new",
                "Used - good",
                "Used - fair"
              ]
            }
          },
          "daysSinceListed": {
            "title": "Listed within the last N days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only listings posted in the last N days, from 1 to 30. Facebook counts whole days, so a row's postedAt can be a little older than N days. Used together with a sort order, some searches come back empty. Leave empty for all listings."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "best_match",
              "newest",
              "price_low_to_high",
              "price_high_to_low",
              "distance"
            ],
            "type": "string",
            "description": "How Facebook should order the results. Defaults to its own relevance ranking."
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "available",
              "sold"
            ],
            "type": "string",
            "description": "Not applied at the moment. The search runs as if this were empty, so choosing Sold does not narrow the listings that come back: you get what is for sale now, and isSold is false on nearly every row. It stays on the form so saved tasks that send it keep working."
          },
          "exactMatch": {
            "title": "Match the phrase strictly",
            "type": "boolean",
            "description": "Not applied at the moment. The search runs as if this box were unticked, so Facebook matches your term the loose way whatever you choose here. It stays on the form so saved tasks that send it keep working."
          },
          "category": {
            "title": "Category id",
            "type": "string",
            "description": "Not applied at the moment. The search runs as if this were empty, so a category id does not narrow the listings that come back. To keep to one kind of item, say it in the search term. It stays on the form so saved tasks that send it keep working."
          },
          "startUrls": {
            "title": "Marketplace search URLs",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Marketplace search URLs copied straight from your browser, for example https://www.facebook.com/marketplace/nyc/search?query=road%20bike&minPrice=100. Up to 10 per run. The term, the place, the price range, the days-listed limit and the sort order are taken from the URL. A condition, category, radius, availability or exact-phrase setting in the URL is ignored, just as those fields are on this form, and so is a delivery method. Each URL is searched in the city it names, so URLs for different cities can share a run. A URL whose city the run can't place (a numeric Facebook location id, for example) falls back to the run's own location, and a free NO_LOCATION row says so. A filter you set in the fields above wins over the same filter in the URL.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Centre the search on these exact coordinates instead of a place name, for example 30.2672. Set both latitude and longitude, or neither."
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Centre the search on these exact coordinates instead of a place name, for example -97.7431. Set both latitude and longitude, or neither."
          },
          "radiusKm": {
            "title": "Search radius in km",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Not applied at the moment. The search runs as if this were empty, and Facebook decides how wide to look around the place you give: an Austin search can bring back towns more than 100 km away. It stays on the form so saved tasks that send it keep working."
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Leave this empty for a normal run. Fill it in only if you want the traffic to leave through proxy servers you already pay for, one URL per line, in the form http://user:pass@host:port.",
            "items": {
              "type": "string"
            }
          },
          "sessionCookies": {
            "title": "Your own account cookies (optional)",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Leave this empty unless you need it. Runs are logged out by default and that is enough for public Facebook content. Facebook shows some things only to a signed-in account, and it limits how fast any one account may read; supplying your own cookie uses your account and your own rate limit, shared with nobody. In Chrome: open facebook.com while signed in, press F12, then Application > Cookies > https://www.facebook.com, and paste the values as \"c_user=…; xs=…\". One line per account. Treat these like a password: anyone with them can act as that account, and Facebook may sign the session out or restrict the account for automated use.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}