{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper - Posts, Views, No Login",
    "description": "Scrape public Telegram channels without login, phone number or API keys. Get posts with text and HTML, date, views, reactions, forwards, replies, photos, video thumbnails, files and link previews, plus channel info with exact subscriber counts. Date range, keyword filter and deep history.",
    "version": "1.0",
    "x-build-id": "FnH97EWMBblMx5QU8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wrenfield-data~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wrenfield-data-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/wrenfield-data~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-wrenfield-data-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/wrenfield-data~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-wrenfield-data-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": "Telegram channels",
            "type": "array",
            "description": "Public Telegram channels, one per line: a username (<code>durov</code>, <code>@durov</code>) or a link (<code>https://t.me/durov</code>, <code>https://t.me/s/durov</code>). A post link (<code>https://t.me/durov/400</code>) starts from that post and goes back in time. Private invite links, groups, users and bots are reported as free error rows.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Newest posts to return per channel (after date and keyword filters). Set 0 for no limit when you use <b>From date</b>. Pagination goes as deep as the channel's history (thousands of posts are fine).",
            "default": 100
          },
          "dateFrom": {
            "title": "From date (oldest)",
            "type": "string",
            "description": "Only posts published on or after this date. <code>YYYY-MM-DD</code>, an ISO date-time (UTC), or relative: <code>7 days</code>, <code>24 hours</code>, <code>3 months</code>."
          },
          "dateTo": {
            "title": "To date (newest)",
            "type": "string",
            "description": "Only posts published on or before this date (a plain date includes the whole day, UTC). The scraper jumps straight to that point in the channel history, so old ranges are fast."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return posts containing any of these words or phrases (case-insensitive; checked in the post text, file names, link preview and poll question). Posts that don't match are not charged. Leave empty for all posts.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword matching",
            "enum": [
              "contains",
              "search"
            ],
            "type": "string",
            "description": "<b>Contains</b> scans the channel history (respecting the date range) and keeps matching posts - exact and as deep as you need. <b>Telegram search</b> uses Telegram's own search (matches word forms) but Telegram returns only about 20 of the newest matches per keyword.",
            "default": "contains"
          },
          "matchAllKeywords": {
            "title": "Require all keywords",
            "type": "boolean",
            "description": "Only keep posts that contain every keyword (default: any keyword).",
            "default": false
          },
          "wholeWordsOnly": {
            "title": "Whole words only",
            "type": "boolean",
            "description": "Match keywords as whole words (<code>SEC</code> won't match \"second\"). Turn off to also match inside words, e.g. word forms (<code>Трамп</code> → \"Трампа\") or prefixes (<code>crypto</code> → \"cryptocurrency\"). Chinese, Japanese, Korean and Thai keywords always match anywhere.",
            "default": true
          },
          "maxScannedPostsPerChannel": {
            "title": "Max posts to scan per channel (keyword filter)",
            "minimum": 20,
            "type": "integer",
            "description": "With a keyword filter, stop scanning a channel after this many posts even if fewer matches were found. Scanned posts that don't match are free.",
            "default": 5000
          },
          "includeChannelInfo": {
            "title": "Include channel info",
            "type": "boolean",
            "description": "Add one row per channel with title, description, exact subscriber count, photo, verified / scam / fake flags and media counters.",
            "default": true
          },
          "includeHtml": {
            "title": "Include post HTML",
            "type": "boolean",
            "description": "Add <code>textHtml</code> (formatting, links, custom emoji) next to the plain <code>text</code>.",
            "default": true
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Include 'Channel created', 'Channel photo updated' and similar service messages.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy (fallback only)",
            "type": "object",
            "description": "Telegram's web preview usually works without a proxy. This proxy is used only if Telegram starts rate-limiting the run (then the rest of the run goes through it). The default Apify datacenter proxy is enough.",
            "default": {
              "useApifyProxy": true
            }
          },
          "alwaysUseProxy": {
            "title": "Always use the proxy",
            "type": "boolean",
            "description": "Send every request through the proxy above instead of connecting directly first.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel page requests. Large single channels are split into parallel page streams.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}