{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Analytics for Ad Buyers - Reach & Ad Share",
    "description": "Vet public Telegram channels before buying an ad: exact subscribers, median views per post, reach % (ERR), posts per day, share of labelled ad posts, best hour and weekday, and ranks across the channels you list. Every row states the posts and dates it was measured on.",
    "version": "0.1",
    "x-build-id": "4ZdgbhulzJnv9tmfC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~telegram-channel-ad-analytics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-telegram-channel-ad-analytics",
        "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/neverempty~telegram-channel-ad-analytics/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-telegram-channel-ad-analytics",
        "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/neverempty~telegram-channel-ad-analytics/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-telegram-channel-ad-analytics",
        "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": {
          "channels": {
            "title": "Telegram channels to analyze",
            "type": "array",
            "description": "Public channels as @durov, durov, https://t.me/durov or https://t.me/s/durov. A link to a single post (t.me/durov/527) works too - the channel is taken from it. Put several channels in one run to get them ranked against each other. Only channels with a public web preview can be read without logging in; invite links (t.me/+..., t.me/joinchat/...) and t.me/c/... are private entrances and are rejected rather than read. A name that has no public preview comes back as its own row that says so, and is not charged.",
            "default": [
              "@durov",
              "@bloomberg",
              "@telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "periodDays": {
            "title": "Period to analyze (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Measure the posts published in the last N days. Every row says how many posts were used and the dates of the first and last one, and whether the whole period was read or reading stopped earlier (the channel is younger, or the maximum posts per channel was reached). 0 = no period: use the most recent posts up to the maximum below.",
            "default": 30
          },
          "maxPostsPerChannel": {
            "title": "Maximum posts read per channel",
            "minimum": 20,
            "maximum": 1000,
            "type": "integer",
            "description": "A cap on how far back each channel is read. Telegram serves 20 posts per page. Very active channels can post more than this within the period; the row then says the period was not fully read. You are charged per channel row, not per post read.",
            "default": 300
          },
          "settleHours": {
            "title": "Leave out posts younger than (hours)",
            "minimum": 0,
            "maximum": 168,
            "type": "integer",
            "description": "Telegram view counts keep growing for a while after a post goes out, so a post published an hour ago pulls the median down. Posts younger than this are left out of every view figure, and each row counts how many were left out. 0 = use every post.",
            "default": 24
          },
          "timezone": {
            "title": "Time zone for the best posting hour and weekday",
            "type": "string",
            "description": "An IANA time zone name such as UTC, Europe/Moscow, Asia/Tashkent or America/New_York. The posting-hour table, the best hour and the best weekday are counted in this zone. A name that is not a real time zone stops the run with a note row that is not charged.",
            "default": "UTC"
          },
          "includePosts": {
            "title": "Also return every post used (one row per post)",
            "type": "boolean",
            "description": "Off = one analysis row per channel. On = also one row per post used in the analysis, with its views, reactions, whether it was counted in the view figures and which ad markers were found in it, so you can check any number in the channel row yourself. Post rows are charged separately at the per-post price.",
            "default": false
          },
          "extraAdMarkers": {
            "title": "Extra words that mark a post as an ad",
            "type": "array",
            "description": "Ads are recognised only by the labels written in the post: the Russian ad registration id (erid, in the text or in a link), the legal 'Реклама.' line, 'на правах рекламы', 'партнёрский материал' / 'партнерский пост', 'sponsored post', and hashtags such as #реклама, #ad and #promo. Add the words a particular channel uses for its paid posts (for example 'промокод' or 'партнёр рубрики'). Case is ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "useProxy": {
            "title": "Use a proxy if Telegram answers with a bot check",
            "type": "boolean",
            "description": "Off by default because t.me answered with the full page on every direct request measured from Apify. Turn it on to have the run retry through a proxy if Telegram ever answers with a bot check - a residential proxy when your account has one, a datacenter proxy otherwise. A proxy makes each run slower and more expensive, so it is not used unless it is needed.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}