{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper",
    "description": "Turn any public Telegram channel into clean, structured data. Every post with its full text, photos, videos, views, reactions, forwards and replies — the newest posts, a date range, or the whole archive. No Telegram account and no login. Export to CSV, Excel or JSON.",
    "version": "0.0",
    "x-build-id": "1Yci00SCQcZHNCVfk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-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/apt_marble~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-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/apt_marble~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-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": "Telegram channels",
            "type": "array",
            "description": "The public channels to collect. Paste a channel link or an @username — one per line. Private channels, invite links and groups have no public post history and are reported as unavailable.",
            "default": [
              "@durov"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerChannel": {
            "title": "Posts per channel",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many posts to collect from each channel, newest first. Raise it to build a full archive — the actor keeps going back until it runs out of published history.",
            "default": 50
          },
          "keyword": {
            "title": "Keyword filter (optional)",
            "type": "string",
            "description": "Only return posts from each channel that mention this word. Telegram matches whole words and publishes at most 22 keyword matches per channel, so leave this empty when you want the full feed. A keyword that is the same as the channel name cannot be used as a filter and that channel is reported as skipped."
          },
          "dateFrom": {
            "title": "Posted after",
            "type": "string",
            "description": "Only keep posts published on or after this date (YYYY-MM-DD). Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Posted before",
            "type": "string",
            "description": "Only keep posts published on or before this date (YYYY-MM-DD). Leave empty for no upper bound."
          },
          "newestFirst": {
            "title": "Newest posts first",
            "type": "boolean",
            "description": "Write the newest post first. Turn it off to get each channel in the order it was published, oldest first.",
            "default": true
          },
          "includeServiceMessages": {
            "title": "Include channel notices",
            "type": "boolean",
            "description": "Include Telegram's own notices such as \"Channel created\" or a pinned-post announcement. They carry no views, reactions or media and are left out by default.",
            "default": false
          },
          "turbo": {
            "title": "Fast mode for deep archives",
            "type": "boolean",
            "description": "Collect deep history in parallel instead of one step at a time. Much faster on big archive jobs and returns the same posts. It is automatically switched off when a keyword or a \"Posted after\" date is set.",
            "default": true
          },
          "country": {
            "title": "Browse from",
            "enum": [
              "us",
              "gb",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "se",
              "ca",
              "au",
              "br",
              "mx",
              "in",
              "sg",
              "jp",
              "tr",
              "ua",
              "ae",
              "za"
            ],
            "type": "string",
            "description": "The country the run should browse from. A few channels are restricted in some countries, so this can change what a channel returns.",
            "default": "us"
          },
          "maxConcurrency": {
            "title": "Parallel workers",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How much work to run at the same time. 16 is a good balance of speed and politeness; raise it for very large jobs.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}