{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Scraper: Exact Views, Deleted Posts & Ads",
    "description": "Scrape public Telegram channels and groups with no login or phone number. Get posts with exact views, search them by keyword, get channel statistics, catch deleted and edited posts, and check the ads you bought. Export to Excel, CSV, or JSON, or get alerts in Telegram.",
    "version": "0.1",
    "x-build-id": "QTsFLqakIxkoJLoDF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/n1raxi~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-n1raxi-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/n1raxi~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-n1raxi-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/n1raxi~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-n1raxi-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 channels or groups, one per line or separated by commas. Any form works: <code>durov</code>, <code>@durov</code>, <code>t.me/durov</code> or a full link. A link to a single post, such as <code>https://t.me/durov/548</code>, returns that post. A name that is not a channel (a bot, a user, a missing name) gets a status row that explains why. Leave empty if you only search by name or hashtag.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Return only the posts of your channels that contain at least one of these words or phrases. Matching ignores letter case and finds whole words only. Add <code>*</code> to match word endings: <code>bitcoin*</code> also finds \"bitcoins\". Use <code>+</code> to require all words: <code>bitcoin + ETF</code>. Post text, polls and file names are searched. Leave empty to get all posts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "from": {
            "title": "Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?|[Tt]oday|[Yy]esterday|([Ll]ast\\s+)?\\d+\\s*(min(ute)?s?|m|h((ou)?rs?)?|d(ays?)?|w((ee)?ks?)?|mo(n(th)?s?)?|y((ea)?rs?)?)(\\s+ago)?)$",
            "type": "string",
            "description": "Return posts published at or after this time (UTC). Use a date (<code>2026-10-01</code>), a date and time (<code>2026-10-01T08:00:00Z</code>), <code>today</code>, <code>yesterday</code>, or a period back from now (<code>6 hours</code>, <code>7 days</code>, <code>1 month</code>)."
          },
          "to": {
            "title": "Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?|[Tt]oday|[Yy]esterday|([Ll]ast\\s+)?\\d+\\s*(min(ute)?s?|m|h((ou)?rs?)?|d(ays?)?|w((ee)?ks?)?|mo(n(th)?s?)?|y((ea)?rs?)?)(\\s+ago)?)$",
            "type": "string",
            "description": "Return posts published before this time (UTC), in the same formats as Date from. A date alone means the end of that day, so <code>yesterday</code> in both fields returns all of yesterday's posts. Old periods are found directly, without reading all newer posts."
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of posts (or group messages) to return per channel, newest first. With filters, only matching posts count. Leave empty to get every post in the date range, every new post when monitoring, or otherwise the latest 20. Set 0 to return profiles only. Up to 20,000 per run."
          },
          "onlyNew": {
            "title": "Only new posts",
            "type": "boolean",
            "description": "For scheduled runs. Each run returns only the posts published since the previous run, oldest first, so nothing is missed or repeated. The first run returns the latest posts.",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip posts that contain any of these words or phrases. Same rules as Keywords, for example <code>giveaway</code> or <code>airdrop*</code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchPreviews": {
            "title": "Also search link previews",
            "type": "boolean",
            "description": "Also look for keywords and excluded keywords in the title and description of the page a post links to. Useful for posts that contain only a headline and a link.",
            "default": false
          },
          "ads": {
            "title": "Ad posts",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Posts the channel marks as ads, detected in 50 languages: ad hashtags such as <code>#ad</code> or <code>#sponsored</code>, and labels such as \"Sponsored\", \"Anzeige\" or \"Publicidad\". The <code>ad</code> field of each ad post shows the label and where the ad leads.",
            "default": "include"
          },
          "forwards": {
            "title": "Forwarded posts",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Posts the channel forwarded from other chats.",
            "default": "include"
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Return only posts with at least this many views. With Only new posts, each post is checked once, when it is first read.",
            "default": 0
          },
          "content": {
            "title": "Content types",
            "type": "array",
            "description": "Return only posts that contain any of the selected types. Leave empty for all posts.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "video",
                "voice",
                "document",
                "sticker",
                "poll",
                "link"
              ],
              "enumTitles": [
                "Text only",
                "Photos",
                "Videos",
                "Voice messages",
                "Files",
                "Stickers",
                "Polls",
                "Links"
              ]
            },
            "default": []
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Return only posts written in these languages. Use language codes or names, for example <code>en</code>, <code>es</code> or <code>Arabic</code>. Posts with too little text to detect a language are excluded. Related channels that mostly post in other languages are skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "output": {
            "title": "Output format",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "Full returns every field and suits developers and analysis. Compact returns about 15 columns per post (channel, subscribers, date, text, language, views, forwards, reactions, comments, links, media, ad, keywords, link), ready for Excel, Google Sheets and integrations.",
            "default": "full"
          },
          "formattedText": {
            "title": "Formatted text",
            "type": "array",
            "description": "Also return the post text with its formatting and inline links. Markdown suits websites and notes. HTML uses Telegram's formatting, ready for a bot to repost. The plain text is always included.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "html"
              ],
              "enumTitles": [
                "Markdown",
                "HTML"
              ]
            },
            "default": []
          },
          "exactCounts": {
            "title": "Exact views and forwards",
            "type": "boolean",
            "description": "Off by default. Turn on to get exact view counts (12,345 instead of 12.3K) and forward counts, read through the Actor's own Telegram accounts. Posts with exact numbers cost more. When off, or when an exact count is not available, views are the rounded numbers Telegram shows on the web, marked with <code>viewsExact: false</code>, and forwards are empty: the web does not show them.",
            "default": false
          },
          "comments": {
            "title": "Comments",
            "enum": [
              "none",
              "count",
              "all"
            ],
            "type": "string",
            "description": "Count returns the number of comments on each post. Collect also returns each comment as a separate row with its text, sender, date and reactions. A post of a channel with comments turned off gets no count; 0 means comments are on and there are none yet.",
            "default": "none"
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "When collecting comments, the maximum number of the latest comments per post. Leave empty for all."
          },
          "downloadMedia": {
            "title": "Download media files",
            "type": "boolean",
            "description": "Save photos, videos, voice messages and stickers to the run's storage and add a link to each saved file. Files are kept for as long as your Apify plan keeps run data. Telegram's own media links expire within hours. Videos larger than about 12 MB are not available on the web and cannot be saved.",
            "default": false
          },
          "searchChannels": {
            "title": "Find channels by name",
            "type": "array",
            "description": "Words that appear in channel names, for example <code>crypto news</code> or <code>noticias Argentina</code>. For each entry, up to 20 matching public channels and groups are found and scraped like the channels in Channels. Each search that finds channels is charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchMinSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Return only channels and groups found by name with at least this many subscribers or members. Leave empty for all."
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Find posts with these hashtags in all public Telegram channels, not only in your channels, for example <code>#bitcoin</code>. These posts always include exact views and forwards. The date range, filters and Only new posts apply. Max posts per channel sets the number of posts per hashtag.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "watchChanges": {
            "title": "Report deleted and edited posts",
            "type": "boolean",
            "description": "Each run checks recent posts again and returns a <code>change</code> row for every post deleted or edited since the previous run, with its content before and after. Turns on Only new posts. Works for channels, not groups.",
            "default": false
          },
          "watchHours": {
            "title": "Watch period",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How long after publication each post is checked for deletions and edits.",
            "default": 24
          },
          "profiles": {
            "title": "Channel profiles",
            "type": "boolean",
            "description": "Add a profile row for each channel, group or bot. For channels: exact subscribers, average and median views, engagement, posting frequency, best hours and days, content mix, top posts, ad share and advertisers, contacts for ads, and growth since earlier runs. For groups: members and members online. For bots: monthly users.",
            "default": false
          },
          "profilePosts": {
            "title": "Posts for profile statistics",
            "minimum": 5,
            "maximum": 200,
            "type": "integer",
            "description": "How many of each channel's latest posts are used to calculate its profile statistics.",
            "default": 50
          },
          "relatedChannels": {
            "title": "Related channels",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "For each channel, also profile up to this many related channels: the ones it forwards from and mentions most, then the ones Telegram lists as similar. Useful for finding competitors and ad partners. Set 0 to turn off.",
            "default": 0
          },
          "relatedDepth": {
            "title": "Related channel depth",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 finds the related channels of your channels. 2 and 3 also find the related channels of those, to map a whole niche.",
            "default": 1
          },
          "relatedMinSubscribers": {
            "title": "Minimum subscribers of related channels",
            "minimum": 0,
            "type": "integer",
            "description": "Skip related channels with fewer subscribers. Skipped channels are not charged.",
            "default": 0
          },
          "relatedPosts": {
            "title": "Also scrape related channels",
            "type": "boolean",
            "description": "Also return the posts of related channels, with the same keywords, dates and filters. Useful for following keywords across a whole niche.",
            "default": false
          },
          "trackPosts": {
            "title": "Track ad posts",
            "type": "boolean",
            "description": "Check the post links in Channels on every run: views at 1, 24 and 48 hours, early deletion, other posts during the hours at the top, and changes to the text or links. Add the ad format after a link, for example <code>https://t.me/channel/123 1/24</code>, or set it below. Schedule the task to run every hour.",
            "default": false
          },
          "adFormat": {
            "title": "Ad format",
            "pattern": "^\\s*\\d{1,3}\\s*/\\s*\\d{1,4}\\s*[hH]?\\s*$",
            "type": "string",
            "description": "Default format for tracked posts: hours at the top / hours in the channel, for example <code>1/24</code> or <code>2/48</code>. Setting it turns on ad tracking."
          },
          "advertisers": {
            "title": "Advertiser summary",
            "type": "boolean",
            "description": "Add one row per advertiser found in the ad posts: the site, app or channel advertised, where and when the ads ran, and their views. Works best with Ad posts set to Only ad posts and a date range.",
            "default": false
          },
          "stories": {
            "title": "Who published first",
            "type": "boolean",
            "description": "Group the run's posts into stories, each one piece of news covered by several channels, and show who published it first, who forwarded or copied it, and how many minutes later. Use with several channels and a date range. The newest 50,000 posts of a run are grouped.",
            "default": false
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Create a bot with <a href='https://t.me/BotFather' target='_blank'>@BotFather</a> (send it /newbot), paste its token here, then open your bot and press Start. Works with Only new posts, Report deleted and edited posts, or Track ad posts: you get each new post, each deleted or edited post, and ad tracking news, up to 30 messages per run."
          },
          "telegramChat": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Where to send alerts. Leave empty to use the chat that last messaged the bot (you, after pressing Start). You can also enter a chat ID, or the @name of a group or channel where the bot is a member or admin."
          },
          "searchDepth": {
            "title": "Search depth",
            "minimum": 20,
            "maximum": 100000,
            "type": "integer",
            "description": "When filters are set without Date from: how many of each channel's latest posts are searched. With Date from, every post in the range is searched. You pay only for the posts returned.",
            "default": 1000
          },
          "stateName": {
            "title": "Monitor name",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
            "type": "string",
            "description": "Each saved task remembers its progress automatically. Set a name only to share progress between tasks, or to keep two monitors in one task apart. Use lowercase letters, digits and hyphens."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. Turn on Apify Proxy only if requests are blocked, or if a run reads hundreds of channels.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}