{
  "openapi": "3.0.1",
  "info": {
    "title": "Bstock Deal Finder",
    "description": "Monitors B-Stock's live liquidation marketplace and ranks auction lots by deal quality — bid/MSRP ratio, competition level, and time urgency. Built for resellers, arbitrage buyers, and AI agents.",
    "version": "0.0",
    "x-build-id": "N9zu1NktH1WyawZtv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phmlabs~bstock-deal-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phmlabs-bstock-deal-finder",
        "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/phmlabs~bstock-deal-finder/runs": {
      "post": {
        "operationId": "runs-sync-phmlabs-bstock-deal-finder",
        "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/phmlabs~bstock-deal-finder/run-sync": {
      "post": {
        "operationId": "run-sync-phmlabs-bstock-deal-finder",
        "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": {
          "maxBidToMsrpRatio": {
            "title": "Max Bid/MSRP Ratio",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only return lots where current bid is at or below this fraction of retail price. E.g. 0.3 = bids under 30% of MSRP."
          },
          "maxUniqueBidders": {
            "title": "Max Unique Bidders",
            "minimum": 0,
            "type": "integer",
            "description": "Only return lots with this many unique bidders or fewer. Filters out highly contested lots."
          },
          "closingWithinHours": {
            "title": "Closing Within (hours)",
            "minimum": 1,
            "type": "integer",
            "description": "Only return lots closing within this many hours. Leave empty for all."
          },
          "location": {
            "title": "Location (State Code)",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Filter by US state code, e.g. KY, FL, CA. Leave empty for all locations."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Filter by product categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Apparel Shoes & Accessories",
                "Automotive Supplies",
                "Books Movies & Music",
                "Building & Industrial",
                "Cell Phones",
                "Electronics",
                "Furniture",
                "Groceries",
                "Health & Beauty",
                "Home & Garden",
                "Jewelry & Watches",
                "Major Appliances",
                "Mixed Lots",
                "Office Supplies & Equipment",
                "Pets",
                "Small Appliances",
                "Sports & Outdoors",
                "Toys Kids & Baby"
              ]
            },
            "default": []
          },
          "retailers": {
            "title": "Retailers / Storefronts",
            "type": "array",
            "description": "Filter by retailer. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Ace Hardware",
                "Advance Auto Parts",
                "Almo Liquidation Auctions",
                "Amazon",
                "Amazon UK",
                "Best Buy",
                "Big 5 Sporting Goods",
                "Brisco Brands",
                "DICKS Sporting Goods",
                "Disney Europe",
                "Electrolux / Frigidaire",
                "Essendant",
                "Ferguson",
                "GE Appliances",
                "Get Live",
                "Harmon",
                "HSN",
                "JCPenney",
                "Kohler",
                "Lowes",
                "Mabe",
                "Mobile Carrier",
                "NFM",
                "Petco",
                "QVC",
                "Royal Closeouts",
                "Samsung Mobile",
                "Ski-Doo Sea-Doo",
                "SquareTrade",
                "Target",
                "Tesla",
                "The Home Depot",
                "Veyer",
                "Walmart",
                "Wayfair Liquidation Auctions",
                "Winston Water Cooler",
                "Wireless Network"
              ]
            },
            "default": []
          },
          "conditions": {
            "title": "Conditions",
            "type": "array",
            "description": "Filter by item condition. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Brand New",
                "Like New",
                "Used Good",
                "Used Fair",
                "Mixed",
                "Salvage",
                "Scratch & Dent",
                "Device Grade A",
                "Device Grade B",
                "Device Grade C",
                "Device Grade D",
                "Device Grade E",
                "Unspecified"
              ]
            },
            "default": []
          },
          "inventoryTypes": {
            "title": "Inventory Types",
            "type": "array",
            "description": "Filter by inventory type. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Overstock",
                "Customer Returns",
                "B-Stock Blue",
                "Mixed/Other",
                "Parts Only",
                "Warehouse Damaged"
              ]
            },
            "default": []
          },
          "minDealScore": {
            "title": "Min Deal Score (Alert Mode)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Only output lots with a deal score at or above this threshold (0–100). Leave empty to return all results ranked by score."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "recommended",
              "endTime"
            ],
            "type": "string",
            "description": "Field to sort results by when fetching from the API.",
            "default": "recommended"
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Sort direction for API results.",
            "default": "asc"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of listings to fetch before filtering and scoring.",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies recommended to avoid blocks.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}