{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Scraper: Keyword Search, Mentions & Alerts",
    "description": "Telegram search engine for public posts. Find messages by keyword, brand mentions, crypto tickers or OSINT topics with AND/OR/NOT, date, views and language filters. CSV/JSON, no login. $1/1K posts. Telegram关键词搜索 · Поиск постов в Telegram.",
    "version": "0.10",
    "x-build-id": "1dDWmlc1U5SkzJsnW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/monkey.d.scraping~telegram-keyword-search-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-monkey.d.scraping-telegram-keyword-search-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/monkey.d.scraping~telegram-keyword-search-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-monkey.d.scraping-telegram-keyword-search-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/monkey.d.scraping~telegram-keyword-search-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-monkey.d.scraping-telegram-keyword-search-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": {
          "collectionMode": {
            "title": "Where do you want to search?",
            "enum": [
              "keyword",
              "keywordInChannels",
              "channel",
              "auto",
              "hybrid"
            ],
            "type": "string",
            "description": "Keyword search finds public posts by keyword. Channel scraping collects known channels. Both combines them. Search within known channels requires both keywords and channels. Automatic uses whichever sources you fill.",
            "default": "auto"
          },
          "keywords": {
            "title": "Keywords to find",
            "type": "array",
            "description": "One keyword or phrase per line. Each distinct line gets its own post allowance.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "afterDate": {
            "title": "How far back?",
            "type": "string",
            "description": "Choose a rolling window such as 24 hours, 7 days or 30 days, or enter an inclusive UTC start date."
          },
          "postsPerKeyword": {
            "title": "Posts per keyword",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total = distinct keywords × posts per keyword, up to 10,000 posts. For example, 6 keywords × 10 = up to 60 posts. Set a smaller overall cap under Advanced limits. Set your spending limit separately in Run options."
          },
          "spreadAcrossChannels": {
            "title": "Spread the sample across channels",
            "type": "boolean",
            "description": "Optional: first take up to 2 matching posts from each of the first 5 discovered sources, then fill the remaining quota from productive sources. Explicit per-channel caps still apply. Checks more posts and can take longer. Off preserves source-order collection.",
            "default": false
          },
          "channels": {
            "title": "Known Telegram channels",
            "type": "array",
            "description": "For Channel scraping, Both, or keyword search within known channels: public usernames or URLs, one per line. Leave empty for Keyword search. Known channels do not require paid keyword discovery.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "beforeDate": {
            "title": "Published on or before",
            "type": "string",
            "description": "Inclusive end in UTC: YYYY-MM-DD includes the entire day through 23:59:59.999. A timestamp with timezone keeps its exact time."
          },
          "maxResults": {
            "title": "Maximum posts in total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional ceiling across all sources. With Posts per keyword, the smaller of this ceiling and the calculated total applies. Channel-only exports use 5 when omitted."
          },
          "maxResultsPerKeyword": {
            "title": "Saved workflow keyword cap (optional)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional cap for each keyword, within Maximum posts in total. Leave empty for no separate keyword cap. Spending is set by Maximum cost per run. This is a maximum, not a target or a minimum."
          },
          "maxResultsPerChannel": {
            "title": "Maximum posts per channel",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional cap for each channel, within Maximum posts in total. The starter uses 2 to spread results across sources. Clear it if you want more matching posts from the same channel."
          },
          "discoveryCoverage": {
            "title": "Search coverage",
            "enum": [
              "quick",
              "standard",
              "thorough"
            ],
            "type": "string",
            "description": "Quick explores less and usually costs less. Standard is the balanced default. Thorough searches more broadly and can cost more. The stop after pages without new matches applies at every depth, including Thorough.",
            "default": "standard"
          },
          "maxUnproductiveDiscoveryPages": {
            "title": "Stop keyword after pages without new matches",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Default 2 consecutive verified discovery pages without new matching posts. Stops further pages for that keyword, then tries the next keyword, which keeps cost down. Pages already verified are billed. Set 0 to disable; the run cost cap still applies.",
            "default": 2
          },
          "searchWithinChannels": {
            "title": "Search inside discovered channels",
            "type": "boolean",
            "description": "Enabled by default to recover additional literal matches inside discovered channels, in up to 5 discovered channels per keyword (3 for a single keyword) and within a bounded allowance per run. Result, date and spend settings apply. Disable for potentially shorter runs; enabled, it can return more posts from the same source.",
            "default": true
          },
          "countryCode": {
            "title": "Country preference (optional)",
            "pattern": "^(auto|[A-Za-z]{2})$",
            "type": "string",
            "description": "No preference sends no country setting. Influences discovery ranking. Post and author location are not filtered."
          },
          "languageCode": {
            "title": "Search language preference (optional)",
            "pattern": "^(auto|[A-Za-z]{2})$",
            "type": "string",
            "description": "No preference sends no search-language setting. Influences discovery ranking. Keywords and posts are not translated, and posts are not filtered by language."
          },
          "keywordMatchScope": {
            "title": "Where must the keyword appear?",
            "enum": [
              "textOrChannel",
              "postText"
            ],
            "type": "string",
            "description": "Keyword discovery only. Post text only rejects channel-title-only matches when verifying mentions. Output shows the literal matches in each field. Matching is literal; signatures in post text count as post text.",
            "default": "postText"
          },
          "excludeSignatureOnlyMatches": {
            "title": "Skip matches found only in recognized signatures",
            "type": "boolean",
            "description": "Keyword discovery only. Enabled by default: skips posts whose keyword matches occur only in a short trailing channel-brand signature after an explicit separator. Uses a conservative heuristic. Original post text is never changed.",
            "default": true
          },
          "includeContextPosts": {
            "title": "Attach neighboring posts to a mention",
            "type": "boolean",
            "description": "Attach up to two available neighboring posts to each matching result. Context is included in the same row at no additional post charge.",
            "default": false
          },
          "includeKeywords": {
            "title": "Also include at least one phrase",
            "type": "array",
            "description": "Keep posts whose text or channel title contains at least one of these phrases, in addition to the search keyword. For a brand, add product/context terms (for example coffee, espresso, caffè). This is a literal OR filter; add multilingual variants when needed.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Must not include",
            "type": "array",
            "description": "Discard posts whose text or channel title contains any listed phrase. Use for known unwanted contexts; matching is literal.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "regexFilters": {
            "title": "Advanced regex patterns",
            "type": "array",
            "description": "Optional JavaScript-compatible regular expressions applied to public post text. Leave empty for normal use.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Keep only posts whose public view count is at least this number. Posts without a public view count are skipped when this is set."
          },
          "minSubscribers": {
            "title": "Minimum channel subscribers",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Keep only posts from channels whose public subscriber count is at least this number."
          },
          "excludeForwards": {
            "title": "Skip forwarded posts",
            "type": "boolean",
            "description": "Off by default. Enable to keep only original posts and skip posts forwarded from another channel.",
            "default": false
          },
          "mediaFilter": {
            "title": "Media filter",
            "enum": [
              "any",
              "withMedia",
              "textOnly"
            ],
            "type": "string",
            "description": "Any post is the default. With media keeps posts that have photos, videos, documents or other attachments; Text only keeps posts without attachments.",
            "default": "any"
          },
          "postLanguages": {
            "title": "Post languages",
            "type": "array",
            "description": "Optional ISO 639-1 codes, one per line (for example en, it, ru). Keeps posts whose text is detected in one of these languages. Detection is a local statistical estimate on posts of at least 20 characters; shorter posts are skipped when this is set.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            },
            "default": []
          },
          "excludeChannels": {
            "title": "Skip these channels",
            "type": "array",
            "description": "Skip these public usernames or URLs before reading their posts, in all collection modes. Discovery pages already verified are charged.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "sourcePriority": {
            "title": "Collect first when using both sources",
            "enum": [
              "channelsFirst",
              "keywordsFirst"
            ],
            "type": "string",
            "description": "Known channels first is the default. If they fill the total post limit, keyword discovery is skipped. Choose keyword discovery first when topic research matters more.",
            "default": "channelsFirst"
          },
          "downloadMedia": {
            "title": "Download available public media",
            "type": "boolean",
            "description": "Off by default to keep runs fast and inexpensive. When enabled, available public media is saved in the run key-value store.",
            "default": false
          },
          "excludePostUrls": {
            "title": "Already delivered post URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "For keyword search within known channels. Paste up to 1,000 canonical public post URLs or use the repeat search input from Output. Posts on this list are skipped before the result limit.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}