{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Top Products Scraper",
    "description": "Scrape TikTok Shop best-selling products with revenue (GMV), units sold, average price, growth, the video / live / shop-window split and affiliate commission in 15 markets. Search by keyword, category, shop or creator. Optional daily revenue analytics. JSON, CSV, API.",
    "version": "0.1",
    "x-build-id": "6mBB82qhTmkdRTyLN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~tiktok-shop-top-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-tiktok-shop-top-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/lergassy~tiktok-shop-top-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-tiktok-shop-top-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/lergassy~tiktok-shop-top-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-tiktok-shop-top-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": {
          "keywords": {
            "title": "🔍 Keywords",
            "type": "array",
            "description": "Product search terms, 1-2 words each: \"air fryer\", \"lip gloss\", \"protein\". Every word must appear in the product title; if no title has them all, you get either the closest products marked matchStrict: false or a free notice with no rows. Pass alternatives as separate items. Leave keywords, categories, creators and shopIds all empty to get the overall top products of the country.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Optional. TikTok Shop category names — <b>Beauty & Personal Care</b>, <b>Phones & Electronics</b>, <b>Skincare</b>, <b>Air Fryers</b>. Each one is a separate list of top products; the matched category is in the row.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "👤 Creators",
            "type": "array",
            "description": "Optional. TikTok usernames (<code>@name</code>), profile links or creator IDs: the products of each creator.",
            "items": {
              "type": "string"
            }
          },
          "shopIds": {
            "title": "🏪 Shops",
            "type": "array",
            "description": "Optional. TikTok Shop shop IDs or store links (<code>shop.tiktok.com/us/store/…/7495…</code>): the products of each shop.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "🌍 Country",
            "enum": [
              "US",
              "GB",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "SG",
              "JP",
              "MX",
              "DE",
              "IT",
              "FR",
              "ES",
              "BR"
            ],
            "type": "string",
            "description": "TikTok Shop market as a two-letter code: US, GB (United Kingdom), ID, TH, VN, PH, MY, SG, JP, MX, DE, IT, FR, ES, BR. Revenue is in US dollars for every market.",
            "default": "US"
          },
          "period": {
            "title": "📅 Period",
            "enum": [
              "last30Day",
              "last7Day",
              "lastDay"
            ],
            "type": "string",
            "description": "Sales window for revenue, units sold and growth: \"last30Day\" (default), \"last7Day\" or \"lastDay\" (yesterday).",
            "default": "last30Day"
          },
          "month": {
            "title": "Calendar month",
            "type": "string",
            "description": "Optional, overrides period: one past calendar month as YYYY-MM."
          },
          "sortBy": {
            "title": "↕️ Sort by",
            "enum": [
              "revenue",
              "unitsSold",
              "revenueGrowth",
              "videoRevenue",
              "shopWindowRevenue",
              "commissionRate",
              "price",
              "newest"
            ],
            "type": "string",
            "description": "Order of the list, highest first.",
            "default": "revenue"
          },
          "maxResultsPerSource": {
            "title": "💯 Max products per input",
            "minimum": 25,
            "maximum": 10000,
            "type": "integer",
            "description": "Products to return per keyword, category, creator or shop (or from the overall top list): minimum 25, default 100, maximum 10000. Each product is one billed row; for a quick answer set 25. Duplicates across inputs are skipped and not charged. Free Apify plan: only lists already in our shared cache today, up to 20 rows from each of the first 2 inputs.",
            "default": 100
          },
          "addAnalytics": {
            "title": "📈 Product analytics ($)",
            "type": "boolean",
            "description": "Leave false unless you need per-product analytics. When true, each row is billed at the \"Product with analytics\" price, more than 10 times a plain row. Adds the number of creators, videos and lives selling the product, review count, price range, shop ID, category IDs and delivery type. Not on the free Apify plan. If analytics are paused on our side, rows come as plain rows at the plain price with a notice.",
            "default": false
          },
          "minRevenue": {
            "title": "Minimum revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only rows with at least this revenue in the period. 0 = no floor.",
            "default": 0
          },
          "maxRevenue": {
            "title": "Maximum revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no ceiling.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no floor.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no ceiling.",
            "default": 0
          },
          "ascending": {
            "title": "Lowest first",
            "type": "boolean",
            "description": "Reverse the order: lowest values first.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}