{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Videos: Revenue & Units Sold per Video, 15 Markets",
    "description": "Find the TikTok Shop videos that sell the most in 15 markets: a whole market, category, search term, product, shop or creator. Each row has the video's revenue and units sold, views and engagement, the creator, and the products it sells with title and price, in USD. JSON, CSV or API.",
    "version": "0.0",
    "x-build-id": "KDfM819Dgvbvx8P0U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~tiktok-shop-videos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-tiktok-shop-videos",
        "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-videos/runs": {
      "post": {
        "operationId": "runs-sync-memo23-tiktok-shop-videos",
        "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-videos/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-tiktok-shop-videos",
        "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 read, for example US or GB (default US). Revenue is converted to US dollars for all 15 countries.",
            "default": "US"
          },
          "period": {
            "title": "Ranking period",
            "enum": [
              "yesterday",
              "lastWeek",
              "lastMonth"
            ],
            "type": "string",
            "description": "For the whole-market and category rankings: the day, the week (Monday to Sunday) or the calendar month whose sales rank the videos. Each row's revenue and units sold are for that window. Search terms, products, shops and creators give each video's lifetime sales instead.",
            "default": "lastWeek"
          },
          "sortBy": {
            "title": "Order by",
            "enum": [
              "revenue",
              "unitsSold",
              "views"
            ],
            "type": "string",
            "description": "Highest first. Revenue and units sold are the video's own sales, not the product's.",
            "default": "revenue"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Videos selling products whose title contains every word of the term, for example <b>air fryer</b>, <b>lip oil</b>, <b>creatine</b>. Leave every input empty for the best-selling videos of the whole market.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Best-selling videos for products in 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"
            }
          },
          "products": {
            "title": "Products",
            "type": "array",
            "description": "The videos selling one product: a product link such as https://www.tiktok.com/view/product/1729628429519393456 or https://shop.tiktok.com/us/pdp/name/1729628429519393456, or just the numeric product id.",
            "items": {
              "type": "string"
            }
          },
          "shops": {
            "title": "Shops",
            "type": "array",
            "description": "The videos selling a shop's products: a store link such as https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079, or just the numeric shop id.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators",
            "type": "array",
            "description": "A creator's selling videos: a TikTok @username, a profile link such as https://www.tiktok.com/@dealswithty, or a numeric user id.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Videos per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit for each search term, category, product, shop or creator (or for the whole-market ranking). A video found by two inputs is delivered once.",
            "default": 50
          },
          "pastMonth": {
            "title": "Past month",
            "pattern": "^$|^\\d{4}-\\d{2}$",
            "type": "string",
            "description": "Optional, replaces the ranking period: a finished month such as <b>2026-09</b>, for the market or the categories above."
          },
          "includeProductDetails": {
            "title": "Add product titles and prices",
            "type": "boolean",
            "description": "Each row lists the products the video sells. On: with title, average price, link and image. Off: product ids and links only.",
            "default": true
          },
          "minRevenue": {
            "title": "Minimum revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "The video's revenue in the row's period."
          },
          "minUnitsSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Units the video sold in the row's period."
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Lifetime views of the video."
          },
          "postedWithinDays": {
            "title": "Posted in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos posted this recently. Leave empty for any age."
          },
          "aiContent": {
            "title": "AI-generated content",
            "enum": [
              "any",
              "aiOnly",
              "noAi"
            ],
            "type": "string",
            "description": "Keep or drop videos TikTok labels as AI-generated.",
            "default": "any"
          },
          "format": {
            "title": "Post format",
            "enum": [
              "any",
              "video",
              "photo"
            ],
            "type": "string",
            "description": "Regular videos or photo carousel posts.",
            "default": "any"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}