{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Keyword Search Scraper - Messages by Keyword, No Login",
    "description": "Search public Telegram channels by keyword, phrase or #hashtag: message text, link, date, views, reactions, media, polls, forwards, channel subscribers. Finds channels with Google or searches yours. Keeps only messages with your keyword (or a form Telegram highlights). No login. Pay per message.",
    "version": "0.1",
    "x-build-id": "gzStUKzcbL0bVD4w8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hexagone-data~telegram-keyword-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hexagone-data-telegram-keyword-search-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/hexagone-data~telegram-keyword-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hexagone-data-telegram-keyword-search-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/hexagone-data~telegram-keyword-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hexagone-data-telegram-keyword-search-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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One per line (1 to 50): a word (bitcoin), a phrase (data breach), a phrase in quotes for the exact phrase (\"privacy is\") or a #hashtag (#airdrop). Every keyword is searched in every channel below and in the channels Google finds for it.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels to search (optional)",
            "type": "array",
            "description": "Public channels, one per line: durov, @durov, https://t.me/durov, https://t.me/s/durov or a message link (t.me/durov/535 is read as the channel durov). Each is searched for every keyword. Private invite links (t.me/+…), groups and bots have no public page and are reported, not charged.",
            "items": {
              "type": "string"
            }
          },
          "discoverChannels": {
            "title": "Find channels with Google",
            "type": "boolean",
            "description": "On: Google (site:t.me <keyword>, first results page) finds public channels that talk about each keyword, and they are searched too. The Google cost is ours, not billed separately. Off: only the channels above are searched.",
            "default": true
          },
          "maxChannelsPerKeyword": {
            "title": "Max channels found by Google per keyword",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Up to this many channels kept from Google for each keyword (1 to 30). Google usually gives 5 to 15; groups and bots it gives count here and are not read, so you may get fewer readable channels.",
            "default": 10
          },
          "discoveryLanguage": {
            "title": "Google language (hl)",
            "type": "string",
            "description": "Language of the Google results used to find channels: en, de, fr, ru, ar…",
            "default": "en"
          },
          "discoveryCountry": {
            "title": "Google country (gl)",
            "type": "string",
            "description": "Country of the Google results used to find channels: us, gb, de, fr, ru, ae…",
            "default": "us"
          },
          "searchDepth": {
            "title": "Search depth",
            "enum": [
              "fast",
              "deep"
            ],
            "type": "string",
            "description": "fast: Telegram's own search in each channel (it returns at most the ~22 newest matches per channel and keyword). deep: also scans the channel's history (up to the limit below) and keeps the messages that carry the keyword.",
            "default": "fast"
          },
          "maxMessagesScannedPerChannel": {
            "title": "Max history messages scanned per channel (deep)",
            "minimum": 20,
            "maximum": 5000,
            "type": "integer",
            "description": "Deep mode only: how far back the history of each channel is read (20 to 5,000 messages, 20 per page).",
            "default": 500
          },
          "matchMode": {
            "title": "Keyword match",
            "enum": [
              "contains",
              "exact",
              "all"
            ],
            "type": "string",
            "description": "Telegram's search also returns messages WITHOUT your keyword (measured: 65 of 306). contains (default): keep a message when the keyword is in its text, link preview, poll or document title (case and accents ignored), or when Telegram highlights a form of it. exact: the word or phrase as typed, as a whole word. all: everything Telegram returns (keywordInText tells which ones carry it). Left-out messages are counted, never delivered or charged.",
            "default": "contains"
          },
          "afterDate": {
            "title": "Only messages after",
            "type": "string",
            "description": "A date (2026-11-01) or a period (7 days, 24 hours, 2 weeks). Older messages are not delivered and older pages are not read."
          },
          "beforeDate": {
            "title": "Only messages before",
            "type": "string",
            "description": "A date (2026-11-15) or a period (3 days): newer messages are left out. In fast mode only the ~22 newest matches are searched, so older ones are not reached; in deep mode the history is read from the newest message and the newer ones still count toward the scan limit below."
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only messages with at least this many views."
          },
          "onlyWithMedia": {
            "title": "Only messages with media",
            "type": "boolean",
            "description": "Keep only messages with a photo, video, document, sticker or media Telegram does not show on the web.",
            "default": false
          },
          "maxResultsPerChannel": {
            "title": "Max messages per channel and keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Messages delivered at most for one keyword in one channel (1 to 5,000).",
            "default": 100
          },
          "maxItems": {
            "title": "Max messages in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops when this many messages are delivered (1 to 100,000).",
            "default": 1000
          },
          "includeChannelDetails": {
            "title": "Exact subscriber count",
            "type": "boolean",
            "description": "On: one extra light page per channel (t.me/<channel>) gives the exact subscriber count (channelSubscribers). Off: only the rounded count (9.93M) in channelSubscribersText.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy for t.me pages. The default (Apify datacenter) works; Telegram needs no login. Google discovery always uses Apify's Google SERP proxy.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}