{
  "openapi": "3.0.1",
  "info": {
    "title": "Telegram Evidence: Link, Repost and Edit Tracker",
    "description": "Monitor public Telegram with explicit aliases, observed edits and source evidence. Optional paid API provider adds forward counts, numeric origins, replies and public groups. Export normalized messages, interactions, graphs and an offline report.",
    "version": "0.0",
    "x-build-id": "f9mIZsTrT0hQmLfH6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/halcyon_marram~telegram-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-halcyon_marram-telegram-evidence",
        "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/halcyon_marram~telegram-evidence/runs": {
      "post": {
        "operationId": "runs-sync-halcyon_marram-telegram-evidence",
        "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/halcyon_marram~telegram-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-halcyon_marram-telegram-evidence",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "analyze",
              "demo"
            ],
            "type": "string",
            "description": "Choose public collection, imported records, or an explicitly synthetic demo.",
            "default": "scrape"
          },
          "collectionSource": {
            "title": "Collection source",
            "enum": [
              "public_web",
              "telegram_api"
            ],
            "type": "string",
            "description": "Web: no Telegram account. API: paid TrueFetch provider, public channels/groups without web previews, forward counts and numeric origins. Requires 1-10 explicit channels and discoverChannels=false. No private chats or guarantee of completeness.",
            "default": "public_web"
          },
          "channels": {
            "title": "Public channels",
            "type": "array",
            "description": "Explicit public channel or group usernames. Web collection requires t.me/s previews. API source accepts public usernames through the paid provider. Private invite links are not supported.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Canonical literal terms, up to 5. Aliases and accent folding apply after collection. Google discovery is optional and searches canonical terms only; team-curated channels give a controlled monitoring scope.",
            "items": {
              "type": "string"
            }
          },
          "searchAliases": {
            "title": "Explicit aliases by search term",
            "type": "object",
            "description": "Example: {\"Pedro Sánchez\":[\"Sánchez\",\"Sanxe\"]}. Up to 5 aliases per existing search term. All mode requires each entity, not each spelling. Ambiguous surnames need review.",
            "default": {}
          },
          "ignoreAccents": {
            "title": "Ignore accents in text matching",
            "type": "boolean",
            "description": "Folds acute/grave/circumflex accents and diaeresis; preserves ñ. Does not alter original text or evidence hashes.",
            "default": false
          },
          "excludeTerms": {
            "title": "Exclude posts containing these phrases",
            "type": "array",
            "description": "Up to 5 explicit literal exclusions. Example: Jorge Hernández Sánchez. Applies to collection output and analysis, not Google discovery. Excluded posts remain in monitor state for change tracking.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "matchMode": {
            "title": "Match terms",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Any: posts containing at least one term. All: posts containing every term. Matching ignores case and accepts joined hashtags. Counts use visible text only.",
            "default": "any"
          },
          "discoverChannels": {
            "title": "Discover channels automatically",
            "type": "boolean",
            "description": "Optional Google index discovery, supplemental to explicit channels. This is not a complete Telegram search. Disable for API collection. Provider charges apply.",
            "default": true
          },
          "sourceMaxChargeUsd": {
            "title": "API provider total charge cap (USD)",
            "minimum": 0.02,
            "maximum": 5,
            "type": "number",
            "description": "Only used for telegram_api. Divided across channels, minimum $0.02 each. Excludes this Actor platform usage. Provider has per-run and per-result charges. No automatic fallback or media downloads.",
            "default": 0.5
          },
          "since": {
            "title": "From date (UTC)",
            "type": "string",
            "description": "YYYY-MM-DD or ISO timestamp with timezone. A date starts at 00:00 UTC. Leave blank for the last 7 days."
          },
          "until": {
            "title": "Through date (UTC)",
            "type": "string",
            "description": "YYYY-MM-DD includes the whole day in UTC; ISO timestamps keep their exact time. Leave blank for no upper boundary."
          },
          "maxMessages": {
            "title": "Total message limit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum posts inspected across all selected channels, before keyword filtering. The budget is split across channels. Output may be smaller.",
            "default": 10000
          },
          "maxMessagesPerChannel": {
            "title": "Messages per channel",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum messages per channel per run. Start with 20; increase for deeper history.",
            "default": 200
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Reuse a unique name for repeat monitoring. Overlapping runs are rejected. Use a new name when changing channels or dates."
          },
          "onlyChanges": {
            "title": "Only new or edited messages in dataset",
            "type": "boolean",
            "description": "Requires monitorName. Report and graph retain analysis context.",
            "default": false
          },
          "retentionDays": {
            "title": "Monitor retention (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Keep state and observed edit history for this many days since last observation.",
            "default": 30
          },
          "stateMaxMessages": {
            "title": "Monitor message capacity",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum messages retained between runs. Eviction is reported and can make old posts count as new.",
            "default": 10000
          },
          "maxDiscoveryChannels": {
            "title": "Maximum discovered channels",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper limit on discovered channels to collect, in addition to your manual list. Results are distributed across terms.",
            "default": 15
          },
          "discoveryPagesPerTerm": {
            "title": "Search pages per term",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Each page usually has about 10 organic results. More pages can discover additional channels, at additional provider cost.",
            "default": 2
          },
          "discoveryMaxChargeUsd": {
            "title": "Search provider charge cap (USD)",
            "minimum": 0.5,
            "maximum": 5,
            "type": "number",
            "description": "Cap for the separate Google Search Results Scraper run. Apify requires at least $0.50 for this cap; this is not a fixed fee. This Actor platform usage is additional. AI and enrichment add-ons are disabled.",
            "default": 0.5
          },
          "discoveryCountry": {
            "title": "Discovery country",
            "type": "string",
            "description": "Two-letter lowercase Google country code. Does not restrict the language of collected Telegram posts.",
            "default": "es"
          },
          "messages": {
            "title": "Messages to analyze",
            "type": "array",
            "description": "Analyze mode: objects with id (channel/number), date (ISO with timezone), text, optional links and forwardedFrom. Maximum 10,000."
          },
          "maxPagesPerChannel": {
            "title": "Pages per channel",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum preview pages fetched per channel. A limit can leave partial coverage; named monitors resume next run.",
            "default": 15
          },
          "maxConcurrency": {
            "title": "Parallel channels",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of channel requests processed in parallel, between 1 and 5.",
            "default": 3
          },
          "requestDelaySeconds": {
            "title": "Delay between pages (seconds)",
            "minimum": 0.2,
            "maximum": 10,
            "type": "number",
            "description": "Pause between pages of the same channel. Default 1 second; retries respect temporary failures.",
            "default": 1
          },
          "similarityThreshold": {
            "title": "Similar-text threshold",
            "minimum": 0.65,
            "maximum": 1,
            "type": "number",
            "description": "Word-triple Jaccard threshold. 0.8 is conservative; 0.75 finds more candidates. Lexical overlap is not semantic agreement.",
            "default": 0.8
          },
          "minTextLength": {
            "title": "Minimum text length",
            "minimum": 40,
            "maximum": 1000,
            "type": "integer",
            "description": "Minimum normalized characters for exact-text and similar-text comparison. Shared links are analyzed regardless of text length.",
            "default": 100
          },
          "maxComparisons": {
            "title": "Text comparison budget",
            "minimum": 100,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap for similar-text comparisons. Reaching it is reported and can miss matches.",
            "default": 250000
          },
          "rapidSpreadMinutes": {
            "title": "Shared-content window (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Flag a group reaching the channel threshold within this interval. This does not establish coordination.",
            "default": 30
          },
          "rapidSpreadMinChannels": {
            "title": "Minimum channels in window",
            "minimum": 2,
            "maximum": 100,
            "type": "integer",
            "description": "Distinct channels sharing content within the configured window.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy. The local CLI uses inherited network proxy settings."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}