{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper & Monitor: Link Report & Alerts",
    "description": "Read public Telegram channels and get one report across all of them: every site, email and handle they post, and which channels mention which. The monitor remembers where it stopped, delivers only new messages and alerts your webhook. Scan-only reports cost $0.30 per 1,000 messages.",
    "version": "0.1",
    "x-build-id": "mLwmZ0rI8gOJhrHtc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brainfoods_studio~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brainfoods_studio-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/brainfoods_studio~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brainfoods_studio-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/brainfoods_studio~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brainfoods_studio-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": 500,
            "type": "array",
            "description": "Public Telegram channels to read, 1 to 500. Give @name, name, t.me/name, t.me/s/name or a link to one message. Duplicates are removed. Invite links (t.me/+...) and private channels cannot be read and give a free row.",
            "items": {
              "type": "string"
            }
          },
          "maxMessagesPerChannel": {
            "title": "Max messages per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Messages read per channel, newest first. This counts messages read, not delivered, so a filter that matches nothing still stops at this number. 0 is a profile-only run: it needs Include channel details and cannot be combined with the report, monitor mode, search, keywords or a start date.",
            "default": 100
          },
          "postedAfter": {
            "title": "Only messages after",
            "type": "string",
            "description": "A date like 2026-10-01 (UTC midnight) or a span back from now like 30 days, 12 hours or 2 weeks. Reading stops at the first older message. Leave empty for no limit."
          },
          "search": {
            "title": "Search inside channels",
            "type": "string",
            "description": "Telegram's own in-channel search, one phrase per run, up to 100 characters. Leave empty to read every message."
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50. A message is delivered only if its text contains one of them (case ignored). Messages are still read and counted against the limit above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Up to 50. A message that contains one of them is not delivered (case ignored).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "deliverMessages": {
            "title": "Deliver message rows",
            "type": "boolean",
            "description": "Switch off to read messages only for the report. Needs Build the cross-channel report, and cannot be combined with monitor mode.",
            "default": true
          },
          "includeChannelInfo": {
            "title": "Include channel details",
            "type": "boolean",
            "description": "Adds the charged channel details to each channel row: description, counters and the exact subscriber count.",
            "default": false
          },
          "intelligence": {
            "title": "Build the cross-channel report",
            "type": "boolean",
            "description": "Builds one report across all channels: the sites, emails and Telegram handles they post, which channels mention which (links between channels), plus a cross-channel link and email report. Emails can belong to private people. Use it on public business channels, and only if you have a lawful reason to hold the contacts.",
            "default": false
          },
          "includeHtml": {
            "title": "Include message HTML",
            "type": "boolean",
            "description": "Adds the message text as HTML (textHtml) to each message row.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Channels read in parallel, 1 to 6. If Telegram answers with a rate limit, the run slows down and then stops instead of pushing on.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is enough for the public preview pages. Residential proxies are not used.",
            "default": {
              "useApifyProxy": true
            }
          },
          "monitorKey": {
            "title": "Monitor: remember results as",
            "type": "string",
            "description": "Turns on monitor mode. The newest message id per channel is remembered under this name and later runs deliver only newer messages. The first run delivers the newest messages as a baseline. Cannot be combined with the cross-channel report, with Deliver message rows off, or with 0 messages per channel. Use one name per schedule."
          },
          "deliveryWebhookUrl": {
            "title": "Monitor: send new messages to",
            "type": "string",
            "description": "Optional, needs the monitor name. A Slack incoming-webhook URL or any HTTPS endpoint. When a monitored run delivers new messages, it posts a short alert with a link to the results. Stored encrypted and hidden from logs, because a webhook URL works like a password."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}