{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Messages, Views, Reactions",
    "description": "Scrape public Telegram channels without an account: every message with text, views, reactions, media, forwards and polls. Find channels by keyword. 30,000 messages in 2 minutes. Date filters, new-only watch, webhook.",
    "version": "0.3",
    "x-build-id": "c7Qz5rXhKKyaFg3Zf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-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/alexmorain~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-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/alexmorain~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-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": {
          "channels": {
            "title": "Telegram channels",
            "type": "array",
            "description": "Public channels to read, one per line: <code>@durov</code>, <code>durov</code>, <code>https://t.me/durov</code> or <code>t.me/s/durov</code>. A channel that is private, banned, renamed away or without a public web preview comes back as a free row with <code>status</code> set to <code>no_preview</code>. Private invite links (<code>t.me/+...</code>) have no public preview and are skipped.",
            "items": {
              "type": "string"
            }
          },
          "findChannels": {
            "title": "Find channels by keyword",
            "type": "array",
            "description": "Optional. Words or phrases to look for in the names and descriptions of public Telegram channels (up to 20), for example <code>bitcoin</code> or <code>real estate</code>. Telegram has no channel search on the web, so the actor reads a public channel directory: up to about 1,500 channels for a broad word, each with title, subscribers, description and categories. One <b>channel profile</b> is billed per channel returned (see the @username option below for what counts). Can be combined with <b>Telegram channels</b>.",
            "items": {
              "type": "string"
            }
          },
          "maxFoundChannels": {
            "title": "Max channels per search word",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops each search word after this many channels. A broad word has up to about 1,500; a narrow one far fewer.",
            "default": 100
          },
          "resolveUsernames": {
            "title": "Look up the @username of each channel found",
            "type": "boolean",
            "description": "The directory lists channels without their Telegram @username; looking it up takes one extra request per channel (the run is slower, about 2 channels per second). <b>On:</b> channels without a public @username are left out and are <b>not</b> charged; every channel returned is billed as one <b>channel profile</b>. <b>Off:</b> you get the title, subscribers and description only (much faster, the <code>channel</code> field stays empty) and <b>every channel found is billed as a channel profile</b>, with or without a @username.",
            "default": true
          },
          "readFoundChannels": {
            "title": "Read the messages of the channels found",
            "type": "boolean",
            "description": "Also reads the channels found, with the message options below (<b>Max messages per channel</b>, dates, keywords). Needs the @username lookup. Billed as usual per message.",
            "default": false
          },
          "maxMessages": {
            "title": "Max messages per channel",
            "minimum": 0,
            "type": "integer",
            "description": "The most recent messages to deliver for each channel, newest first. <code>0</code> reads the channel to its very first message (a channel of 350,000 messages takes minutes, and you pay per message). Combine with the date window below to bound a run.",
            "default": 100
          },
          "sinceDate": {
            "title": "Only messages since",
            "type": "string",
            "description": "Keep messages posted on or after this date: <code>2026-11-01</code>, <code>2026-11-01T08:00:00Z</code> or a relative time such as <code>7 days</code>. Reading stops as soon as it reaches older messages, so a recent window on a huge channel is fast and cheap."
          },
          "untilDate": {
            "title": "Only messages until",
            "type": "string",
            "description": "Keep messages posted on or before this date. The actor jumps straight to that point in the channel (about 15 requests), it does not read everything newer first. Cannot be combined with the watch mode."
          },
          "afterMessageId": {
            "title": "Only messages after this id",
            "minimum": 0,
            "type": "integer",
            "description": "Keep messages whose id is greater than this number (the number at the end of a message URL, <code>t.me/durov/537</code> gives <code>537</code>). Applies to every channel of the run. Leave empty to read from the newest message down."
          },
          "searchQuery": {
            "title": "Telegram search inside the channels",
            "type": "string",
            "description": "Only messages found by Telegram's own in-channel search (the search box of the channel's web page). <b>Telegram returns at most about 22 of the newest matches per channel</b>, whatever the word: handy for a quick look at recent mentions, not for history. To filter a long history, use <b>Keywords</b> below."
          },
          "keywords": {
            "title": "Keywords (filter while reading)",
            "type": "array",
            "description": "Deliver only messages whose text, link preview or poll question contains one of these words or phrases (any of them, ignoring case). The actor reads the channel as usual and keeps the matches, so it works on the whole history, unlike Telegram's search. Messages that do not match are <b>free</b>. A run that reads 50,000 messages with fewer than one match per 500 stops early: narrow it with a date window.",
            "items": {
              "type": "string"
            }
          },
          "includeChannelInfo": {
            "title": "Add one row per channel",
            "type": "boolean",
            "description": "Adds a <code>channel</code> row per channel: title, @username, verified badge, subscribers, description and counters of photos, videos and links. Billed as <b>channel info</b>. Subscriber counts are rounded by Telegram (<code>9.14M</code>).",
            "default": false
          },
          "monitorMode": {
            "title": "Watch mode",
            "enum": [
              "off",
              "new"
            ],
            "type": "string",
            "description": "With <b>New only</b> the actor remembers what it has already read and delivered for each channel in a named key-value store of your account, and only delivers messages that never went out before. Put the run on a schedule to follow channels. The first run reads the window you asked for and fixes the starting point of the watch; older history is never pulled in later. A run cut short (message limit, spending limit) leaves no hole: the next run fills it.",
            "default": "off"
          },
          "registryKey": {
            "title": "Watch name",
            "type": "string",
            "description": "Optional name of this watch. Two schedules with different names keep separate memories; without a name, the memory is tied to the search query only, so you can add channels to the list at any time."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. A JSON summary of the run is sent here by <code>POST</code> when it ends: status, number of messages and the channels that could not be read. Works with Slack, Discord, Zapier, Make or n8n URLs."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 64,
            "type": "integer",
            "description": "How many pages are fetched at the same time. 32 reads about 20 messages per page; lower it if you run through a proxy that rate-limits.",
            "default": 32
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Telegram's public pages normally need no proxy. Leave off unless a run reports refused requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}