{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper (posts, views, reactions, media)",
    "description": "Telegram channel posts scraper: text, date, views, reactions, photos, videos, links and forwards, plus channel title and subscriber count. Takes public channel usernames or t.me links, no login or bot token. Use it to monitor Telegram messages from public news or community channels.",
    "version": "1.0",
    "x-build-id": "hopuzP1TysTVneIdj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tamnt67~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tamnt67-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/tamnt67~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tamnt67-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/tamnt67~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tamnt67-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 channel usernames or links, one per line: durov, @telegram, https://t.me/telegram or https://t.me/s/telegram.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Newest posts first. Telegram shows 20 posts per page.",
            "default": 100
          },
          "postsAfter": {
            "title": "Only posts after date",
            "type": "string",
            "description": "Optional ISO date such as 2026-01-01 or 2026-01-01T12:00:00Z. Older posts are skipped and scraping stops when they are reached."
          },
          "postsBefore": {
            "title": "Only posts before date",
            "type": "string",
            "description": "Optional. ISO date such as 2026-01-31 or 2026-01-31T12:00:00Z. Newer posts are skipped (not charged); together with \"Only posts after date\" this gives a date range."
          },
          "lastNDays": {
            "title": "Only posts from the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Same as \"Only posts after date\" set to N days ago. If both are set, the later date wins."
          },
          "afterPostId": {
            "title": "Only posts after post ID",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Save only posts with a higher post ID than this (the number at the end of t.me/channel/123). Handy for incremental runs: pass the highest postId of the last run."
          },
          "afterPostIds": {
            "title": "Only posts after post ID, per channel",
            "type": "object",
            "description": "Optional. Like \"Only posts after post ID\" but per channel, for example {\"durov\": 450, \"telegram\": 380}. Overrides the single value for the channels listed."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. Save only posts whose text or link preview contains at least one of these words (case-insensitive). Posts are still read page by page, so a rare keyword in a big channel can take a while; non-matching posts are not charged.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional. Skip posts whose text or link preview contains any of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Optional. Save only posts with at least one of these: photo, video, document, voice, round video, sticker, poll, link (links or link preview), text (no media). Empty = all posts.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "document",
                "voice",
                "roundVideo",
                "sticker",
                "poll",
                "link",
                "text"
              ],
              "enumTitles": [
                "Photo",
                "Video",
                "Document / file",
                "Voice / audio",
                "Round video",
                "Sticker",
                "Poll",
                "Link",
                "Text only"
              ]
            }
          },
          "includeChannelInfo": {
            "title": "Add channel info to every post",
            "type": "boolean",
            "description": "Adds channel title, username, description, subscriber count, media counters, verified flag and avatar to each record.",
            "default": true
          },
          "channelInfoOnly": {
            "title": "Channel info only (no posts)",
            "type": "boolean",
            "description": "Save one record per channel with its title, username, description, subscribers, photo/video/file/link counts, verified flag and avatar, and no posts. One page request per channel.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is enough for t.me preview pages.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}