{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Search Facebook Marketplace by keyword and place and get one row per listing: title, price, currency, city, listing link, photo and posting date. Filter by price, condition, category and recency. No login, no cookies, no browser - and the cheapest Marketplace scraper on the market.",
    "version": "0.1",
    "x-build-id": "Cf3RuFP2Z5R3sbsCD"
  },
  "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": "Only listings the seller marked with these conditions. A single value is the most reliable; several are passed through exactly as the site's own filter sends them. Note that the condition is a filter you can search by, not a column that comes back - Facebook does not publish it in search results.",
            "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. 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": "Search available listings, or sold ones."
          },
          "exactMatch": {
            "title": "Match the phrase strictly",
            "type": "boolean",
            "description": "Make Facebook match your term as a phrase rather than loosely. Useful for a model number or an exact product name."
          },
          "category": {
            "title": "Category id",
            "type": "string",
            "description": "A Facebook Marketplace category id, if you want to narrow the search to one department. Leave empty to search everything."
          },
          "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, place, price range, condition, sort order and category in the URL are all read out of it. Anything you set in the fields above wins over 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": "Sent to Facebook exactly as its own radius filter sends it. Be aware that the public search applies its own catchment around the coordinates: the same search at 2 km and at 500 km returns the same listings. The coordinates, not the radius, decide the search area."
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Leave this empty. The run brings its own egress and its cost is already inside the price you see. Fill it in only if you specifically want the traffic to leave through proxy servers you already pay for, 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=<value>; xs=<value>\". 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}