{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Views & Stats (No Login)",
    "description": "Scrape posts from public Telegram channels without login, phone number or API keys: text, views, reactions, media, forwards, replies, links. Or get channel analytics: subscribers, average views, engagement and posting frequency.",
    "version": "0.1",
    "x-build-id": "oUMyxucuFjbQdkQwL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/weyne~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-weyne-telegram-channel-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/weyne~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-weyne-telegram-channel-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/weyne~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-weyne-telegram-channel-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": [
          "channels"
        ],
        "properties": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Public Telegram <b>channels</b>: a username (<code>durov</code>), <code>@durov</code> or a link (<code>https://t.me/durov</code>). You can paste many at once. Groups, personal accounts, bots and private invite links (t.me/+...) have no public web page, so they are reported as unavailable and never charged.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "posts",
              "channelStats"
            ],
            "type": "string",
            "description": "<b>Posts</b>: one row per post. <b>Channel stats</b>: one row per channel with subscribers, average/median views, engagement, posting frequency and the top post, calculated from the latest posts.",
            "default": "posts"
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many of the newest posts to take from each channel. In Channel stats mode, how many recent posts are analyzed. You are never charged for more posts than this.",
            "default": 50
          },
          "searchQuery": {
            "title": "Search inside channels",
            "type": "string",
            "description": "Optional. Only posts containing this word or phrase (Telegram's own channel search). Hashtags work too, e.g. <code>#news</code>."
          },
          "newerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Optional. A date (<code>2026-01-31</code>, start of the day in UTC) or a period (<code>24 hours</code>, <code>7 days</code>, <code>2 weeks</code>, <code>3 months</code>). The Actor stops reading a channel as soon as it reaches older posts, and older posts are never charged."
          },
          "olderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Optional. A date (<code>2025-12-31</code> includes that whole day, UTC) or a period like <code>30 days</code>. Useful for archives."
          },
          "onlyNewPosts": {
            "title": "Only posts not returned in previous runs (for schedules)",
            "type": "boolean",
            "description": "Remembers the newest post returned for each channel (and search) and next time returns only newer ones. Perfect for scheduled monitoring: you never pay twice for the same post.",
            "default": false
          },
          "includeChannelInfo": {
            "title": "Add channel title and subscribers to each post",
            "type": "boolean",
            "description": "Adds channelTitle, channelSubscribers and channelVerified to every post row.",
            "default": true
          },
          "downloadPhotos": {
            "title": "Save photos permanently",
            "type": "boolean",
            "description": "Telegram's image links expire after a while. When enabled, photos are copied to this run's storage and permanent links are added in <code>photosStored</code>. Makes runs slower.",
            "default": false
          },
          "reportUnavailableChannels": {
            "title": "Add a row explaining channels that returned nothing",
            "type": "boolean",
            "description": "For each channel that can't be read (group, bot, private, doesn't exist) or has no matching posts, adds one free row with <code>status</code> and <code>error</code> so you know exactly why. These rows are never charged.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Datacenter proxy is enough for most runs.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}