{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Top Ads Monitor: New Ads by Industry",
    "description": "Daily monitor of TikTok Creative Center Top Ads: new ads per country, industry and objective with CTR, likes, landing page and video links, no login.",
    "version": "0.2",
    "x-build-id": "6w7XzCwTT82JP2nei"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~tiktok-top-ads-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-tiktok-top-ads-monitor",
        "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/datagrit~tiktok-top-ads-monitor/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-tiktok-top-ads-monitor",
        "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/datagrit~tiktok-top-ads-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-tiktok-top-ads-monitor",
        "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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries whose Top Ads ranking to read. Use two-letter codes or names. Each country is read separately and the same ad found in several lists is returned once. Available: AR Argentina, AU Australia, BR Brazil, CA Canada, CO Colombia, FR France, DE Germany, ID Indonesia, IT Italy, JP Japan, MY Malaysia, MX Mexico, NL Netherlands, PK Pakistan, PH Philippines, RO Romania, SA Saudi Arabia, SG Singapore, ZA South Africa, KR South Korea, ES Spain, SE Sweden, TH Thailand, TR Turkey, AE United Arab Emirates, GB United Kingdom, US United States, VN Vietnam.",
            "items": {
              "type": "string"
            },
            "default": [
              "US"
            ]
          },
          "periodDays": {
            "title": "Ranking period",
            "enum": [
              "7",
              "30",
              "180"
            ],
            "type": "string",
            "description": "Window the Top Ads ranking is calculated over.",
            "default": "7"
          },
          "sortBy": {
            "title": "Sort orders",
            "type": "array",
            "description": "Ranking orders to read. Each order returns a different top 20, so several orders widen coverage. Ads found in more than one are returned once with their best rank. Available: for_you (default ranking), ctr, like, impression, cvr (conversion rate).",
            "items": {
              "type": "string"
            },
            "default": [
              "for_you"
            ]
          },
          "industries": {
            "title": "Industries",
            "type": "array",
            "description": "Limit to these top-level industries. Leave empty for all industries. Available: Apparel & Accessories, Appliances, Apps, Baby, Kids & Maternity, Beauty & Personal Care, Business Services, E-Commerce (Non-app), Education, Financial Services, Food & Beverage, Games, Health, Home Improvement, Household Products, Life Services, News & Entertainment, Pets, Sports & Outdoor, Tech & Electronics, Travel, Vehicle & Transportation.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "objectives": {
            "title": "Campaign objectives",
            "type": "array",
            "description": "Limit to these campaign objectives. Leave empty for all objectives. Available: Traffic, App Installs, Conversions, Video Views, Reach, Lead Generation, Product sales.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "adLanguages": {
            "title": "Ad languages",
            "type": "array",
            "description": "Limit to ads in these languages, by code. Leave empty for all languages. Available: en English, es Spanish, ar Arabic, vi Vietnamese, th Thai, de German, id Indonesian, pt Portuguese, fr French, ms Malay, nl Dutch, ja Japanese, it Italian, ro Romanian, zh-Hant Traditional Chinese, ko Korean.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "onlyNew": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Return only ads not delivered by an earlier run with the same countries, industries, objectives, languages, sort orders and period. Turn on for a daily or weekly monitor; the first run returns everything.",
            "default": false
          },
          "includeDetails": {
            "title": "Include ad details",
            "type": "boolean",
            "description": "Read each ad detail for its landing page, comments, shares and the countries it ran in. Adds one request per ad; turn off for a faster list-only run.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many ads in total across all lists.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Leave disabled unless TikTok blocks datacenter traffic from your location; residential proxy raises the platform cost of the run.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}