{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Scraper: Stores, Products, Prices, Sales",
    "description": "Scrape TikTok Shop stores, products and categories (US and UK): the whole catalog of a store past the 20 products its page shows, with the announced count next to the returned count. Product pages with variants and stock, new-product and price-change watch, webhook.",
    "version": "0.1",
    "x-build-id": "FczexlPX5ZJLQNe6y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-tiktok-shop-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/alexmorain~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-tiktok-shop-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/alexmorain~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-tiktok-shop-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": {
          "startUrls": {
            "title": "TikTok Shop URLs",
            "type": "array",
            "description": "One URL per line.<br>• Store: <code>https://shop.tiktok.com/us/store/shop-name/7495992422530583306</code> or <code>https://www.tiktok.com/shop/store/shop-name/7495992422530583306</code><br>• Product: <code>https://www.tiktok.com/shop/pdp/product-name/1732049122233848586</code> (always returns the full product page)<br>• Category: <code>https://shop.tiktok.com/us/c/home-supplies/600001</code> (the products TikTok lists on the category page)<br>The market (<code>us</code> or <code>gb</code>) is read from a <code>shop.tiktok.com/gb/...</code> URL, else from Market.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Market",
            "enum": [
              "us",
              "gb"
            ],
            "type": "string",
            "description": "Market for URLs that do not carry one (<code>www.tiktok.com/shop/...</code>). A <code>shop.tiktok.com/gb/...</code> URL keeps its own. Prices come in the market's currency. On the UK market TikTok serves only the first 20 products of a store; categories and product pages are read in full.",
            "default": "us"
          },
          "includeDetails": {
            "title": "Read each product page",
            "type": "boolean",
            "description": "Adds description, all images, categories, specifications, variants with stock, shipping, rating breakdown and recent reviews to each product (Product with details event, higher price). A product page TikTok does not serve is returned as a plain product and charged as one.",
            "default": false
          },
          "includeSubcategories": {
            "title": "Also read subcategories",
            "type": "boolean",
            "description": "For category URLs: also read each direct subcategory page. A category page lists only the ~10 to 17 products TikTok shows on it.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stops after this many products in total. Empty or 0 = no limit: a large store has tens of thousands of products, so set a limit or a maximum charge per run when you test."
          },
          "maxItemsPerSource": {
            "title": "Max items per URL",
            "minimum": 0,
            "type": "integer",
            "description": "Stops each store or category after this many products. Empty or 0 = no limit."
          },
          "monitorMode": {
            "title": "Monitoring",
            "enum": [
              "off",
              "newOnly",
              "newAndPriceChanges"
            ],
            "type": "string",
            "description": "<b>New products only</b> returns only products not returned by an earlier run with the same input (and monitor name). <b>New and price changes</b> also returns products whose price moved, with <code>previousPrice</code> and <code>priceChange</code> (up / down). Unchanged products are neither returned nor charged. The first run returns everything. State is kept in a store named <code>tiktok-shop-scraper-monitor</code> in your account.",
            "default": "off"
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Runs with the same name and the same input share one memory; change it to start a separate watch on the same store."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. A JSON summary is POSTed here when the run ends with at least one product. Slack and Discord incoming webhooks work. Redirects are not followed (except 307 / 308)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}