{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper & Keyword Monitor (No Login)",
    "description": "Scrape public Telegram channels without login or API keys. Filter by keywords and date range; get text, views, reactions, links and media as JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "maEddPITxcVMcZ5ke"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryumoon-data~telegram-channel-keyword-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryumoon-data-telegram-channel-keyword-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/ryumoon-data~telegram-channel-keyword-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ryumoon-data-telegram-channel-keyword-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/ryumoon-data~telegram-channel-keyword-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ryumoon-data-telegram-channel-keyword-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",
            "type": "array",
            "description": "Public Telegram channel usernames or links to scrape, e.g. [\"durov\", \"@telegram\", \"https://t.me/s/bbcbreaking\"]. Only channels with web preview enabled can be scraped. Don't know the channels? Run Telegram Channel Finder (ryumoon-data/telegram-channel-finder) first. If left empty, the example channels durov and telegram are used.",
            "default": [
              "durov",
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return messages containing these words or phrases (case-insensitive). Leave empty to return every message.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Return messages matching ANY keyword or ALL keywords.",
            "default": "any"
          },
          "wholeWordMatch": {
            "title": "Whole words only",
            "type": "boolean",
            "description": "If on, 'eth' will not match 'ethics'.",
            "default": false
          },
          "useTelegramSearch": {
            "title": "Use Telegram's built-in channel search",
            "type": "boolean",
            "description": "Much faster for keyword searches across long histories: asks Telegram for matching posts instead of reading every post. Results are still filtered locally for accuracy. Turn off to scan the full timeline.",
            "default": true
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Oldest post to include. YYYY-MM-DD, an ISO timestamp, or relative like '7 days', '24 hours', '7d' or 'last week'."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Newest post to include (inclusive). Same formats as From date. The scraper jumps straight to this date instead of paging through newer posts."
          },
          "maxMessagesPerChannel": {
            "title": "Max messages per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum posts to return per channel (newest first). 0 = no limit (bounded by the date range). Keep this low to control cost.",
            "default": 20
          },
          "maxMessagesTotal": {
            "title": "Max messages in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap across all channels. 0 = no limit.",
            "default": 0
          },
          "onlyNewMessages": {
            "title": "Only new messages since last run (monitoring mode)",
            "type": "boolean",
            "description": "Remembers the newest post seen per channel and only returns newer posts next time. Ideal with a schedule + webhook/Slack/email integration.",
            "default": false
          },
          "includeChannelInfo": {
            "title": "Add channel title and subscriber count",
            "type": "boolean",
            "description": "Add the channel title and subscriber count to every row.",
            "default": true
          },
          "skipMessagesWithoutText": {
            "title": "Skip media-only posts",
            "type": "boolean",
            "description": "Drop posts that have no text (media-only posts).",
            "default": false
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Polite rate limit towards t.me. Each request returns up to ~20 posts.",
            "default": 30
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between page requests to stay polite towards t.me.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max retries per page",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a page that fails before giving up.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Use Apify Proxy if you scrape many channels on a tight schedule.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}