{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Ad Library Checker: Advertiser Ads",
    "description": "TikTok Ad Library checker: see whether a TikTok advertiser runs ads in Europe, about how many, since when, and its latest ads with text and video links. Enter library links, advertiser names or brand names; an advertiser with no ads is answered too. Its TikTok ads monitor returns only new ads.",
    "version": "0.1",
    "x-build-id": "xxnmZiZQXtljlspnf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kaleidoscopelabs~tiktok-ads-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kaleidoscopelabs-tiktok-ads-checker",
        "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/kaleidoscopelabs~tiktok-ads-checker/runs": {
      "post": {
        "operationId": "runs-sync-kaleidoscopelabs-tiktok-ads-checker",
        "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/kaleidoscopelabs~tiktok-ads-checker/run-sync": {
      "post": {
        "operationId": "run-sync-kaleidoscopelabs-tiktok-ads-checker",
        "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": {
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "One per line, one of: an advertiser's Ad Library link, copied after choosing it in the library's search (it carries adv_name and adv_biz_ids); its name and business ID as \"Name | ID\"; or its registered name as the library lists it, usually the legal entity (\"Made Up Shop GmbH\"), matched exactly, case and spaces aside, with every ID the library lists under that name. A link or \"Name | ID\" is the sure answer. A name with no exact match is answered no, with up to 5 of the library's suggestions to enter as \"Name | ID\". The library answers an ID only beside its name, so a line of IDs alone is skipped, not charged, and its record says so.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Brand names",
            "type": "array",
            "description": "One per line: a brand as you would type it in the Ad Library's search box. The record keeps the ads, among the search's newest, whose advertiser's name holds the brand as whole words (\"Made Up\" finds \"Made Up Shop GmbH\", not \"Madeup Ltd\"), and lists those advertisers with their IDs where the library gives them. A brand whose advertisers are named otherwise (a group's legal entities) is not found this way: enter those advertisers above. No count for a brand: the library's total counts other advertisers' ads too.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Where the ads were shown: a two-letter code of a region the library covers (the EU's 27, IS, LI, NO, CH, GB and TR), such as DE or FR, or all.",
            "default": "all"
          },
          "periodDays": {
            "title": "Period",
            "minimum": 7,
            "maximum": 730,
            "type": "integer",
            "description": "The window, in days back from today (or from End date), 7 to 730. Not used when Start date is set.",
            "default": 365
          },
          "startDate": {
            "title": "Start date",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "The window's first day (UTC), such as 2026-01-01. The library lists the ads it places in the window, so an ad's first or last shown day can fall a little outside it. With it, Period is not used; without End date, the window runs to today. A range is at most 730 days: a longer one starts 730 days before its end. Not in a monitor."
          },
          "endDate": {
            "title": "End date",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "The window's last day (UTC), such as 2026-01-31. Without Start date, Period counts back from it. Not in a monitor."
          },
          "adsPerAdvertiser": {
            "title": "Latest ads per advertiser",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "How many of an advertiser's newest ads its record carries, 0 to 60; each costs one ad. 0 is the check alone. Left empty: 3 in a lookup, 12 in a monitor."
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name a monitor (letters, digits, hyphens) to get, on every run, only the ads it has not returned, with newAds and changed on each record. Each advertiser's first run returns its latest ads, as a lookup does; later runs read the days since the run before (Period is not used). Advertisers only: leave Brand names empty. Leave this empty for plain lookups."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}