{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Search & Channel Scraper — Keywords, Posts, No Login",
    "description": "Public Telegram posts by keyword across all of Telegram, or the full history of public channels. Text, date, views, reactions, media, channel stats. Same input and output fields as the leading Telegram keyword scraper. No account, no API key. $0.25 per 1,000 messages.",
    "version": "0.1",
    "x-build-id": "oquPzh8059kGGF3hX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sherwood~telegram-keyword-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sherwood-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/sherwood~telegram-keyword-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sherwood-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/sherwood~telegram-keyword-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sherwood-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",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to find in public Telegram posts. Without channels, each keyword is searched across all of Telegram (channels found through Google, then searched inside). With channels, the keywords are searched inside those channels only. A post is kept only if it contains every word of the keyword.",
            "default": [
              "bitcoin ETF"
            ],
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Public channel usernames or links: durov, @durov, t.me/durov, https://t.me/s/durov all work. Without keywords, returns the channel's latest messages, newest first.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode (optional)",
            "enum": [
              "keyword",
              "channel"
            ],
            "type": "string",
            "description": "Optional. Inferred when empty: channel when channels are given, keyword otherwise. Kept for drop-in compatibility with lofomachines/telegram-keyword-search-scraper inputs."
          },
          "maxResultsPerKeyword": {
            "title": "Max messages per keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Keyword search across Telegram: messages kept per keyword, newest first.",
            "default": 50
          },
          "channelMaxMessages": {
            "title": "Max messages per channel",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Channel mode: messages per channel (per channel and keyword when both are given).",
            "default": 50
          },
          "maxChannelsPerKeyword": {
            "title": "Max channels searched per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keyword search across Telegram: how many channels found for the keyword are searched.",
            "default": 20
          },
          "afterDate": {
            "title": "Published after",
            "type": "string",
            "description": "Only posts on or after this date: 2026-01-31, or relative: 7 days, 2 weeks, 1 month, 1 year."
          },
          "beforeDate": {
            "title": "Published before",
            "type": "string",
            "description": "Only posts before this date (2026-01-31)."
          },
          "channelAfterDate": {
            "title": "Channel mode: published after",
            "type": "string",
            "description": "Same as Published after, for channel mode (leader-compatible name). Falls back to Published after."
          },
          "exactPhrase": {
            "title": "Exact phrase",
            "type": "boolean",
            "description": "Keep only posts that contain the keyword as an exact phrase (default: every word, in any order).",
            "default": false
          },
          "matchAllWords": {
            "title": "Drop posts without the keyword",
            "type": "boolean",
            "description": "Telegram's search also returns loose matches. On by default: a post is kept only if its text contains the keyword's words.",
            "default": true
          },
          "countryCode": {
            "title": "Country for channel discovery",
            "type": "string",
            "description": "ISO country code for the Google search that finds channels (us, gb, fr, de…).",
            "default": "us"
          },
          "languageCode": {
            "title": "Language for channel discovery",
            "type": "string",
            "description": "ISO language code for the Google search that finds channels (en, fr, ru…).",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}