{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Views, Reactions, Alerts",
    "description": "Scrape public Telegram channels without login or API keys: post text, exact views, reactions incl. paid stars, media, polls, forwards, replies, links, plus exact subscriber counts. Many channels per run, date window, keyword filters, only-new-posts monitoring. $0.30 / 1,000 posts, no start fee.",
    "version": "0.1",
    "x-build-id": "qTTVIu0ewYIuyC5jU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nat-labs~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nat-labs-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/nat-labs~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nat-labs-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/nat-labs~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nat-labs-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",
        "required": [
          "channels"
        ],
        "properties": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Public channels, one per line: <code>durov</code>, <code>@telegram</code>, <code>https://t.me/tginfo</code> or <code>https://t.me/s/bloomberg</code>. Private invite links (<code>t.me/+…</code>) can't be read without joining and are skipped.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Newest posts first. <code>0</code> = all posts in the date window (whole history if no dates are set; up to 10,000 scanned posts per channel).",
            "default": 20
          },
          "lastDays": {
            "title": "Only the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Shortcut for <i>Posts from</i>: e.g. <code>7</code> = posts from the last 7 days. 0 = no limit."
          },
          "dateFrom": {
            "title": "Posts from",
            "type": "string",
            "description": "Oldest post date to include (YYYY-MM-DD or ISO time). Scanning stops when older posts are reached."
          },
          "dateTo": {
            "title": "Posts until",
            "type": "string",
            "description": "Newest post date to include. Newer posts are skipped (not charged)."
          },
          "onlyNew": {
            "title": "Only new posts (monitoring)",
            "type": "boolean",
            "description": "Remember the last post delivered per channel and, on the next run, deliver only newer posts. Schedule the Actor hourly or daily and connect a webhook, Slack or email integration for alerts. The first run delivers the newest posts as the baseline. A channel with nothing new costs one cheap <i>monitor check</i>.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate memories for different schedules (e.g. <code>crypto-news</code>, <code>competitors</code>).",
            "default": "default"
          },
          "searchQuery": {
            "title": "Search inside the channels",
            "type": "string",
            "description": "Telegram's own in-channel search, e.g. <code>bitcoin</code> or a hashtag <code>#news</code>. Only matching posts are scanned."
          },
          "keywordsAny": {
            "title": "Text contains (any of)",
            "type": "array",
            "description": "Keep posts whose text, link preview, poll or file name contains any of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "keywordsNone": {
            "title": "Text must not contain",
            "type": "array",
            "description": "Drop posts containing any of these words.",
            "items": {
              "type": "string"
            }
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer views."
          },
          "mediaTypes": {
            "title": "Media types (any of)",
            "type": "array",
            "description": "Keep only posts containing any of these. Empty = all posts.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "gif",
                "round_video",
                "document",
                "voice",
                "sticker",
                "location",
                "poll",
                "link_preview",
                "none"
              ],
              "enumTitles": [
                "Photo",
                "Video",
                "GIF / animation",
                "Round video",
                "File / document",
                "Voice",
                "Sticker",
                "Location",
                "Poll",
                "Link preview",
                "Text only (no media)"
              ]
            }
          },
          "excludeForwarded": {
            "title": "Exclude forwarded posts",
            "type": "boolean",
            "description": "Drop posts forwarded from other channels or users.",
            "default": false
          },
          "onlyForwarded": {
            "title": "Only forwarded posts",
            "type": "boolean",
            "description": "Keep only forwarded posts (useful to map which channels a channel reposts).",
            "default": false
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Also deliver service messages such as <i>Channel photo updated</i> or <i>Channel name was changed</i>.",
            "default": false
          },
          "includeChannelInfo": {
            "title": "Channel info row",
            "type": "boolean",
            "description": "One row per channel: title, description, exact subscriber count, verified flag, number of photos/videos/files/links, avatar.",
            "default": true
          },
          "exactSubscribers": {
            "title": "Exact subscriber count",
            "type": "boolean",
            "description": "Reads the channel's landing page for the exact number (e.g. 10,337,782 instead of 10.3M). One extra light request per channel.",
            "default": true
          },
          "includeHtml": {
            "title": "Include post HTML",
            "type": "boolean",
            "description": "Adds the original formatted HTML of each post (bold, links, quotes) next to the plain text.",
            "default": false
          },
          "beforePostId": {
            "title": "Start before post ID",
            "minimum": 0,
            "type": "integer",
            "description": "Backfill: start from posts older than this ID (e.g. continue a previous export)."
          },
          "maxItems": {
            "title": "Max posts in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the whole run after this many posts. 0 = no limit. The run also always stops cleanly at your <i>maximum cost per run</i>.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Channels in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests are paced politely either way; more parallel channels mainly help when some channels need many pages.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Not needed: t.me serves public channel previews to everyone. Only set one for very large jobs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}