{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Export Intelligence",
    "description": "Turn owner-authorized Telegram message exports into per-post reach context, evidence, confidence, review priority, and human-review actions without Telegram login, scraping, Bot API access, publishing, or any network request.",
    "version": "0.2",
    "x-build-id": "iLkoUVuTXsvWBEA2v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~telegram-channel-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-telegram-channel-intel",
        "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/zinin~telegram-channel-intel/runs": {
      "post": {
        "operationId": "runs-sync-zinin-telegram-channel-intel",
        "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/zinin~telegram-channel-intel/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-telegram-channel-intel",
        "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": {
          "schemaVersion": {
            "title": "Contract version",
            "enum": [
              "2.0"
            ],
            "type": "string",
            "description": "Closed public input contract. Use 2.0 for authorized export records.",
            "default": "2.0"
          },
          "authorization": {
            "title": "Rights confirmation",
            "enum": [
              "I confirm I am authorized to process and deliver these records"
            ],
            "type": "string",
            "description": "Required when message records are supplied. Confirm that you own the records or have permission to process and deliver them.",
            "default": "I confirm I am authorized to process and deliver these records"
          },
          "sourceContext": {
            "title": "Source context",
            "enum": [
              "telegram_desktop_export",
              "channel_owner_archive",
              "authorized_internal_feed",
              "other_authorized_source"
            ],
            "type": "string",
            "description": "How the authorized records were obtained. This label is buyer-attested and is not independently verified.",
            "default": "telegram_desktop_export"
          },
          "channel": {
            "title": "Default channel handle",
            "pattern": "^@?[A-Za-z0-9_]{5,64}$",
            "minLength": 5,
            "maxLength": 64,
            "type": "string",
            "description": "Used when individual message objects omit channel. Use a public handle only; no URL is fetched."
          },
          "channelTitle": {
            "title": "Default channel title",
            "pattern": "\\S",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Optional buyer-supplied title used when a message object omits channelTitle."
          },
          "subscribers": {
            "title": "Default subscriber count",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Optional buyer-supplied snapshot used to calculate views divided by subscribers."
          },
          "maxConcurrency": {
            "title": "Legacy max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Accepted for backward compatibility and ignored. Paid delivery is intentionally serial so budget and named-event settlement remain exact.",
            "default": 10
          },
          "messages": {
            "title": "Authorized message records",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Up to 100 Telegram Desktop export-style message objects. One valid unique record becomes one potential paid result.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "title": "Export record type",
                  "description": "Optional Telegram export type; only message is accepted.",
                  "type": "string",
                  "enum": [
                    "message"
                  ]
                },
                "id": {
                  "title": "Message ID",
                  "description": "Telegram export numeric message identifier.",
                  "type": "integer",
                  "minimum": 1
                },
                "postId": {
                  "title": "Post ID",
                  "description": "Positive decimal string alias for the message identifier.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 19,
                  "pattern": "^[1-9][0-9]{0,18}$"
                },
                "channel": {
                  "title": "Channel handle",
                  "description": "Message-level channel handle override.",
                  "type": "string",
                  "minLength": 5,
                  "maxLength": 128,
                  "pattern": "\\S"
                },
                "channelTitle": {
                  "title": "Channel title",
                  "description": "Message-level buyer-supplied channel title.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "pattern": "\\S"
                },
                "date": {
                  "title": "Message date",
                  "description": "ISO 8601 message timestamp.",
                  "type": "string",
                  "maxLength": 40,
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                },
                "date_unixtime": {
                  "title": "Unix message date",
                  "description": "Telegram export Unix timestamp string alias.",
                  "type": "string",
                  "pattern": "^[0-9]{1,12}$"
                },
                "text": {
                  "title": "Message text",
                  "description": "Plain bounded message text. Direct API inputs also accept Telegram export text-part arrays through the runtime compatibility gate.",
                  "type": "string",
                  "maxLength": 4000
                },
                "text_entities": {
                  "title": "Text entities",
                  "description": "Accepted Telegram export compatibility field; not interpreted.",
                  "type": "array"
                },
                "from": {
                  "title": "Export sender label",
                  "description": "Accepted compatibility field; not used for profiling.",
                  "type": "string",
                  "nullable": true
                },
                "from_id": {
                  "title": "Export sender ID",
                  "description": "Accepted compatibility field; not used for profiling.",
                  "type": "string",
                  "nullable": true
                },
                "views": {
                  "title": "Views",
                  "description": "Optional non-negative buyer-supplied view count.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "subscribers": {
                  "title": "Subscribers",
                  "description": "Optional non-negative buyer-supplied subscriber count.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "forwards": {
                  "title": "Forwards",
                  "description": "Optional non-negative buyer-supplied forward count.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "replies": {
                  "title": "Replies",
                  "description": "Optional non-negative buyer-supplied reply count.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "replyCount": {
                  "title": "Reply count alias",
                  "description": "Compatibility alias for replies.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "reactions": {
                  "title": "Reactions",
                  "description": "Optional non-negative buyer-supplied reaction count.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "reactionCount": {
                  "title": "Reaction count alias",
                  "description": "Compatibility alias for reactions.",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "sourceUrl": {
                  "title": "Recorded source URL",
                  "description": "Optional same-channel, same-post Telegram HTTPS URL; never fetched.",
                  "type": "string",
                  "maxLength": 300
                },
                "link": {
                  "title": "Recorded link alias",
                  "description": "Compatibility alias for sourceUrl; never fetched.",
                  "type": "string",
                  "maxLength": 300
                }
              }
            }
          },
          "items": {
            "title": "Legacy channel handles or message objects",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Backward-compatible field. Message objects are processed. String handles are never fetched and receive one free migration diagnostic.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "\\S"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}