{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Marketplace Scraper",
    "description": "Scrape public Facebook Marketplace listings by keyword, category, city or URL: prices, discounts, condition, photos, location, seller and vehicle details, with location checking and only-new monitoring. No Facebook login or cookies needed.",
    "version": "1.0",
    "x-build-id": "KgtzaRncE76CofUVR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~facebook-marketplace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-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/coregent~facebook-marketplace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-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/coregent~facebook-marketplace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "SEARCH",
              "CATEGORY",
              "URL",
              "LISTING",
              "MONITOR"
            ],
            "type": "string",
            "description": "SEARCH: keywords in one or more cities. CATEGORY: browse whole categories (e.g. Vehicles) in one or more cities — to search keywords inside a category, use SEARCH and pick categories. URL: Marketplace search, category or listing URLs you copied from Facebook — the filters in the URL are kept. LISTING: specific listings by ID or URL. MONITOR: repeat a saved search and return only listings that are new since the last run (needs a monitor key).",
            "default": "SEARCH"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "SEARCH / MONITOR: what to search for, e.g. \"iphone 15\", \"dining table\", \"toyota camry\". Each term is searched in each location (and each category, if you pick any). Not used in CATEGORY mode. Up to 25 terms.",
            "default": [
              "iphone 15"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "CATEGORY mode: the categories to browse. SEARCH / MONITOR: optional — narrows the search terms to these categories. Leave empty to search everything.",
            "items": {
              "type": "string",
              "enum": [
                "VEHICLES",
                "PROPERTY_RENTALS",
                "PROPERTY_FOR_SALE",
                "ELECTRONICS",
                "FURNITURE",
                "HOME",
                "HOME_IMPROVEMENT",
                "GARDEN",
                "APPAREL",
                "FAMILY",
                "TOYS",
                "HOBBIES",
                "ENTERTAINMENT",
                "SPORTING_GOODS",
                "MUSICAL_INSTRUMENTS",
                "OFFICE_SUPPLIES",
                "PET_SUPPLIES",
                "CLASSIFIEDS",
                "FREE"
              ],
              "enumTitles": [
                "Vehicles",
                "Property for rent",
                "Property for sale",
                "Electronics",
                "Furniture",
                "Home goods",
                "Home improvement supplies",
                "Garden and outdoors",
                "Clothing",
                "Family",
                "Toys and games",
                "Hobbies",
                "Entertainment",
                "Sporting goods",
                "Musical instruments",
                "Office supplies",
                "Pet supplies",
                "Classifieds",
                "Free stuff"
              ]
            },
            "default": []
          },
          "marketplaceUrls": {
            "title": "Marketplace URLs",
            "type": "array",
            "description": "URL mode (and MONITOR): Marketplace search or category URLs, e.g. https://www.facebook.com/marketplace/nyc/search?query=bicycle&maxPrice=300 — filters in the URL are kept. Listing URLs (facebook.com/marketplace/item/<id>/) are fetched as single listings. Up to 100.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingIds": {
            "title": "Listing IDs",
            "type": "array",
            "description": "LISTING mode: numeric Marketplace listing IDs (the number in facebook.com/marketplace/item/<id>/) or listing URLs. Each is returned with full details. Up to 1,000.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities to search in, e.g. \"New York\", \"Sydney\", \"London\", \"Austin, TX\". Big cities resolve directly to their Marketplace page; other places are looked up through Facebook's own place search, and every row records which place was used and how confident the match is. You can also give a Marketplace city ID or \"latitude,longitude\". A location that cannot be resolved returns a LOCATION_NOT_RESOLVED status row instead of another city's listings. Required for SEARCH, CATEGORY and MONITOR. Up to 25.",
            "default": [
              "New York"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (optional)",
            "type": "string",
            "description": "Two-letter country code (US, AU, GB, CA, DE …). Helps pick the right place for ambiguous names (Manchester, Springfield, Newcastle) and names the currency when Facebook shows a bare \"$\".",
            "default": ""
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Optional search radius around the location, in kilometres. Facebook's default is about 65 km."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. In the local currency of the location. No currency conversion is done."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. In the local currency of the location."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. USED means any used condition (like new, good, fair).",
            "items": {
              "type": "string",
              "enum": [
                "NEW",
                "LIKE_NEW",
                "GOOD",
                "FAIR",
                "USED"
              ],
              "enumTitles": [
                "New",
                "Used – like new",
                "Used – good",
                "Used – fair",
                "Any used"
              ]
            },
            "default": []
          },
          "listedWithin": {
            "title": "Listed within",
            "enum": [
              "ANY",
              "24_HOURS",
              "7_DAYS",
              "30_DAYS"
            ],
            "type": "string",
            "description": "Only listings posted in the last day, week or month. Note: Facebook returns nothing when this is combined with a price sort, so a price sort is dropped (with a warning) when this is set.",
            "default": "ANY"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "NEWEST",
              "PRICE_ASC",
              "PRICE_DESC",
              "DISTANCE"
            ],
            "type": "string",
            "description": "Facebook's own result order. MONITOR mode always uses Newest first.",
            "default": "RELEVANCE"
          },
          "maxListingsPerSearch": {
            "title": "Maximum listings per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most unique listings to save for EACH search (term × location × category). Two terms in two cities at 20 can return up to 80 rows. Facebook may run out sooner. In MONITOR mode this is how many listings each check reads. You are charged only for listings delivered.",
            "default": 20
          },
          "includeListingDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "Read each listing's page for the full description, condition, category, exact coordinates, seller (join year, rating) and vehicle details (make, model, year, mileage, transmission, fuel…). Off = search-card data only (title, price, city, time, photo, seller name) — faster and charged as a listing result only.",
            "default": true
          },
          "maxDetailsToEnrich": {
            "title": "Maximum listings to enrich",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap on how many listings get full details across the run; the rest are returned with search-card data. 0 = every listing.",
            "default": 0
          },
          "includeAllPhotos": {
            "title": "Include all photos",
            "type": "boolean",
            "description": "Return every photo URL of each enriched listing, not just the main one. Photo URLs only — images are not downloaded.",
            "default": false
          },
          "includeSellerDetails": {
            "title": "Include seller details",
            "type": "boolean",
            "description": "Public seller fields only: name, ID, picture, type, Facebook join year and rating where shown.",
            "default": true
          },
          "includeVehicleDetails": {
            "title": "Include vehicle details",
            "type": "boolean",
            "description": "Structured vehicle fields for vehicle listings (needs listing details). Never guessed from the title.",
            "default": true
          },
          "includeCoordinates": {
            "title": "Include coordinates",
            "type": "boolean",
            "description": "Latitude and longitude of each enriched listing, as published by Facebook.",
            "default": true
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "MONITOR mode: a name for this saved search, e.g. \"iphone-sydney\". The Actor remembers which listings it has seen under this key, so schedule the same input and each run returns only new listings. The first run (or a run after you change the term, location, category or filters) records a baseline and returns nothing unless you enable the next option."
          },
          "emitBaselineListings": {
            "title": "Return listings on the baseline run",
            "type": "boolean",
            "description": "On a monitor's first run, also return the listings that are already there (marked BASELINE_LISTING). Off = the first run only records them.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Searches in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run at the same time. Pages of one search are always read in order.",
            "default": 3
          },
          "detailConcurrency": {
            "title": "Listing details in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many listing pages are read at the same time across the run.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Residential proxy is on by default and required on Apify: Facebook refuses Marketplace data from Apify datacenter addresses, so a datacenter selection is switched to Residential. Its bandwidth is included in the listing-detail price. To use your own provider, enter it under Custom proxy URLs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}