{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Shop Reviews Scraper",
    "description": "Scrape TikTok Shop product reviews by product URL, product ID, or shop URL. Returns review text, rating, date, author, photos, and product context per row.",
    "version": "0.0",
    "x-build-id": "GdBc6RASpdfSsAMfx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lurkapi~tiktok-shop-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lurkapi-tiktok-shop-reviews-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/lurkapi~tiktok-shop-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lurkapi-tiktok-shop-reviews-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/lurkapi~tiktok-shop-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lurkapi-tiktok-shop-reviews-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": {
          "urls": {
            "title": "Product or shop URLs",
            "type": "array",
            "description": "Scrape reviews from product URLs (tiktok.com/shop/pdp/...) or shop URLs (tiktok.com/shop/s/SHOP_ID). Mix both; each is auto-detected. @username links aren't supported; use a URL with the numeric shop ID.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Scrape reviews for specific products by ID. The product ID is the 18-19 digit number in any product URL (e.g. 1731349100249977343). One per line.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerTarget": {
            "title": "Max reviews per product",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on reviews returned per product. No upper limit; TikTok itself stops serving the public feed somewhere around 2,000-2,400 reviews per product.",
            "default": 50
          },
          "maxProductsPerShop": {
            "title": "Max products per shop",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "When a shop URL is provided, this caps how many of the shop's products will have their reviews scraped. Product URL inputs ignore this cap.",
            "default": 5
          },
          "sortBy": {
            "title": "Sort reviews by",
            "enum": [
              "newest",
              "recommended"
            ],
            "type": "string",
            "description": "How to order the reviews returned. 'newest' picks the most recent first; 'recommended' uses TikTok's relevance ranking (tends to surface higher-quality reviews with photos first).",
            "default": "newest"
          },
          "starRating": {
            "title": "Star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Limit reviews to one specific star rating (1 to 5). Use 0 (default) to return reviews of any rating.",
            "default": 0
          },
          "withPhotosOnly": {
            "title": "Only reviews with photos",
            "type": "boolean",
            "description": "Return only reviews that have at least one attached photo.",
            "default": false
          },
          "country": {
            "title": "TikTok Shop region",
            "enum": [
              "US"
            ],
            "type": "string",
            "description": "The regional storefront to scrape. The United States is the only region available today.",
            "default": "US"
          },
          "outputRating": {
            "title": "Output: rating",
            "type": "boolean",
            "description": "Include the star rating (1 to 5).",
            "default": true
          },
          "outputContent": {
            "title": "Output: review text",
            "type": "boolean",
            "description": "Include the review body text.",
            "default": true
          },
          "outputTimestamp": {
            "title": "Output: review date",
            "type": "boolean",
            "description": "Include the ISO timestamp of when the review was posted.",
            "default": true
          },
          "outputAuthorHandle": {
            "title": "Output: author handle",
            "type": "boolean",
            "description": "Include the reviewer's TikTok handle (privacy-masked by TikTok for most reviews).",
            "default": true
          },
          "outputAuthorName": {
            "title": "Output: author display name",
            "type": "boolean",
            "description": "Include the reviewer's display name when different from the handle.",
            "default": true
          },
          "outputAuthorAvatar": {
            "title": "Output: author avatar",
            "type": "boolean",
            "description": "Include the URL of the reviewer's profile photo.",
            "default": true
          },
          "outputAuthorVerified": {
            "title": "Output: verified-purchase flag",
            "type": "boolean",
            "description": "Include whether the review is from a verified purchase.",
            "default": true
          },
          "outputAuthorCountry": {
            "title": "Output: author country",
            "type": "boolean",
            "description": "Include the country the review was posted from.",
            "default": true
          },
          "outputImages": {
            "title": "Output: review photos",
            "type": "boolean",
            "description": "Include the array of photo URLs attached to the review.",
            "default": true
          },
          "outputSkuId": {
            "title": "Output: SKU ID",
            "type": "boolean",
            "description": "Include the ID of the specific variant/SKU the reviewer bought.",
            "default": true
          },
          "outputProductTitle": {
            "title": "Output: product title",
            "type": "boolean",
            "description": "Include the title of the product the review is for.",
            "default": true
          },
          "outputProductMainImage": {
            "title": "Output: product main image",
            "type": "boolean",
            "description": "Include the URL of the product's main image.",
            "default": true
          },
          "outputProductUrl": {
            "title": "Output: product URL",
            "type": "boolean",
            "description": "Include the canonical TikTok Shop URL of the product.",
            "default": true
          },
          "outputSourceShopId": {
            "title": "Output: shop ID",
            "type": "boolean",
            "description": "Include the ID of the shop selling the product.",
            "default": true
          },
          "outputInputUrl": {
            "title": "Output: source input URL",
            "type": "boolean",
            "description": "Include the URL or input the row was discovered from (the product URL, shop URL, or synthesized product URL for raw IDs).",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}