{
  "openapi": "3.0.1",
  "info": {
    "title": "Faire Scraper - Wholesale Brands, Supplier Leads & Products",
    "description": "Scrape Faire wholesale brands as B2B supplier leads — location, owner, order minimums, lead time, brand values, reviews & product catalog. Filter by category, country & values; monitor mode.",
    "version": "0.1",
    "x-build-id": "rmdzi7Kqlxf26sBzn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~faire-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-faire-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/scrapesage~faire-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-faire-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/scrapesage~faire-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-faire-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to browse on Faire (e.g. \"candles\", \"ceramic mugs\", \"baby clothing\"). Each becomes a Faire search whose brands are collected. Combine with filters below.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Faire category names to browse (use Faire's exact names) — e.g. \"Home Decor\", \"Jewelry\", \"Beauty & Wellness\", \"Food & Drink\", \"Kitchen\", \"Women\", \"Kids & Baby\", \"Pets\", \"Stationery\", \"Bath & Body\". Slugs like \"home-decor\" are auto-title-cased. Or paste a full /category/… or /suppliers/… path.",
            "items": {
              "type": "string"
            }
          },
          "brandValues": {
            "title": "Brand values (facet + filter)",
            "type": "array",
            "description": "Filter to brands with these values. Allowed: women-owned, eco-friendly, hand-made, organic, gives-back, small-batch, not-sold-on-amazon. When browsing a single category with one value, it is also used as a Faire facet.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Any Faire URLs — brand pages (/brand/…), product pages (/product/…), category or search pages. Each is auto-detected and scraped.",
            "items": {
              "type": "string"
            }
          },
          "brandUrls": {
            "title": "Brand URLs or slugs",
            "type": "array",
            "description": "Specific Faire brands to enrich, as full URLs (https://www.faire.com/brand/…) or bare slugs/tokens.",
            "items": {
              "type": "string"
            }
          },
          "brandTokens": {
            "title": "Brand tokens",
            "type": "array",
            "description": "Faire brand tokens (e.g. b_9i29vt7r7q) to enrich directly.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Specific Faire product URLs (or p_… tokens) to scrape as product records — name, retail (MSRP) price, case-pack size, GTIN, sales-insight badges and images.",
            "items": {
              "type": "string"
            }
          },
          "scrapeAllBrands": {
            "title": "Scrape all brands",
            "type": "boolean",
            "description": "Browse Faire's entire brand catalog (10,000+ brands), then apply the filters below. Use with Max results + filters to harvest a large, filtered supplier list.",
            "default": false
          },
          "enrichBrandProfile": {
            "title": "Enrich full brand profile",
            "type": "boolean",
            "description": "Fetch each brand's full profile (owner first name, Instagram, city/state, description, creation year, reorder minimum, review breakdown) — one extra request per brand. Turn OFF for faster/larger sweeps that only need the search-tile fields (name, MOQ, country, lead time, products, reviews, values).",
            "default": true
          },
          "country": {
            "title": "Filter: ships-from / made-in country",
            "type": "string",
            "description": "Keep only brands whose ships-from, made-in, or based-in matches this (e.g. \"United States\", \"US\", \"United Kingdom\")."
          },
          "state": {
            "title": "Filter: state/region",
            "type": "string",
            "description": "Keep only brands based in this state/region (e.g. \"CA\", \"New York\")."
          },
          "minProducts": {
            "title": "Filter: minimum active products",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only brands with at least this many active products.",
            "default": 0
          },
          "keyword": {
            "title": "Filter: keyword match",
            "type": "string",
            "description": "Keep only brands whose name, description, or category contains this text."
          },
          "maxResults": {
            "title": "Max results (brands)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of brand records to return. Set to 0 for no limit (explicit opt-in; use with a run timeout).",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Track brands across runs in a key-value store and output only brands that are new or whose catalog/MOQ changed. Works alongside Apify Schedules.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store for monitor-mode state (lowercase letters, digits, hyphens).",
            "default": "faire-scraper-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Faire is reliably reachable on Apify Residential (the default). Datacenter is occasionally Cloudflare-challenged, so residential is recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}