{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Comments & Media",
    "description": "Scrape public Telegram channels without login: posts, views, reactions, media, links, comments, channel details. Search inside a channel and get only new posts for n8n or Make. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "Ahv4Bc3BvYwk5DOQ0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-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/nice_dev~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-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/nice_dev~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-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",
            "maxItems": 1000,
            "uniqueItems": true,
            "type": "array",
            "description": "Public Telegram channels, in any form: `durov`, `@durov`, `t.me/durov`, `https://t.me/s/durov`. A link of a channel page keeps its keyword and its page (`https://t.me/s/durov?q=privacy`). One source per channel; posts are read from the newest to the oldest. Public groups give their details only (their messages are not published on the web). Max 1 000 channels.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Telegram URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Telegram links: channel pages (`https://t.me/durov`, `https://t.me/s/durov`), search pages inside a channel (`https://t.me/s/durov?q=privacy`) or single posts (`https://t.me/durov/427`). Added to **Channels**. Max 1 000 URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "query": {
            "title": "Search inside the channels",
            "maxLength": 200,
            "type": "string",
            "description": "Keyword searched by Telegram inside EACH channel above (the channel's own search box, `t.me/s/<channel>?q=`): only the matching posts are read, older ones included. Empty = every post."
          },
          "searchQueries": {
            "title": "More keywords",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several keywords in one run: each keyword is searched in each channel (3 keywords × 4 channels = 12 searches, max 500). Added to **Search inside the channels**; a post found by several keywords is saved once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max posts",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of posts to save for the whole run (after deduplication and filters). Comments and channel-detail rows are not counted. 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max posts per channel",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Cap for EACH channel (and each keyword in it), so that a big first channel cannot use up the whole **Max posts** budget. 0 = no per-channel cap.",
            "default": 0
          },
          "includeChannelInfo": {
            "title": "Channel details",
            "type": "boolean",
            "description": "Add one row per channel (or public group): exact subscriber count (members and online for a group), description, photo, verified badge, counts of photos, videos, files and links, and whether its web preview is open. 1 extra page per channel.",
            "default": false
          },
          "channelInfoOnly": {
            "title": "Channel details only",
            "type": "boolean",
            "description": "Return only the channel-detail rows (one per channel), without any post: the fastest way to check a list of channels or groups. Turns **Channel details** on.",
            "default": false
          },
          "includeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Add the public comments of each post whose discussion is open (one row per comment: author, text, date, reactions, reply-to), and the post's comment count. 1 extra page per post; channels without comments are detected and skipped.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The newest comments kept per post when **Comments** is on, written in the order they were posted, up to 1,000 (Telegram shows 100 per page, more are loaded 50 at a time).",
            "default": 50
          },
          "includeEmails": {
            "title": "E-mail addresses",
            "type": "boolean",
            "description": "Fill `emails` with the e-mail addresses written in each post or comment (paid per address found, see Pricing). Unticked: `emails` stays empty.",
            "default": false
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Save the photos and video thumbnails of each post in the run's key-value store (Telegram links expire) and add their links to `mediaFiles`: they work as long as the run's storage is kept (the data retention of your plan). Charged per file saved.",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Only posts published on or after this date: `2026-09-01`, or a period before now such as `7 days`, `2 weeks`, `1 month` (API: `24 hours` and full ISO date-times work too). Reading a channel stops at the first older post."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Only posts published on or before this date (the whole day is included), or older than a period such as `30 days`. The channel is read from that date backwards."
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Only posts seen at least this many times. 0 = no minimum.",
            "default": 0
          },
          "maxViews": {
            "title": "Max views",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Only posts seen at most this many times (e.g. to find the posts few people read). 0 = no maximum.",
            "default": 0
          },
          "minReactions": {
            "title": "Min reactions",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Only posts with at least this many reactions (all emojis and paid Stars added up). 0 = no minimum.",
            "default": 0
          },
          "mediaOnly": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keep only the posts with any media: photo, video, file, audio, poll, sticker, location, or a post Telegram shows only in the app. Use **Only these media types** to keep only some.",
            "default": false
          },
          "withTextOnly": {
            "title": "Only posts with text",
            "type": "boolean",
            "description": "Drop the posts without any text or caption (a lone photo, sticker or voice message).",
            "default": false
          },
          "withLinksOnly": {
            "title": "Only posts with links",
            "type": "boolean",
            "description": "Keep only the posts whose text contains a link.",
            "default": false
          },
          "mediaTypes": {
            "title": "Only these media types",
            "type": "array",
            "description": "Keep only the posts that contain at least one of these kinds of media. Empty = no media filter.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "document",
                "audio",
                "poll",
                "sticker",
                "location"
              ],
              "enumTitles": [
                "Photo",
                "Video",
                "Document / file",
                "Voice or audio",
                "Poll",
                "Sticker",
                "Location"
              ]
            },
            "default": []
          },
          "includeForwarded": {
            "title": "Include forwarded posts",
            "type": "boolean",
            "description": "Untick to drop the posts the channel forwarded from another channel or user.",
            "default": true
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Also return the channel's service messages (channel created, photo changed, message pinned…), as rows with `serviceAction` filled. Off = only real posts.",
            "default": false
          },
          "includeKeywords": {
            "title": "Include keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only the posts whose text contains at least one of these words (case and accents ignored). Unlike **Search inside the channels**, Telegram is not asked: every post is read, then checked by the Actor.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the posts whose text contains one of these words (case and accents ignored).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new posts",
            "type": "boolean",
            "description": "Read each channel only from the last post a previous run (same **Memory key**) delivered: older posts are not read, not saved and not charged. First run = the posts allowed by the caps and dates above.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new posts**. Give each schedule / task its own key (e.g. `crypto-news`) so that they do not share their memory. Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every post again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price. Some channels are hidden in some countries (e.g. in the EU): pick another proxy country for them — US works; a country where Apify Proxy has no IP fails the run, with a message that says so. About 5 times faster without a proxy, but a request Telegram turns away is then asked again from the same address only. The residential Apify proxy is not available in this Actor.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of requests processed in parallel.",
            "default": 6
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Most requests to Telegram in any 60 seconds, all of them counted: channel pages, comment pages, channel details. A budget, not an even pace. Lower it if Telegram answers HTTP 429 in the log.",
            "default": 120
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Smallest gap between two requests, in milliseconds. Unlike the per-minute rate, this spreads the requests evenly instead of letting them go out in a burst. 0 = no gap.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. Behind a proxy, a request Telegram turns away is also retried on a new proxy session up to 10 times without using up these retries.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}