{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Keyword Search Scraper | Brand Mentions",
    "description": "Search public Telegram posts by keyword or brand with AND/OR/NOT operators and view, subscriber, media and language filters. Export CSV/JSON, no Telegram login. $1/1K posts + $0.005/verified discovery page + start fee. Telegram关键词搜索与品牌监测，无需登录。",
    "version": "0.10",
    "x-build-id": "8dScovHC7wVNe8yfp"
  },
  "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": "What do you want to collect?",
            "enum": [
              "auto",
              "keyword",
              "channel",
              "hybrid",
              "keywordInChannels"
            ],
            "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": "For keyword searches, including searches within known channels: one word or phrase per line. The starter matches the post text and skips recognized signature-only matches. Matching rules are under Match quality and text filters. Ignored in Channel scraping. Advanced: one keyword can combine terms with AND, OR, NOT, a leading - and \"quoted phrases\" (for example lavazza AND capsule OR cialde NOT recensione). Without operators, the whole line is one literal phrase.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "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": []
          },
          "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"
            }
          },
          "maxResults": {
            "title": "Maximum posts in total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "One total shared by every keyword and channel. Start with 5. Optional per-keyword and per-channel caps apply within it. Discovery pages are charged separately: also set Maximum cost per run.",
            "default": 5
          },
          "afterDate": {
            "title": "Published on or after",
            "type": "string",
            "description": "Inclusive start in UTC. Use YYYY-MM-DD or 7 days. Dates and ranges are validated before collection starts."
          },
          "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."
          },
          "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."
          },
          "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"
          },
          "maxResultsPerKeyword": {
            "title": "Maximum matching posts per keyword",
            "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."
          },
          "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
          },
          "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
          },
          "keywordMatchScope": {
            "title": "Where must the keyword appear?",
            "enum": [
              "textOrChannel",
              "postText"
            ],
            "type": "string",
            "description": "Keyword discovery only. Post text only rejects channel-title-only matches unless nearby context posts are enabled. 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": "Include nearby posts without a keyword",
            "type": "boolean",
            "description": "Off by default. Enable only when you want nearby context too; these posts are labelled channel_context and count toward the total post limit.",
            "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
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}