{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper — Posts API, Views & Media | $0.50/1k",
    "description": "Scrape public Telegram channels without login: posts with text, views, photos, videos, files, link previews, reactions and forwards, plus exact subscriber counts. Date range and keyword search. Export JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "daXDf4DunIEbHHxU9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/glasswing~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-glasswing-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/glasswing~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-glasswing-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/glasswing~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-glasswing-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",
        "properties": {
          "startUrls": {
            "title": "Telegram channels",
            "uniqueItems": true,
            "type": "array",
            "description": "Public channels, one per line: a username (`durov`), an @name (`@durov`) or a link (`https://t.me/durov`, `https://t.me/s/durov`, a post link such as `https://t.me/durov/528`). Groups, personal accounts, bots and private invite links are not channels: each returns one free `not_found` row saying why.",
            "default": [
              "durov",
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Posts per channel",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Newest posts to return from each channel (after the date range and keyword filters). Telegram's web preview shows about 20 posts per page, so 1,000 posts is about 50 pages and typically well under a minute.",
            "default": 20
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only posts published on or after this moment (UTC): `YYYY-MM-DD`, an ISO timestamp, or relative such as `7 days` or `24 hours`. Paging stops as soon as it reaches older posts, so a recent date keeps the run short."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts published before this moment (UTC): `YYYY-MM-DD`, an ISO timestamp, or relative such as `30 days`. The Actor jumps straight to that point of the channel's history instead of reading every newer page."
          },
          "keywords": {
            "title": "Keywords (search inside the channels)",
            "type": "array",
            "description": "Optional. Uses Telegram's own search inside each listed channel and returns only matching posts, across the channel's whole history (not just the newest pages). Each keyword is searched separately; a post found by two keywords is returned once. Every post row says which keyword found it in `searchKeyword`.",
            "items": {
              "type": "string"
            }
          },
          "includeChannelInfo": {
            "title": "Add one channel profile row per channel",
            "type": "boolean",
            "description": "Adds a row with `type` = `channel`: title, description, exact subscriber count, photo, verified badge and media counters. It costs one extra request and counts as one result per channel.",
            "default": true
          },
          "includeTextHtml": {
            "title": "Also return the post text as HTML",
            "type": "boolean",
            "description": "Adds `textHtml`: the post body with its bold, italic, code, quote, spoiler and link formatting kept (a small, safe subset of HTML). Off by default to keep rows small.",
            "default": false
          },
          "includeCommentsCount": {
            "title": "Add the comment count of each post",
            "type": "boolean",
            "description": "Adds `commentsCount` to every post row: the number of comments Telegram shows publicly under the post (channels with a linked discussion group). `commentsAvailable` is `false` when the post has no public comments section. Costs one extra small request per post, so runs take a little longer; the price per row does not change. Only the count is read: never the comments, their authors or any member list.",
            "default": false
          },
          "includeRelatedChannels": {
            "title": "Add a related-channels row per channel",
            "type": "boolean",
            "description": "Adds one row per channel (`type: \"related\"`) listing the other public channels its scraped posts forward from or link to, with how often (`forwards`, `links`) and the latest post that referenced each. Maps cross-promotion and syndication networks. Built only from the posts this run returned, so a higher post limit gives a fuller picture. Bare profile links and @mentions are not counted, since they can point to personal accounts. Each related row is billed as one result.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only new posts since the last run (monitoring)",
            "type": "boolean",
            "description": "Remembers the newest post delivered for each channel (and each channel + keyword) in a named key-value store on your account, and on the next run returns only newer posts. Paging stops at the remembered post, so a quiet channel costs one page. The first run returns posts as usual. Set the post limit above what a channel publishes between two runs, or the oldest new posts of a busy day are skipped. Channel rows are still returned when \"Add one channel profile row per channel\" is on.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that keeps the monitor's memory (letters, digits and dashes). Use a different name for each separate monitor. Delete the store, or use a new name, to start again from scratch.",
            "default": "telegram-channel-monitor"
          },
          "maxItems": {
            "title": "Maximum results (whole run)",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on the rows saved by the whole run, across all channels. Each post row and each channel profile row with status `ok` is one billable result; `not_found` and `error` rows are free.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Telegram's web preview answers Apify's datacenter IPs directly, so no proxy is needed. If you read very many channels and see HTTP 429 errors, enable Apify Proxy (datacenter). Residential proxies are not needed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}