{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper & Monitor - Posts, Comments, API, MCP",
    "description": "Telegram channel scraper and monitor without login: scrape Telegram posts, views, reactions, media, comments and exact subscriber counts. Telegram keyword alerts and channel search: new, edited and deleted posts to Slack, Discord or Teams. Telegram API and MCP server for AI agents.",
    "version": "0.1",
    "x-build-id": "PPICVH6sklJbHdycD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/akhil_rajesh~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-akhil_rajesh-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/akhil_rajesh~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-akhil_rajesh-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/akhil_rajesh~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-akhil_rajesh-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": "Channels",
            "type": "array",
            "description": "Public Telegram channels: a username ('durov', '@telegram') or a link (t.me/durov, https://t.me/s/durov). A post link (t.me/durov/400) reads that post, with its comments if you ask for them. Groups, people, bots and private invite links can't be read without a login: they get a free 'notFound' row saying why.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Search each channel with Telegram's own search ('bitcoin', 'update', '#news'). Telegram returns the newest 20 or so matches per channel and term; for older matches use Only posts containing below, which reads the channel's history and filters it.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Posts read per channel (or per channel and search term), newest first, back through its history 20 at a time. With Only changes: the newest posts each run watches for edits and deletions.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most rows a run returns (posts, comments and channel rows), shared between channels. With Only changes: most changes a run returns, with one channel row per channel on top (the rest of the changes come with the next run).",
            "default": 1000
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only posts from this time on: a date ('2026-10-01', from 00:00 UTC), a date and time ('2026-10-01T08:00:00Z'), or an amount of time back from now ('7 days', '24 hours', '2 weeks'). Reading stops at the first older post."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts up to this time (same forms as Posted after). Newer posts are read past, not returned."
          },
          "includeChannelInfo": {
            "title": "Channel details",
            "type": "boolean",
            "description": "Add one row per channel: name, description, the exact subscriber count, verified mark, avatar, the preview's photo, video and link counts, and the posting pace and average views of its newest posts. With Only changes it also gives the change in subscribers since the last run.",
            "default": true
          },
          "commentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Read the newest comments of each post (up to 100; 0 for none), from Telegram's comments widget: commenter, text, time and what it replies to. Each comment is a row. Only channels with comments switched on have them.",
            "default": 0
          },
          "keywords": {
            "title": "Only posts containing",
            "type": "array",
            "description": "Only posts whose text, link preview or poll has any of these words or phrases ('bitcoin', 'interest rate', '#breaking'). Case and accents don't matter. The channel is read back page by page and filtered (stopping after 500 posts in a row without a match).",
            "items": {
              "type": "string"
            }
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Leave out posts with any of these words or phrases ('giveaway', 'sponsored', '#ad').",
            "items": {
              "type": "string"
            }
          },
          "onlyWithMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Only posts with a photo, video, file, voice note, sticker or poll."
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts with at least this many views. Leave empty or 0 for any."
          },
          "includeServicePosts": {
            "title": "Include service posts",
            "type": "boolean",
            "description": "Also return channel events such as pinned posts, a new name or photo, and 'Channel created'."
          },
          "onlyChanges": {
            "title": "Only changes since the last run",
            "type": "boolean",
            "description": "Track your channels: each run returns only what changed since the last run with the same channels and filters: new posts, edited posts (with the text before), and deleted posts. The first run saves the newest posts as the baseline and returns them as firstRun. Schedule it (every hour, every day) to monitor channels."
          },
          "changeTypes": {
            "title": "Changes to return",
            "type": "array",
            "description": "Which changes Only changes returns. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "newPost",
                "edited",
                "deleted"
              ],
              "enumTitles": [
                "New posts",
                "Edited posts",
                "Deleted posts"
              ]
            }
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Post each run's changes to Slack, Discord or Microsoft Teams (their incoming-webhook URL), or to any HTTPS endpoint that takes JSON (Zapier, Make, n8n). Switches on Only changes. The first run posts a short 'alerts are set up' message."
          },
          "alertChangeTypes": {
            "title": "Alert on",
            "type": "array",
            "description": "Which changes are posted. Leave empty for new posts.",
            "items": {
              "type": "string",
              "enum": [
                "newPost",
                "edited",
                "deleted"
              ],
              "enumTitles": [
                "New posts",
                "Edited posts",
                "Deleted posts"
              ]
            }
          },
          "historyName": {
            "title": "History name",
            "type": "string",
            "description": "Keep a separate history for this monitor (a-z, 0-9 and hyphens). Leave empty to share the default one: histories are kept per channel and filters anyway."
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: Telegram answers Apify's servers directly. You can use your own proxies or Apify's datacenter proxies; residential proxies aren't available in this Actor."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}