{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Keyword Search: Messages Across All Channels",
    "description": "Search public Telegram messages by keyword or #hashtag across channels you don't know yet. Get text, views, reactions, media, links, date and exact channel subscribers. Brand, crypto and OSINT monitoring. No login or API key.",
    "version": "0.1",
    "x-build-id": "wbZvIsCvM7bVpQqj2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~telegram-keyword-message-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-telegram-keyword-message-search",
        "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/automation-lab~telegram-keyword-message-search/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-telegram-keyword-message-search",
        "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/automation-lab~telegram-keyword-message-search/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-telegram-keyword-message-search",
        "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 or hashtags",
            "maxItems": 50,
            "type": "array",
            "description": "Words, phrases or #hashtags to find in public Telegram messages. Each one is searched separately and every result row names the keyword that found it. Examples: `nvidia`, `bitcoin halving`, `#airdrop`.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum messages",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many matching messages in total, across all keywords.",
            "default": 100
          },
          "afterDate": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only messages published on or after this date. Pick a date or type a relative value such as `7 days`, `2 weeks` or `1 month`."
          },
          "beforeDate": {
            "title": "Posted before",
            "type": "string",
            "description": "Only messages published before this date. Leave empty for no upper bound."
          },
          "discoverChannels": {
            "title": "Find channels that mention the keywords",
            "type": "boolean",
            "description": "Find public channels that mention each keyword through web search (Google and DuckDuckGo, restricted to t.me), then search inside each of them. Turn it off to search only the channels you list below.",
            "default": true
          },
          "channels": {
            "title": "Channels to always search",
            "maxItems": 500,
            "type": "array",
            "description": "Optional public channel usernames or links, such as `durov`, `@telegram` or `https://t.me/s/nvidia`. They are searched for every keyword, on top of the discovered channels.",
            "items": {
              "type": "string"
            }
          },
          "maxChannelsPerKeyword": {
            "title": "Channels to discover per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many discovered channels to search for each keyword. More channels give broader coverage and take longer.",
            "default": 20
          },
          "maxResultsPerChannel": {
            "title": "Maximum messages per channel",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum matching messages taken from one channel for one keyword, newest first.",
            "default": 20
          },
          "language": {
            "title": "Discovery language",
            "type": "string",
            "description": "Two-letter language code that biases which channels web search finds, for example `en`, `es`, `ru` or `de`. It does not translate or filter messages.",
            "default": "en"
          },
          "country": {
            "title": "Discovery country",
            "type": "string",
            "description": "Two-letter country code that biases which channels web search finds, for example `us`, `gb`, `in` or `br`.",
            "default": "us"
          },
          "discoveryTimeRange": {
            "title": "Discover channels active in",
            "enum": [
              "any",
              "d",
              "w",
              "m",
              "y"
            ],
            "type": "string",
            "description": "Favour channels whose pages search engines indexed in this period. Use it to find channels active right now.",
            "default": "any"
          },
          "strictMatch": {
            "title": "Exact keyword match",
            "type": "boolean",
            "description": "Keep only messages that contain every word of the keyword as a whole word, outside links, @handles and the channel's own sign-off. A link preview of an outside page counts. Telegram's own search also matches word forms (staking finds stake), links and sign-offs; switch this off to keep those too.",
            "default": true
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only messages with at least this many views."
          },
          "onlyWithMedia": {
            "title": "Only messages with media",
            "type": "boolean",
            "description": "Only messages that carry a photo, video, document, voice note, poll or sticker.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}