{
  "openapi": "3.0.1",
  "info": {
    "title": "StockX Scraper",
    "description": "Scrape StockX, sneakers, apparel, accessories, electronics, collectibles, trading cards. Search by query, brand, or category, fetch by product slug, get prices, last-sale data, and sales history. Multi-currency.",
    "version": "1.0",
    "x-build-id": "4WWKCxCgIL5Ox5OHh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~stockx-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-stockx-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/crawlerbros~stockx-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-stockx-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/crawlerbros~stockx-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-stockx-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byBrand",
              "byCategory",
              "byProduct",
              "byUrl",
              "salesHistory"
            ],
            "type": "string",
            "description": "What to fetch from StockX.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query, e.g. 'jordan 4 retro', 'yeezy 350', 'rolex submariner'.",
            "default": "jordan"
          },
          "brand": {
            "title": "Brand (mode=byBrand)",
            "enum": [
              "nike",
              "jordan",
              "adidas",
              "yeezy",
              "new-balance",
              "asics",
              "puma",
              "reebok",
              "converse",
              "vans",
              "supreme",
              "off-white",
              "fear-of-god",
              "essentials",
              "bape",
              "stussy",
              "kith",
              "palace",
              "anti-social-social-club",
              "louis-vuitton",
              "gucci",
              "dior",
              "chanel",
              "hermes",
              "balenciaga",
              "prada",
              "burberry",
              "fendi",
              "rolex",
              "omega",
              "audemars-piguet",
              "patek-philippe",
              "casio",
              "tag-heuer",
              "cartier",
              "sony",
              "apple",
              "microsoft",
              "samsung",
              "nintendo",
              "lego",
              "funko",
              "bearbrick",
              "kaws",
              "pokemon",
              "topps",
              "panini",
              "upper-deck",
              "hello-kitty",
              "labubu",
              "sanrio"
            ],
            "type": "string",
            "description": "Brand slug. Used as both browse path and search constraint.",
            "default": "jordan"
          },
          "category": {
            "title": "Category (mode=byCategory)",
            "enum": [
              "sneakers",
              "apparel",
              "accessories",
              "electronics",
              "collectibles",
              "trading-cards",
              "watches"
            ],
            "type": "string",
            "description": "StockX top-level category.",
            "default": "sneakers"
          },
          "productSlugs": {
            "title": "Product slugs (mode=byProduct or mode=salesHistory)",
            "type": "array",
            "description": "StockX product URL slugs, e.g. ['air-jordan-4-retro-white-cement-2025']. Take from the URL after stockx.com/.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Direct URLs (mode=byUrl)",
            "type": "array",
            "description": "Direct StockX URLs (search, browse, or product pages).",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "JPY",
              "AUD",
              "CAD",
              "CHF",
              "HKD",
              "SGD",
              "MXN"
            ],
            "type": "string",
            "description": "Currency for prices. StockX serves localized prices per region; we hint via the Accept-Currency header.",
            "default": "USD"
          },
          "country": {
            "title": "Country / Region",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "JP",
              "AU",
              "CA",
              "CH",
              "HK",
              "SG",
              "MX"
            ],
            "type": "string",
            "description": "Region code. Drives the proxy country and Accept-Region header.",
            "default": "US"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "featured",
              "most_active",
              "recently_released",
              "price_high_to_low",
              "price_low_to_high"
            ],
            "type": "string",
            "description": "Sort applied to search/browse results.",
            "default": "featured"
          },
          "minPrice": {
            "title": "Minimum price (lowest ask)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop products with lowest-ask below this value (in selected currency)."
          },
          "maxPrice": {
            "title": "Maximum price (lowest ask)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop products with lowest-ask above this value (in selected currency)."
          },
          "fetchProductDetails": {
            "title": "Fetch product detail pages",
            "type": "boolean",
            "description": "When true, follow each search result to its product page for richer data (last sale, retail price, release date, etc.). When false, emit only the search-card record. Default off — product pages are heavily protected and slow.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 25
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum pages of search/browse results to walk. Each page returns up to 40 products.",
            "default": 5
          },
          "useProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "When true (recommended), routes via Apify residential proxy. StockX blocks datacenter IPs aggressively.",
            "default": true
          },
          "useBrowser": {
            "title": "Force browser (Camoufox) tier",
            "type": "boolean",
            "description": "Skip the HTTP tiers and go straight to Camoufox + residential proxy. Slower (browser launch overhead) but most reliable when StockX's edge tier is hostile to even chrome131-impersonated curl_cffi.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is mandatory for cloud runs. StockX uses Cloudflare + edge-network bot-detection that flags Apify datacenter IPs (Hetzner, OVH, AWS, GCP) within a handful of requests. RESIDENTIAL is the default group; we also use a sticky session id so warmup -> listing -> PDP shares the same egress IP.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}