{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Search, Profiles",
    "description": "68 fields per message against 16 from the top Telegram Actor: reactions per emoji, polls, forwards, replies, buttons, media links. Channel posts, in-channel search and profile cards in one Actor. No API key, no account.",
    "version": "0.1",
    "x-build-id": "actg4rQtM80BJCeI5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_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/snow_leo_data~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_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/snow_leo_data~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_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": "📣 Channels",
            "type": "array",
            "description": "Public channels to read. A username (durov), a @handle (@durov), a t.me link, or a link to one post (https://t.me/durov/536 starts the walk at that post). Private invite links (t.me/+…, /joinchat/…, /c/…) have no public web preview and are reported as skipped.",
            "default": [
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "🎛 What to collect",
            "enum": [
              "posts",
              "search",
              "profiles"
            ],
            "type": "string",
            "description": "Channel posts walks the history backwards. Search inside channels uses Telegram's own in-channel search for your terms. Profile cards only resolves each name into its card and works for entities that have no public post feed at all.",
            "default": "posts"
          },
          "searchTerms": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "Used only when the mode is Search inside channels. Every term is searched separately in every channel, because Telegram's in-channel search takes one query at a time.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Messages per channel",
            "minimum": 0,
            "type": "integer",
            "description": "How many rows to deliver per channel. Counted in DELIVERED rows, not in messages read, so filters cannot leave you with an empty dataset. 0 means no limit.",
            "default": 100
          },
          "maxScannedPerChannel": {
            "title": "Messages to read per channel before giving up",
            "minimum": 0,
            "type": "integer",
            "description": "Safety stop for narrow filters. If your filters match nothing, the walk still ends after this many messages instead of reading the whole history. 0 means no limit.",
            "default": 2000
          },
          "maxItems": {
            "title": "Total rows for the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap across every channel. 0 means no limit. Counted in delivered rows, so it is also the most you can be charged for.",
            "default": 0
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Keep messages published on this date or later. The walk also STOPS once a whole page is older than this, so a date bound is the cheapest way to limit a run.",
            "default": ""
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Keep messages published before this date.",
            "default": ""
          },
          "lastNDays": {
            "title": "Only the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Shortcut for Posted on or after. 7 means the last week. 0 turns it off.",
            "default": 0
          },
          "mustContain": {
            "title": "Text contains any of",
            "type": "array",
            "description": "Keep a message when its text contains at least one of these (case-insensitive, plain substring).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mustNotContain": {
            "title": "Text contains none of",
            "type": "array",
            "description": "Drop a message when its text contains any of these.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Only messages with",
            "type": "array",
            "description": "Keep only messages carrying one of these. 'No attachment' keeps plain text messages.",
            "items": {
              "type": "string",
              "enum": [
                "photo",
                "video",
                "document",
                "sticker",
                "voice",
                "poll",
                "link_preview",
                "none"
              ],
              "enumTitles": [
                "Photo",
                "Video",
                "Document or audio file",
                "Sticker",
                "Voice message",
                "Poll",
                "Link preview",
                "No attachment (plain text)"
              ]
            },
            "default": []
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep messages with at least this many views. Messages where Telegram shows no view counter at all are kept: an absent number is not a mismatch.",
            "default": 0
          },
          "maxViews": {
            "title": "Maximum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep messages with at most this many views. 0 turns it off.",
            "default": 0
          },
          "minReactions": {
            "title": "Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Keep messages whose reaction counts add up to at least this. Messages with no reaction block at all are kept.",
            "default": 0
          },
          "skipServiceMessages": {
            "title": "Skip service messages",
            "type": "boolean",
            "description": "Drop 'Channel photo updated', 'Channel name changed' and the like. They carry no text of their own and no views.",
            "default": true
          },
          "skipForwarded": {
            "title": "Skip forwarded messages",
            "type": "boolean",
            "description": "Drop messages the channel forwarded from somewhere else.",
            "default": false
          },
          "onlyNewPosts": {
            "title": "🔁 Only posts new since the last run",
            "type": "boolean",
            "description": "Monitor mode. The Actor remembers the highest message id it delivered per channel in its own named storage and, on the next run, stops the walk at that border instead of re-reading and re-charging the same history. An empty result here is legitimate and the run says so in plain words.",
            "default": false
          },
          "includeChannelCard": {
            "title": "Add the channel card to every row",
            "type": "boolean",
            "description": "Title, @name, subscribers, description, photo and the verified badge on every message row. Turn off for a narrower table.",
            "default": true
          },
          "includeTextHtml": {
            "title": "Also return the message as HTML",
            "type": "boolean",
            "description": "Adds text_html with Telegram's own markup: bold, italic, links, code blocks and custom emoji ids. Roughly doubles the row size.",
            "default": false
          },
          "compact": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leave out every field that is null or empty. Smaller rows for AI agents and JSON pipelines; CSV exports lose their fixed columns.",
            "default": false
          },
          "inputDatasetId": {
            "title": "Channels from another dataset",
            "type": "string",
            "description": "Dataset id from any other Actor run. Its rows are read and the field below is used as the channel name.",
            "default": ""
          },
          "channelField": {
            "title": "Field holding the channel name",
            "type": "string",
            "description": "Which field of that dataset carries the handle or t.me link.",
            "default": "channel_username"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}