{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper (No Login)",
    "description": "Scrape public Telegram channels without login or API keys: messages, views, reactions, media, links, emails and @mentions, plus public comments under posts. Only-new mode for schedules, filters by type, views and words.",
    "version": "0.1",
    "x-build-id": "mv6fxJS2GbH9TDxFw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smoldesk~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smoldesk-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/smoldesk~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-smoldesk-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/smoldesk~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-smoldesk-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 channel usernames or links, e.g. durov, @durov, https://t.me/durov. Private channels and groups are not supported.",
            "default": [
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post links",
            "type": "array",
            "description": "Single posts by link, e.g. https://t.me/durov/123. Use it together with comments to get the discussion under specific posts.",
            "items": {
              "type": "string"
            }
          },
          "maxMessagesPerChannel": {
            "title": "Max messages per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Newest messages first. 0 = no limit (scrape the whole history, respecting the date filter).",
            "default": 100
          },
          "searchQuery": {
            "title": "Keyword search (inside each channel)",
            "type": "string",
            "description": "Only return messages matching this keyword or #hashtag. Uses Telegram's own in-channel search."
          },
          "dateFrom": {
            "title": "Messages newer than",
            "type": "string",
            "description": "Stop when messages are older than this date (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Messages older than",
            "type": "string",
            "description": "Skip messages newer than this date (YYYY-MM-DD)."
          },
          "lastNDays": {
            "title": "Only the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Shortcut for 'From date': only messages from the last N days. Handy for schedules."
          },
          "excludeKeywords": {
            "title": "Exclude messages containing",
            "type": "array",
            "description": "Skip (and don't charge) messages whose text contains any of these words. Case doesn't matter.",
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Only these message types",
            "type": "array",
            "description": "Keep only messages of these types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "video",
                "document",
                "poll",
                "other"
              ],
              "enumTitles": [
                "Text only",
                "Photo",
                "Video",
                "File / document",
                "Poll",
                "Other"
              ]
            }
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Skip messages with fewer views. 0 = keep all.",
            "default": 0
          },
          "onlyNewMessages": {
            "title": "Only new messages (monitor mode)",
            "type": "boolean",
            "description": "Remember the newest message per channel and, on the next run, return only messages posted after it. Use it with a schedule.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Save the public comments under each post (from the channel's discussion group) as separate rows (type 'comment'), and add 'commentCount' to each message. Channels without comments are skipped for free.",
            "default": false
          },
          "maxCommentsPerMessage": {
            "title": "Max comments per message",
            "minimum": 0,
            "type": "integer",
            "description": "Newest comments first. 0 = all.",
            "default": 20
          },
          "includeChannelInfo": {
            "title": "Include channel info",
            "type": "boolean",
            "description": "Add one item per channel with title, description, subscribers, verified badge and photo.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Channels in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many channels to scrape at the same time.",
            "default": 5
          },
          "delaySeconds": {
            "title": "Delay between pages (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Pause between page requests for each channel. Increase if you hit rate limits.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Enable if you scrape thousands of pages.",
            "default": {
              "useApifyProxy": false
            }
          },
          "compact": {
            "title": "Compact output (for AI agents)",
            "type": "boolean",
            "description": "Return smaller rows: only the main fields from the dataset views, without image links or empty values. Good for AI agents, MCP tools and LLM pipelines with limited context.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}