{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper: Posts, Keywords, OSINT | TeleScope",
    "description": "Telegram channel scraper for public channels: returns posts (messages) as JSON with text, date, views, reactions, media and links. No login, phone number or API key. Keyword filter that checks every post, only-new-posts monitoring with built-in memory, cost cap per run. $0.50-$0.80 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "s6TnM7tBjJlaba5tS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/osint-forge~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-osint-forge-telegram-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/osint-forge~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-osint-forge-telegram-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/osint-forge~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-osint-forge-telegram-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",
        "required": [
          "channels"
        ],
        "properties": {
          "channels": {
            "title": "Channels",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Public Telegram channels to read. Each item is a username (durov), @username, or a link (https://t.me/durov). Example: [\"durov\", \"https://t.me/telegram\"]. Up to 500 per run. Private channels, invite links, groups and personal accounts have no public preview: they are listed in the run summary with a clear status and cost at most two page reads ($0.00008), never a post charge.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Maximum posts per channel",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The most posts to return for each channel in this run, newest first. This is the main cost control: the run bills one event per returned post. With \"Only new posts\" on, it is the most new posts returned per run; the rest are returned by the next run, nothing is skipped.",
            "default": 20
          },
          "maxCostUsd": {
            "title": "Cost limit for this run (USD)",
            "minimum": 0.01,
            "maximum": 10000,
            "type": "number",
            "description": "Optional hard cap on what this run can charge, in US dollars, counting the start fee, pages read and posts delivered. The run stops before the next page or post would pass the cap, keeps everything already delivered, and the run summary shows stopReason max_charge_reached and where reading stopped. Example: 0.05 pays for about 60 posts on the Free plan. Works from the API and from AI agents (MCP). Empty means no cap."
          },
          "onlyNewPosts": {
            "title": "Only new posts (monitoring)",
            "type": "boolean",
            "description": "Return only posts published since the previous run, so a scheduled run does not return or bill the same post again. The first run returns the latest posts and remembers the newest one. The position is saved after every page in a key-value store in your account.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor name",
            "maxLength": 60,
            "type": "string",
            "description": "Optional. Each saved Task keeps its own position automatically. Set a name only when you call the Actor directly (API) and need several independent monitors on the same channels, for example \"brand-alerts\" and \"competitors\". Any language works."
          },
          "resetMonitor": {
            "title": "Start this monitor over",
            "type": "boolean",
            "description": "Forget the saved position for the listed channels. This run then behaves like a first run. Switch it off again afterwards.",
            "default": false
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Return only posts that contain these words or phrases. Matching is case-insensitive and works in any language and script. Every post in range is checked by the Actor itself; Telegram's own channel search is not used because it returns only part of the matches.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword logic",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "\"Any\" returns posts with at least one keyword. \"All\" returns posts that contain every keyword.",
            "default": "any"
          },
          "matchWholeWords": {
            "title": "Match whole words only",
            "type": "boolean",
            "description": "When on, \"ton\" matches \"TON\" but not \"Washington\". Leave off for languages that attach prefixes or suffixes to words (Hebrew, Arabic, Russian, Turkish).",
            "default": false
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Return only posts published after this moment. Use a date (2026-11-01), a timestamp (2026-11-01T12:00:00Z) or an age (\"3 days\", \"12 hours\", \"2 weeks\"). Dates are UTC."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Return only posts published before this moment. Same formats as \"Posted after\". For an old period the Actor jumps straight to it instead of reading everything newer."
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Include channel events such as \"Channel photo updated\" or \"Channel name was changed\". Off by default because they are not real posts.",
            "default": false
          },
          "detectLanguage": {
            "title": "Detect post language",
            "type": "boolean",
            "description": "Add a language code (for example en, ru, he, ar) to posts with enough text to tell; shorter posts get null. Detection runs inside the Actor, with no external service and no extra charge.",
            "default": true
          },
          "compactOutput": {
            "title": "Compact output (for AI agents and chat tools)",
            "type": "boolean",
            "description": "Return a short record per post: id, url, channel, publishedAt, text, language, views, reactionsTotal, type, links, matchedKeywords. Records average 0.8 KB instead of 2.3 KB, which saves tokens when an AI agent or chat tool reads the results. The price per post is the same.",
            "default": false
          },
          "exactSubscriberCount": {
            "title": "Exact subscriber count",
            "type": "boolean",
            "description": "The channel preview shows rounded subscriber numbers (9.9M). Switch this on to read the exact number (9,900,339) for each channel in the run summary. Costs one extra page read per channel ($0.00004).",
            "default": false
          },
          "maxPostsToScanPerChannel": {
            "title": "Maximum posts to scan per channel (keyword runs)",
            "minimum": 20,
            "maximum": 200000,
            "type": "integer",
            "description": "Applies only when keywords are set: how many posts the Actor may read in one channel while looking for matches. A keyword run also reads at most 100,000 posts in total. When a limit is reached the summary says so and where reading stopped. Posts that do not match are not billed as posts; reading them costs only the page fee ($0.002 per 1,000 posts).",
            "default": 5000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed in normal use: the Actor reads Telegram's public preview directly. Configure a proxy only if your runs report blocked or unavailable channels. Supported: Apify Proxy with automatic selection. Residential and other special proxy groups and custom proxy URLs are not used; if one is selected the run uses automatic selection or a direct connection instead and says so in the run summary."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}