{
  "openapi": "3.0.1",
  "info": {
    "title": "(NEW) TikTok Shop Scraper – Products, Sales, Prices & Stores",
    "description": "Scrape TikTok Shop products, stores, categories and search in the US, UK, Singapore, Malaysia, Philippines, Thailand and Vietnam. Get price, sold count, rating, variants, stock, seller stats and reviews. No login. Pay only for products returned.",
    "version": "0.0",
    "x-build-id": "Gnw5rPhX9mVICdVVK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/harshmaur~tiktok-shop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-harshmaur-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/harshmaur~tiktok-shop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-harshmaur-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/harshmaur~tiktok-shop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-harshmaur-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 or product IDs",
            "type": "array",
            "description": "Any TikTok Shop link: a product page (tiktok.com/shop/pdp/…), a store page (tiktok.com/shop/store/…), a category page (tiktok.com/shop/c/…) or a search page (shop.tiktok.com/us/s?q=…). You can also paste a bare 19-digit product ID. A link that names a country (for example /sg/) uses that country; other links use the Market below.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Search TikTok Shop for each keyword, as a shopper would. Each keyword returns up to 'Max products per source'. Not available in the UK store: use UK category or store links.",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "🌏 Market",
            "enum": [
              "us",
              "gb",
              "sg",
              "my",
              "ph",
              "th",
              "vn"
            ],
            "type": "string",
            "description": "The TikTok Shop country for keywords, bare product IDs and links that do not name a country. Prices, stock and search results are those of this market.",
            "default": "us"
          },
          "maxProductsPerSource": {
            "title": "#️⃣ Max products per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most products to take from EACH keyword, store or category. Product links are always scraped. TikTok shows about 50–300 products per keyword and about 100 per category; stores return their full catalogue.",
            "default": 50
          },
          "scrapeProductDetails": {
            "title": "📦 Scrape full product details",
            "type": "boolean",
            "description": "On: open every product page for variants, stock, description, specifications, shipping, seller stats, the star rating breakdown and the first reviews. Off: return only the product cards from search, store and category pages (faster and cheaper).",
            "default": true
          },
          "searchSort": {
            "title": "↕️ Search sort order",
            "enum": [
              "relevance",
              "best_selling",
              "price_low_to_high",
              "price_high_to_low",
              "newest"
            ],
            "type": "string",
            "description": "How keyword results are ordered. When a keyword runs out of results in this order, the actor continues with the other orders to reach your maximum.",
            "default": "relevance"
          },
          "mcpConnector": {
            "title": "Send results to an app (MCP connector)",
            "type": "string",
            "description": "Pick an authorized MCP connector (Slack, Notion, Airtable, Google Sheets, …) to receive the products. Your credentials stay in Apify and are never exposed to this actor (Apify's proxy injects them). Leave empty to scrape only. Tip: schedule a store or keyword to log prices and sold counts in your workspace."
          },
          "mcpMode": {
            "title": "Delivery mode",
            "enum": [
              "perPost",
              "summary"
            ],
            "type": "string",
            "description": "perPost: one message or record per product. summary: a single digest of the whole run.",
            "default": "perPost"
          },
          "mcpTarget": {
            "title": "Target page / database / channel",
            "type": "string",
            "description": "Where to write — the destination ID the tool needs: a Notion database/page ID, a Google Sheet ID, or a Slack channel. Leave blank for connectors that post to a default location. Advanced shapes go in Arguments JSON below."
          },
          "mcpMessage": {
            "title": "Message template",
            "type": "string",
            "description": "Template for each message. Use {{field}} placeholders from any product field — common ones: {{title}}, {{priceText}}, {{price}}, {{currency}}, {{soldCount}}, {{rating}}, {{reviewCount}}, {{market}}, {{url}}. Missing fields render empty.",
            "default": "*{{title}}* — {{priceText}} · {{soldCount}} sold\n{{url}}"
          },
          "mcpTool": {
            "title": "Tool override (advanced)",
            "type": "string",
            "description": "Force a specific tool name on the connector (e.g. send_message, create_page, append_row). Leave empty to auto-detect the connector's write/notify tool."
          },
          "mcpArguments": {
            "title": "Tool arguments override (advanced)",
            "type": "object",
            "description": "Extra/override arguments merged into each tool call as JSON — e.g. {\"channel\": \"#tiktok-shop\"} for Slack. {{field}} placeholders work inside string values too, so you can nest live data into any shape — e.g. Notion: {\"properties\": {\"Title\": {\"title\": [{\"text\": {\"content\": \"{{title}}\"}}]}, \"Link\": {\"url\": \"{{url}}\"}}}."
          },
          "mcpMaxItems": {
            "title": "Max products to send",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on how many products are piped to the connector per run (perPost mode). Protects against flooding the destination.",
            "default": 50
          },
          "mcpServerUrl": {
            "title": "MCP server URL (dev / diagnostic)",
            "type": "string",
            "description": "Advanced/testing only. Connect directly to a raw MCP server URL, bypassing the connector above. For real use prefer a connector — your credentials then stay in Apify. When set, this overrides the connector."
          },
          "mcpServerToken": {
            "title": "MCP server token (dev / diagnostic)",
            "type": "string",
            "description": "Bearer token for the dev MCP server URL above. A token entered here IS visible to the actor at runtime — for production use an MCP Connector instead. Ignored unless the URL is set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}