{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper",
    "description": "Scrape public Telegram channels without login: posts with text, views, reactions per emoji, photos, videos, links and link previews, plus channel stats. Filter by keywords and dates, or run in monitor mode to get only new posts. Pay per post.",
    "version": "1.0",
    "x-build-id": "zhg2eeLdTUn6ULZJN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lmbtechnology~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lmbtechnology-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/lmbtechnology~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lmbtechnology-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/lmbtechnology~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lmbtechnology-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,
            "uniqueItems": true,
            "type": "array",
            "description": "Public channels to scrape, one per line. Use the username (`durov`), the handle (`@durov`) or a link (`https://t.me/durov`). Private channels, groups without a web preview, users and bots cannot be scraped and produce an error item instead.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Maximum posts per channel",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many posts to save for each channel, newest first. Telegram shows about 20 posts per page, so 100 posts means about 5 page loads per channel.",
            "default": 100
          },
          "startDate": {
            "title": "Posts from (start date)",
            "type": "string",
            "description": "Skip posts older than this. Use an absolute date (`2026-01-31`) or a relative one (`7 days`, `2 weeks`, `1 month`). The scraper stops paging a channel once it reaches older posts."
          },
          "endDate": {
            "title": "Posts until (end date)",
            "type": "string",
            "description": "Skip posts newer than this. Absolute (`2026-02-15`, included until the end of that day) or relative (`1 day`). Leave empty for \"now\"."
          },
          "keywords": {
            "title": "Keywords",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only posts whose text (or link preview title) contains at least one of these words or phrases. Matching ignores upper and lower case. Leave empty to keep all posts. Tip: the scraper keeps paging until it finds \"Maximum posts per channel\" matching posts or runs out of history, so set a date range or a page limit for rare keywords.",
            "items": {
              "type": "string"
            }
          },
          "keywordsMatchAll": {
            "title": "Require all keywords",
            "type": "boolean",
            "description": "When on, a post must contain every keyword. When off (default), one matching keyword is enough.",
            "default": false
          },
          "onlyNewPosts": {
            "title": "Monitor mode: only new posts",
            "type": "boolean",
            "description": "Remember the newest post of each channel and, on the next run, return only posts published after it. The position is saved in your key-value store named `telegram-channel-scraper-state`, one record per saved Task (or per monitor name, or per channel list when you run the Actor directly). Ideal with a schedule. The first run returns the normal number of posts.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name (optional)",
            "pattern": "^[a-zA-Z0-9_.-]{0,100}$",
            "type": "string",
            "description": "Only for monitor mode. Give each monitor its own name to keep separate positions, for example when two schedules watch the same channels with different keywords. Leave empty to use the saved Task, or the channel list when you run the Actor directly. Letters, numbers and - _ . only."
          },
          "includeChannelInfo": {
            "title": "Include channel info",
            "type": "boolean",
            "description": "Also save one item per channel with its title, description, subscriber count and media counters (`type: \"channel\"`).",
            "default": true
          },
          "includeReactions": {
            "title": "Include reactions",
            "type": "boolean",
            "description": "Add the reaction counts per emoji and the total to every post.",
            "default": true
          },
          "includeMedia": {
            "title": "Include media",
            "type": "boolean",
            "description": "Add photo URLs, video URLs with thumbnails and document names to every post. Media links come from Telegram's CDN and expire after some time.",
            "default": true
          },
          "includeLinkPreviews": {
            "title": "Include link previews",
            "type": "boolean",
            "description": "Add the link preview card (site name, title, description, image) when a post has one.",
            "default": true
          },
          "maxPagesPerChannel": {
            "title": "Maximum pages per channel",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety limit on how many preview pages (about 20 posts each) to load for one channel. Mostly useful together with keywords so a rare keyword does not walk through the whole channel history.",
            "default": 200
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies used to reach Telegram. Datacenter proxies (default) work for normal use. Switch to residential proxies if you scrape many channels at once and start seeing rate-limit errors.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}