{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Trending Products Scraper",
    "description": "Find trending products on any public Shopify store: best-seller collections, new arrivals, sold-out variants, discounts and cross-store duplicates in one explainable Trend Score. History between runs, HTML dashboard, 79 curated stores.",
    "version": "1.0",
    "x-build-id": "scRr9Nl0a2aeGaler"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~shopify-trending-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-shopify-trending-products-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/badr_xba~shopify-trending-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-shopify-trending-products-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/badr_xba~shopify-trending-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-shopify-trending-products-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": {
          "storeUrls": {
            "title": "Shopify stores",
            "type": "array",
            "description": "Store domains or URLs, one per line, e.g. <code>colourpop.com</code>, <code>https://www.deathwishcoffee.com</code> or <code>brand.myshopify.com</code>. A collection URL (<code>/collections/best-sellers</code>) reads only that collection; a product URL reads only that product. Non-Shopify sites, password-protected stores and stores whose robots.txt disallows the product endpoints are reported in FAILED_INPUTS and never charged.",
            "items": {
              "type": "string"
            }
          },
          "seedCategories": {
            "title": "Curated store categories",
            "type": "array",
            "description": "Optional. Add well-known public Shopify stores from these categories (79 stores, verified to allow product JSON in robots.txt). Combined with your own stores, up to <i>Maximum stores</i>.",
            "items": {
              "type": "string",
              "enum": [
                "fashion",
                "beauty",
                "home",
                "fitness",
                "pets",
                "electronics",
                "food",
                "jewelry",
                "kids",
                "outdoor"
              ],
              "enumTitles": [
                "Fashion",
                "Beauty",
                "Home",
                "Fitness",
                "Pets",
                "Gadgets & electronics",
                "Food & drink",
                "Jewelry & accessories",
                "Kids & baby",
                "Outdoor"
              ]
            },
            "default": []
          },
          "maxStores": {
            "title": "Maximum stores",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Stop after this many stores (your own stores first, then curated ones).",
            "default": 10
          },
          "maxProductsPerStore": {
            "title": "Maximum products per store",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Products read per store. Products from best-seller / trending / featured / new-arrival collections are read first, then the rest of the catalog (250 per request). Larger values give better price and cross-store comparisons but take longer: stores are read politely, 1 request per second.",
            "default": 250
          },
          "maxItems": {
            "title": "Maximum products to save",
            "minimum": 0,
            "type": "integer",
            "description": "Total products saved to the dataset (and charged), after filters and sorting. <code>0</code> = no limit.",
            "default": 100
          },
          "minTrendScore": {
            "title": "Minimum Trend Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only products with at least this Trend Score (0–100). 50+ = moderate, 70+ = promising (needs at least 2 independent signal groups), 90+ = strong (3+ groups). Products below are not saved and not charged.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "trendScore",
              "priceAsc",
              "priceDesc",
              "discountDesc",
              "newest",
              "recentlyDetected",
              "growth"
            ],
            "type": "string",
            "description": "Order of the saved products. <i>Strongest measured growth</i> uses changes between runs (needs history).",
            "default": "trendScore"
          },
          "includeCollections": {
            "title": "Collections to read",
            "enum": [
              "curated",
              "all",
              "off"
            ],
            "type": "string",
            "description": "<b>Curated</b> (recommended): read the store's best-seller, trending, featured, new-arrival and seasonal collections, which power the merchant-curation signal and positions. <b>All</b>: also read other collections to list each product's collections (more requests). <b>Off</b>: catalog only (weaker Trend Score).",
            "default": "curated"
          },
          "maxCollectionsPerStore": {
            "title": "Maximum collections per store",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Collections read per store (one request each, first 250 products in merchant order).",
            "default": 8
          },
          "useHistory": {
            "title": "Track history between runs",
            "type": "boolean",
            "description": "Save a compact snapshot of each store in a named key-value store so the next run can detect new products, variants selling out, price moves and rank changes in best-seller collections. Schedule the Actor daily to get growth signals.",
            "default": true
          },
          "historyStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Name of the key-value store that keeps the snapshots (letters, digits, dashes). Use different names to keep separate histories.",
            "default": "shopify-trending-history"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep products whose title, tags, type, vendor or description contain at least one of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop products containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Product categories",
            "type": "array",
            "description": "Keep products of these categories. The category is derived from product type, tags, collections or title (see <code>categorySource</code>).",
            "items": {
              "type": "string",
              "enum": [
                "Fashion",
                "Beauty",
                "Home",
                "Fitness",
                "Pets",
                "Electronics",
                "Food & Drink",
                "Jewelry & Accessories",
                "Kids & Baby",
                "Outdoor",
                "Health & Wellness"
              ]
            },
            "default": []
          },
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Keep products whose Shopify product type contains one of these texts, e.g. <code>Hoodie</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vendors": {
            "title": "Vendors / brands",
            "type": "array",
            "description": "Keep products of these vendors.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Keep products having at least one of these merchant tags (exact tag, any case).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "In the store currency, or in <i>Price filter currency</i> when set."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "In the store currency, or in <i>Price filter currency</i> when set."
          },
          "priceCurrency": {
            "title": "Price filter currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "NZD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "BGN",
              "TRY",
              "ISK",
              "JPY",
              "CNY",
              "HKD",
              "SGD",
              "KRW",
              "INR",
              "IDR",
              "MYR",
              "PHP",
              "THB",
              "ILS",
              "ZAR",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "Optional. Compare prices of stores in different currencies by converting them to this currency with the ECB reference rates (estimate)."
          },
          "minDiscountPercent": {
            "title": "Minimum discount %",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep products whose price is at least this % below the compare-at price."
          },
          "onlyAvailable": {
            "title": "Only products in stock",
            "type": "boolean",
            "description": "Keep only products with at least one available variant.",
            "default": false
          },
          "createdWithinDays": {
            "title": "Listed within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep products whose date (see <i>Date used</i>) is within this many days."
          },
          "createdAfter": {
            "title": "Listed after",
            "type": "string",
            "description": "Keep products listed on or after this date."
          },
          "createdBefore": {
            "title": "Listed before",
            "type": "string",
            "description": "Keep products listed on or before this date."
          },
          "dateField": {
            "title": "Date used for date filters",
            "enum": [
              "publishedAt",
              "createdAt",
              "updatedAt"
            ],
            "type": "string",
            "description": "<b>Published</b> = when the product went on sale in the online store (falls back to created), <b>Created</b> = when it was created in Shopify admin, <b>Updated</b> = last change.",
            "default": "publishedAt"
          },
          "currencies": {
            "title": "Store currencies",
            "type": "array",
            "description": "Analyse only stores selling in these currencies, e.g. <code>USD</code>, <code>GBP</code>. Other stores are skipped after one request.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Store countries",
            "type": "array",
            "description": "Analyse only stores based in these countries (2-letter codes from the store's public /meta.json, e.g. <code>US</code>, <code>GB</code>, <code>AU</code>).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeNonProducts": {
            "title": "Skip gift cards and shipping protection",
            "type": "boolean",
            "description": "Skip gift cards, shipping protection add-ons, donations, gift wrap and free gifts. They are not saved and not charged.",
            "default": true
          },
          "includeVariants": {
            "title": "Include variants",
            "type": "boolean",
            "description": "Add every variant (id, title, SKU, barcode, price, compare-at price, availability, options, weight in grams, requires shipping, variant image) to each row.",
            "default": false
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Add the product description as plain text (HTML removed, max 1,500 characters).",
            "default": true
          },
          "convertCurrencyTo": {
            "title": "Convert prices to",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "NZD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "BGN",
              "TRY",
              "ISK",
              "JPY",
              "CNY",
              "HKD",
              "SGD",
              "KRW",
              "INR",
              "IDR",
              "MYR",
              "PHP",
              "THB",
              "ILS",
              "ZAR",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "Optional. Adds <code>priceConverted</code> in this currency, using the European Central Bank daily reference rate (estimate for comparison, with the rate date)."
          },
          "maxConcurrency": {
            "title": "Stores in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many stores are read at the same time. Each store still gets at most 2 parallel requests and at least 1 second between requests (more if its robots.txt sets a Crawl-delay).",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Time limit for one request.",
            "default": 30
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries on timeouts, network errors, 5xx and 429 (honouring Retry-After), with exponential backoff and jitter. Bot challenges and password pages are never retried or bypassed.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most stores (public JSON endpoints). Off by default.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}