{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok & Instagram Reels Trends Scraper - Viral Videos",
    "description": "Get today's trending TikTok videos by country, popular TikTok creators and trending Instagram Reels with views, likes, audio, hashtags and a daily trend rank.",
    "version": "1.0",
    "x-build-id": "Tn1lBwAgbnvrLs1Mb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seemuapps~tiktok-instagram-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seemuapps-tiktok-instagram-trends-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/seemuapps~tiktok-instagram-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-seemuapps-tiktok-instagram-trends-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/seemuapps~tiktok-instagram-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-seemuapps-tiktok-instagram-trends-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",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "What to collect",
            "type": "array",
            "description": "Pick one or more trend feeds. Every row has the same columns, so a mixed run exports cleanly to CSV or Google Sheets. Use the 'source' column to split them.",
            "items": {
              "type": "string",
              "enum": [
                "tiktokVideos",
                "instagramReels",
                "tiktokCreators"
              ],
              "enumTitles": [
                "Trending TikTok videos",
                "Trending Instagram Reels",
                "Popular TikTok creators"
              ]
            },
            "default": [
              "tiktokVideos",
              "instagramReels"
            ]
          },
          "tiktokRegions": {
            "title": "TikTok countries",
            "type": "array",
            "description": "2-letter country codes (US, GB, JP, BR, DE, ...). The feed is fetched once per country, as a viewer in that country would see it. Each country gets its own trend rank.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxTiktokVideosPerRegion": {
            "title": "Max videos per country",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique trending videos for each country. 0 = keep going until the feed stops returning new videos (bounded by the stop settings below).",
            "default": 50
          },
          "includeTiktokPhotoPosts": {
            "title": "Include photo carousel posts",
            "type": "boolean",
            "description": "TikTok's trending feed mixes in photo slideshows. Untick to keep only videos.",
            "default": true
          },
          "onlyLocalTiktokVideos": {
            "title": "Only videos from creators in that country",
            "type": "boolean",
            "description": "The feed for a country also contains global hits. Tick this to keep only videos whose creator is registered in the selected country (see the contentCountry column). Fewer results per request. Local-only videos are billed at a higher per-result rate (see the Pricing tab), because many more requests are needed per kept video.",
            "default": false
          },
          "maxInstagramReels": {
            "title": "Max Reels",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many unique trending Reels. Each request returns a small batch that overlaps earlier ones, so the actor keeps asking and removes duplicates. 0 = keep going until no new Reels show up.",
            "default": 50
          },
          "maxCreators": {
            "title": "Max creators",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many popular creators. 0 = all pages available for your filters.",
            "default": 50
          },
          "creatorCountry": {
            "title": "Creator country",
            "enum": [
              "any",
              "AU",
              "BR",
              "CA",
              "EG",
              "FR",
              "DE",
              "ID",
              "IL",
              "IT",
              "JP",
              "MY",
              "PH",
              "RU",
              "SA",
              "SG",
              "KR",
              "ES",
              "TW",
              "TH",
              "TR",
              "AE",
              "GB",
              "US",
              "VN"
            ],
            "type": "string",
            "description": "Only creators based in this country. Leave on 'Any country' for a global list.",
            "default": "any"
          },
          "audienceCountry": {
            "title": "Audience country",
            "enum": [
              "any",
              "AU",
              "BR",
              "CA",
              "EG",
              "FR",
              "DE",
              "ID",
              "IL",
              "IT",
              "JP",
              "MY",
              "PH",
              "RU",
              "SA",
              "SG",
              "KR",
              "ES",
              "TW",
              "TH",
              "TR",
              "AE",
              "GB",
              "US",
              "VN"
            ],
            "type": "string",
            "description": "Only creators whose followers are mainly in this country. Useful for finding creators who reach your market.",
            "default": "any"
          },
          "creatorFollowerRange": {
            "title": "Follower range",
            "enum": [
              "any",
              "10K-100K",
              "100K-1M",
              "1M-10M",
              "10M+"
            ],
            "type": "string",
            "description": "Only creators within this follower range.",
            "default": "any"
          },
          "creatorSortBy": {
            "title": "Sort creators by",
            "enum": [
              "engagement",
              "follower",
              "avg_views"
            ],
            "type": "string",
            "description": "How popular creators are ranked.",
            "default": "engagement"
          },
          "stopAfterCallsWithoutNew": {
            "title": "Stop after N low-yield requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Trending feeds return a fresh, overlapping batch on every request, and later requests repeat more and more earlier items. A feed stops once this many requests in a row add fewer than 5 new items.",
            "default": 3
          },
          "maxCallsPerFeed": {
            "title": "Max requests per feed",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on requests for each feed (each TikTok country, the Reels feed and the creators list). Keeps runs with a 0 limit bounded.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}