{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper — Posts, Views, Media",
    "description": "Public Telegram channel posts with date, text, views, reactions, forwards, replies, media links and channel info. Date range, Arabic-safe keyword filter and a new-posts-only alert mode. No login or API key. Status per channel; channel rows are free.",
    "version": "0.1",
    "x-build-id": "oaJgLYza8r2MNjQO7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dottti~telegram-channels/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dottti-telegram-channels",
        "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/dottti~telegram-channels/runs": {
      "post": {
        "operationId": "runs-sync-dottti-telegram-channels",
        "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/dottti~telegram-channels/run-sync": {
      "post": {
        "operationId": "run-sync-dottti-telegram-channels",
        "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": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Public channel usernames or links. Examples: durov, @telegram, https://t.me/bbcarabic, https://t.me/s/durov. Invite links (t.me/+...) are private and get a free status row.",
            "default": [
              "telegram"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops each channel after this many posts that pass your filters. Newest posts come first.",
            "default": 20
          },
          "dateFrom": {
            "title": "Posts from (oldest date)",
            "type": "string",
            "description": "Only posts on or after this date. Use YYYY-MM-DD (UTC), an ISO time, or a relative value like '7 days' or '12 hours'. Empty = no lower limit."
          },
          "dateTo": {
            "title": "Posts to (newest date)",
            "type": "string",
            "description": "Only posts on or before this date (a date-only value includes that whole UTC day). The actor jumps to this date instead of reading every newer page."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only posts that contain these words or phrases. Case-insensitive. Arabic matching ignores diacritics and tatweel, and treats أ/إ/آ/ا, ى/ي and ة/ه as the same letter. Also searches link previews, polls and file names. Filtered-out posts are not charged.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any = a post needs one keyword. all = a post needs every keyword.",
            "default": "any"
          },
          "includeMedia": {
            "title": "Include media links",
            "type": "boolean",
            "description": "Adds photo, video, sticker and link-preview image URLs. Media type, count, durations and file names are always included. These CDN links are signed by Telegram and expire, so download what you need soon after the run.",
            "default": true
          },
          "includeServiceMessages": {
            "title": "Include service messages",
            "type": "boolean",
            "description": "Service messages are notes like 'Channel photo updated'. Off by default.",
            "default": false
          },
          "maxPagesPerChannel": {
            "title": "Max pages per channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap. One page holds about 20 posts. Raise it for long date ranges or rare keywords.",
            "default": 50
          },
          "exactChannelInfo": {
            "title": "Exact subscriber count",
            "type": "boolean",
            "description": "Makes one extra small request per channel to read the exact subscriber count (the preview page rounds it, for example 10.3M).",
            "default": true
          },
          "onlyNew": {
            "title": "Only new posts (alert mode)",
            "type": "boolean",
            "description": "Remembers the last post seen per channel. The first run outputs the newest posts as a baseline. Later runs output only posts published since. Use it on a schedule.",
            "default": false
          },
          "stateName": {
            "title": "Alert list name",
            "type": "string",
            "description": "Separate names keep separate memory, for example 'crypto-watch' and 'gulf-news'. Stored in the named key-value store 'telegram-channels-state'.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Leave off to use the automatic fallback below. If you set a proxy here, it is used for every request and the fallback is off."
          },
          "autoProxyFallback": {
            "title": "Automatic proxy fallback",
            "type": "boolean",
            "description": "Starts without a proxy. If Telegram keeps answering 429 or errors, switches to Apify datacenter proxy, then residential.",
            "default": true
          },
          "allowResidentialFallback": {
            "title": "Allow residential proxy as the last step",
            "type": "boolean",
            "description": "Turn off to never use residential proxy.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Channels in parallel",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Requests are still spaced out across all channels. Higher is faster and more likely to be rate-limited.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}