{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Views & Reactions",
    "description": "Scrape posts from public Telegram channels without a login or API key: text, date, views, reactions, photos, videos, files, links, polls, forwards and replies. Date range, keywords and only-new mode. $1 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "eKKZC1BfDlLQmrsdb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reverend_sal~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reverend_sal-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/reverend_sal~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reverend_sal-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/reverend_sal~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reverend_sal-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": "One public channel per line: a username (\"durov\" or \"@durov\") or a link (https://t.me/durov, https://t.me/s/durov, or a post link like https://t.me/durov/300). Private channels and invite links (t.me/+…) cannot be read. Groups, bots and user accounts are reported as free error rows.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 0,
            "type": "integer",
            "description": "The newest posts first, up to this many per channel. 0 = all the channel's posts (bounded by \"Max posts in total\").",
            "default": 100
          },
          "maxPosts": {
            "title": "Max posts in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many posts across all channels. You pay per post delivered, so this caps the cost of a run (as does the run's max charge).",
            "default": 1000
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only posts from the last N days. 0 = any date. Reading stops at the first older post, so this also makes runs faster.",
            "default": 0
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Only posts on or after this date (YYYY-MM-DD, UTC).",
            "default": ""
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Only posts on or before this date (YYYY-MM-DD, UTC). Newer posts are read but not delivered or charged.",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only posts containing at least one of these words or phrases (case-insensitive; searches the text, link preview, poll and file names).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Leave out posts containing any of these words or phrases.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "skipForwarded": {
            "title": "Skip forwarded posts",
            "type": "boolean",
            "description": "Leave out posts the channel forwarded from elsewhere.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new posts since the last run",
            "type": "boolean",
            "description": "Remember the posts delivered and, on later runs with the same memory key, deliver only posts published since (you pay only for new ones). Ideal for scheduled monitoring. The first run delivers the newest posts up to the limits above.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "type": "string",
            "description": "Name of the memory used by \"Only new posts\". Runs with the same key share it; use different keys for separate monitors. Stored in your named key-value store \"telegram-channel-scraper-state\".",
            "default": "default"
          },
          "includeChannelInfo": {
            "title": "Add channel title and subscribers to each post",
            "type": "boolean",
            "description": "Adds channelTitle, channelSubscribers and channelVerified to every post row.",
            "default": true
          },
          "includeTextHtml": {
            "title": "Include the post HTML",
            "type": "boolean",
            "description": "Adds textHtml: the post text as HTML with bold, italics and links kept.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Channels read in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many channels are read at the same time (pages of one channel are always read in order).",
            "default": 4
          },
          "maxPagesPerChannel": {
            "title": "Max pages read per channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit on reading: at most this many pages (about 20 posts each) per channel. Matters when filters (keywords, an old date range) skip most posts, so the Actor would otherwise read a big channel's whole history. 500 pages ≈ 10,000 posts. 0 = no limit.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in most cases: t.me pages are public. If Telegram starts refusing requests (HTTP 429), select Apify Proxy here; a blocked session is replaced automatically.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}