{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper — Posts, Views & Admin Contacts",
    "description": "$0.29 per 1,000 posts. Scrape public Telegram channels without login: posts with views, reactions and links, or channel stats with the admin emails and @usernames they publish. Run daily, weekly or monthly via Apify schedules, n8n, Make or Zapier. Missing channels are free.",
    "version": "1.0",
    "x-build-id": "reorNhRpTHsDvzrz7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fermaja~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fermaja-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/fermaja~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fermaja-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/fermaja~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fermaja-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",
        "properties": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Public channels, one per line. Every form works: durov, @durov, t.me/durov, https://t.me/s/durov, a post link (t.me/durov/123), telegram.me/durov or tg://resolve?domain=durov. Comma or semicolon lists in one line and duplicates are fine. A display name (Watcher Guru) is tried as the joined username and kept only when that channel's title matches. Private invite links (t.me/+...) cannot be read and are listed in the status message.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to scrape",
            "type": "string",
            "description": "Posts (default): one row per post with text, date, views, reactions, links and media, plus the channel's title and subscribers. Channel info & contacts: one row per channel with subscribers, average views, posts per week and the emails, @usernames and websites in its description (for ad buyers and outreach).",
            "default": "posts"
          },
          "maxPostsPerChannel": {
            "title": "Max posts per channel",
            "type": "integer",
            "description": "Newest posts to collect from each channel (Posts mode). 0 = every public post, up to 5,000 per channel per run. In Channel mode the stats always use the latest ~20 posts.",
            "default": 20
          },
          "searchKeywords": {
            "title": "Only posts with these keywords (optional)",
            "type": "array",
            "description": "Uses Telegram's own search inside each channel, then keeps posts that really contain the word. One keyword per line, or several in one line split by commas. Short words (AI, ETF) match whole words only. Each post shows which keyword matched.",
            "items": {
              "type": "string"
            }
          },
          "postsFrom": {
            "title": "Posts from (optional)",
            "type": "string",
            "description": "Oldest post date to keep. Any format: 2026-11-01, 01.11.2026, Nov 1 2026, Nov 15 (no year = the latest such day), \"October 2026\", or a lookback like \"last 7 days\", \"2 weeks\", \"1 month\", \"yesterday\". A whole range in this field (2026-11-01 to 2026-11-10) also works."
          },
          "postsUntil": {
            "title": "Posts until (optional)",
            "type": "string",
            "description": "Newest post date to keep, same formats (a day means the end of that day). Leave empty for up to now."
          },
          "onlyNewPosts": {
            "title": "Only new posts since the last run",
            "type": "boolean",
            "description": "For scheduled monitoring: each run returns only posts published after the newest post the previous run saw for that channel (and keyword set). The first run returns up to \"Max posts per channel\". Channels with nothing new get one free row saying so.",
            "default": false
          },
          "datasetId": {
            "title": "Import channels from a dataset (optional)",
            "type": "string",
            "description": "Pick a dataset from another run (or pass its ID, e.g. {{ $json.defaultDatasetId }} in n8n), such as the Telegram column of a website contact scrape. Channels are read from the column named below and added to the list above. The scraper only gets read access to this one dataset."
          },
          "datasetField": {
            "title": "Channel column in that dataset",
            "type": "string",
            "description": "Field that holds the channel username or t.me link (dot notation works, e.g. socials.telegram). If it is empty, a column named telegram, channel, username or url is used automatically.",
            "default": "telegram"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed for normal runs. For very large runs Telegram may rate-limit one IP: turn on Apify Proxy (datacenter) and the scraper switches to it automatically when that happens.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}