{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Channel Scraper — Posts & Daily New-Post Monitor",
    "description": "Telegram scraper + daily monitor: sinceLastRun auto-checkpoints harvest only new posts each morning — quiet channels free. Full-history archive, $0.15/channel flat, no account. Telegram Kanal Archiv. Парсер телеграм каналов. Scraper canales Telegram.",
    "version": "0.17",
    "x-build-id": "nNBn4rLg1DEHA1gay"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/halobartku~telegram-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-halobartku-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/halobartku~telegram-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-halobartku-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/halobartku~telegram-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-halobartku-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",
            "maxItems": 100,
            "type": "array",
            "description": "Public channels: @name, t.me/name or https://t.me/name. Each harvested channel is one paid event. Private channels are not supported.",
            "items": {
              "type": "string"
            }
          },
          "maxMessages": {
            "title": "Max messages per channel",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many recent messages to harvest per channel (newest first). 20 messages per page; each extra page adds ~1s. Ignored when fullHistory is enabled.",
            "default": 100
          },
          "fullHistory": {
            "title": "Full history (walk to oldest message)",
            "type": "boolean",
            "description": "Walk pagination to the channel's OLDEST message instead of stopping at maxMessages. Same price: ONE $0.15 channel-harvested event per channel, whether you get 20 messages or the whole archive. Hard cap ~8,000 messages per channel for safety; hitting it is disclosed in the run log, never silent.",
            "default": false
          },
          "since": {
            "title": "Only messages newer than this (incremental mode)",
            "type": "string",
            "description": "ISO 8601 cutoff, e.g. 2026-09-20T00:00:00Z. Harvest walks newest-to-oldest and stops at the first page entirely older than this, returning only messages at/after the cutoff. Ideal for cheap daily monitoring: you pay the same $0.15/channel but runs finish in one page. Overrides maxMessages and fullHistory when set. Empty = harvest normally."
          },
          "sinceLastRun": {
            "title": "Monitoring mode: only messages newer than the last run (auto-checkpoint)",
            "type": "boolean",
            "description": "The Actor remembers the newest message time per channel in a named key-value store and next runs harvest ONLY what is new since then. First run for a channel = baseline (latest maxMessages messages, not the whole archive). A quiet channel returns a channel_info row + '0 new' in run_summary and is NOT charged. Ideal for daily schedules: point it at your channels once and read the new posts every morning. Checkpoints live in the named store 'telegram-checkpoints' and survive across runs in your account. Overrides 'since' and fullHistory.",
            "default": false
          },
          "keywords": {
            "title": "Keyword filter (OR match on message text)",
            "maxItems": 50,
            "type": "array",
            "description": "Keep only messages whose text contains at least one of these keywords (case-insensitive). You are charged for the channel only if at least one message passes — quiet/filtered-out channels are free. Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "mediaTypes": {
            "title": "Media type filter",
            "maxItems": 10,
            "type": "array",
            "description": "Keep only messages of these media types: photo, video, document. Combined with keywords (AND). You are charged for the channel only if at least one message passes — quiet/filtered-out channels are free. Empty = all media types.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}