{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Sellers: Revenue, Units & Shop Rankings",
    "description": "Rank TikTok Shop stores by revenue or units in 15 markets, or look one up by name or store link. Each shop has 1, 7, 30 and 90 day revenue, local or cross-border, video or LIVE, rating, followers and product count, in USD.",
    "version": "0.0",
    "x-build-id": "aJJayQSi1QHUqgdl8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~tiktok-shop-sellers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-tiktok-shop-sellers",
        "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/memo23~tiktok-shop-sellers/runs": {
      "post": {
        "operationId": "runs-sync-memo23-tiktok-shop-sellers",
        "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/memo23~tiktok-shop-sellers/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-tiktok-shop-sellers",
        "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": {
          "market": {
            "title": "Market",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "BR",
              "JP",
              "MX",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "SG"
            ],
            "type": "string",
            "description": "Which TikTok Shop country to rank, for example US or GB. Default US. Money columns are in US dollars for all 15 countries.",
            "default": "US"
          },
          "period": {
            "title": "Sales period",
            "enum": [
              "lastDay",
              "last7Days",
              "last30Days",
              "allTime"
            ],
            "type": "string",
            "description": "Window copied into revenue and unitsSold. Every row also carries the 1, 7, 30 and 90 day and lifetime figures. The ranking itself follows lifetime revenue, units or average price.",
            "default": "last30Days"
          },
          "sortBy": {
            "title": "Rank by",
            "enum": [
              "revenue",
              "unitsSold",
              "avgPrice"
            ],
            "type": "string",
            "description": "Highest first, by lifetime revenue, lifetime units sold, or average product price.",
            "default": "revenue"
          },
          "searchTerms": {
            "title": "Shop names",
            "type": "array",
            "description": "Shops whose name contains every word, for example <b>medicube</b> or <b>goli nutrition</b>. Leave every list empty to rank the whole market.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Top shops of a TikTok Shop category: Beauty & Personal Care, Health, Household Appliances, Home Supplies, Kitchenware, Womenswear & Underwear, Menswear & Underwear, Phones & Electronics, Sports & Outdoor, Toys & Hobbies, Pet Supplies, Baby & Maternity, Food & Beverages, Fashion Accessories, Textiles & Soft Furnishings, Automotive & Motorcycle, Tools & Hardware, Home Improvement, Computers & Office Equipment, Luggage & Bags, Shoes, Furniture, Books, Magazines & Audio, Kids' Fashion, Jewelry Accessories & Derivatives, Collectibles, Pre-Owned, Muslim Fashion. A numeric category id works too.",
            "items": {
              "type": "string"
            }
          },
          "shops": {
            "title": "Shops",
            "type": "array",
            "description": "Specific shops: a store link such as https://shop.tiktok.com/us/store/medicube-us-store/7495514739648989419, or just the numeric shop id.",
            "items": {
              "type": "string"
            }
          },
          "maxShops": {
            "title": "Shops per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit for the market, each category, each shop name or each store link. The same shop found twice is delivered once.",
            "default": 50
          },
          "minRevenue": {
            "title": "Minimum revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Revenue in the sales period. Leave empty for no floor."
          },
          "minUnitsSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Units sold in the sales period."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Shop rating from 1 to 5."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "local",
              "crossBorder"
            ],
            "type": "string",
            "description": "Local sellers or cross-border sellers.",
            "default": "any"
          },
          "mainChannel": {
            "title": "Main sales channel",
            "enum": [
              "any",
              "video",
              "live"
            ],
            "type": "string",
            "description": "Shops that sell mainly through videos or mainly through LIVE streams.",
            "default": "any"
          },
          "risingOnly": {
            "title": "Rising sales only",
            "type": "boolean",
            "description": "Only shops whose sales went up over the last 7 days.",
            "default": false
          },
          "brandOnly": {
            "title": "Brand shops only",
            "type": "boolean",
            "description": "Only shops marked as a brand store.",
            "default": false
          },
          "salesHistory": {
            "title": "Daily sales history",
            "enum": [
              "off",
              "7",
              "30",
              "90"
            ],
            "type": "string",
            "description": "Adds a <code>salesHistory</code> list to every shop: one entry per day with that day's units sold and revenue, the running totals, products listed, and how many videos, lives and creators were selling for it. Charged per 10 days delivered ($0.003), so 30 days cost up to $0.009 per shop. Needs a paid Apify plan. Default: off.",
            "default": "off"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}