{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper – Messages, Views & Subscribers",
    "description": "Extract messages, views, reactions, links, media, forwards and exact subscriber counts from public Telegram channels. No login, bot token or API key. Filter by keyword and date, or monitor channels and get only new posts. $0.50 per 1,000 messages, no start fee.",
    "version": "0.1",
    "x-build-id": "3YJMFkmllhiabtUMg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phantom-x64~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phantom-x64-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/phantom-x64~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-phantom-x64-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/phantom-x64~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-phantom-x64-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 Telegram channels to scrape. Use the username (durov, @durov) or any link (https://t.me/durov, https://t.me/s/durov, https://t.me/durov/123). Private invite links (t.me/+...) cannot be scraped.",
            "default": [
              "durov",
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxMessagesPerChannel": {
            "title": "Max messages per channel",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Newest messages to save per channel (after date and keyword filters). Set 0 to get only the channel info row.",
            "default": 50
          },
          "dateFrom": {
            "title": "Oldest message date",
            "type": "string",
            "description": "Only messages posted on or after this date. Accepts YYYY-MM-DD, an ISO date-time, or a relative value such as \"7 days\", \"24 hours\" or \"2 weeks\". Leave empty for no limit."
          },
          "dateTo": {
            "title": "Newest message date",
            "type": "string",
            "description": "Only messages posted on or before this date (a plain YYYY-MM-DD includes the whole day). Accepts the same formats as the oldest date. Leave empty for no limit."
          },
          "onlyNewMessages": {
            "title": "Only new messages since the last run (monitor mode)",
            "type": "boolean",
            "description": "Remembers the newest message id of every channel in a named key-value store and, on the next run, returns only messages that are newer. Ideal for scheduled runs (hourly/daily alerts) because you never pay twice for the same message.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved monitor state. Use a different name for each independent monitor (for example one per client or schedule). Only used when monitor mode is on.",
            "default": "default"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return messages that contain at least one of these words or phrases (case-insensitive). Leave empty to get every message.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword matching",
            "enum": [
              "telegramSearch",
              "localFilter"
            ],
            "type": "string",
            "description": "\"Telegram search\" uses the channel search built into the public t.me page: very fast on big channels, but it matches whole words like the Telegram app does. \"Exact text filter\" reads the channel page by page and keeps messages whose text contains the keyword anywhere (slower, but catches partial words, tickers and URLs).",
            "default": "telegramSearch"
          },
          "includeChannelInfo": {
            "title": "Include channel info",
            "type": "boolean",
            "description": "Add one row per channel with title, description, subscriber count, verified badge, photo and media counters.",
            "default": true
          },
          "exactSubscriberCount": {
            "title": "Exact subscriber count",
            "type": "boolean",
            "description": "Read the exact number of subscribers (e.g. 10157932 instead of 10.2M) from the public channel page. Costs one extra request per channel.",
            "default": true
          },
          "maxPagesPerChannel": {
            "title": "Max pages per channel",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit for the number of pages (about 20 messages each) read per channel and keyword. Raise it for full-history archives.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Channels in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many channels are read at the same time. Each channel is always read page by page at a polite pace.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Minimum pause between two requests for the same channel, in milliseconds (a small random jitter is added).",
            "default": 800
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request (network error, HTTP 429 or 5xx) is retried with a new proxy session and exponential backoff.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is recommended for large or scheduled runs. Datacenter proxies are enough for t.me.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}