{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper | Posts, Stats & New-Post Monitor",
    "description": "Scrape posts, views, reactions, media and comment counts from any public Telegram channel, plus exact subscriber counts and channel stats. Only-new-posts mode for schedules. No login or API key.",
    "version": "1.0",
    "x-build-id": "5Ga1oZGLp0fbR4KSm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zrk1212~telegram-channel-scraper-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zrk1212-telegram-channel-scraper-stats",
        "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/zrk1212~telegram-channel-scraper-stats/runs": {
      "post": {
        "operationId": "runs-sync-zrk1212-telegram-channel-scraper-stats",
        "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/zrk1212~telegram-channel-scraper-stats/run-sync": {
      "post": {
        "operationId": "run-sync-zrk1212-telegram-channel-scraper-stats",
        "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",
        "required": [
          "channels"
        ],
        "properties": {
          "channels": {
            "title": "Channels",
            "maxItems": 1000,
            "type": "array",
            "description": "Public channel usernames or links. Accepted: durov, @durov, https://t.me/durov, t.me/s/durov, https://t.me/durov/565 (a post link selects its channel), telegram.me/durov. Private invite links (t.me/+..., t.me/joinchat/...) are not supported. Max 1,000 entries.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Max posts saved per channel (after filters). Set 0 to get the channel stats row only.",
            "default": 100
          },
          "onlyNewPosts": {
            "title": "Only new posts (monitor mode)",
            "type": "boolean",
            "description": "Returns only posts newer than the last run with the same monitor ID. The first run returns the latest posts (up to the max) and remembers where it stopped. Ideal for schedules.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of the memory used by only-new-posts mode. Use different names for different schedules. Letters, digits and hyphens, max 40 characters.",
            "default": "default"
          },
          "searchQuery": {
            "title": "Search in channel",
            "type": "string",
            "description": "Telegram's own in-channel search. Returns only posts matching this text in each channel. Fast because Telegram filters on its side."
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep only posts whose text contains at least one of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop posts whose text contains any of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Posts from date",
            "type": "string",
            "description": "Only posts published on or after this date, for example 2026-11-01 or 7 days. Paging stops once older posts are reached."
          },
          "dateTo": {
            "title": "Posts until date",
            "type": "string",
            "description": "Only posts published on or before this date, for example 2026-11-15 or 1 day. A plain date includes the whole day (UTC)."
          },
          "onlyWithMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keep only posts with a photo, video, document or other media.",
            "default": false
          },
          "includeChannelStats": {
            "title": "Include channel stats row",
            "type": "boolean",
            "description": "Add one stats row per channel (exact subscribers, posts per day, median views, view to subscriber ratio). Charged per channel row.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "For channels with public comments: add the comment count and the latest comments (text and date only, never names or usernames). One extra request per post. Charged only for posts that have at least one comment.",
            "default": false
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Include service posts such as 'pinned a video'. These rows are free.",
            "default": false
          },
          "includeTextHtml": {
            "title": "Include post text as HTML",
            "type": "boolean",
            "description": "Also return the post text as HTML (bold, links, emoji).",
            "default": false
          },
          "maxPagesPerChannel": {
            "title": "Max pages per channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on pages read per channel (up to 20 posts per page). Matters with narrow keyword filters or old date ranges. It never limits an unfiltered request: the actor always allows enough pages for the max posts.",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed normally. Turn on Apify Proxy if you see rate-limit errors.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}