{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "themyxa-telegram-parser--keep-channel-dataset-current",
 "repo": "TheMyxa/telegram-parser",
 "repo_url": "https://github.com/TheMyxa/telegram-parser",
 "repo_slug": "themyxa-telegram-parser",
 "title": "Keep a channel dataset current with incremental updates",
 "page_title": "How to keep a channel dataset current with incremental updates with Telegram Parser",
 "summary": "Refresh an existing export with new posts and changed comments, or run Watch mode for continuous updates.",
 "who": "An analyst tracking a channel over weeks who wants counts and reactions on older posts to stay accurate without full re-exports.",
 "problem": "Re-exporting the whole channel each time is slow, and old posts keep changing as comments and reactions arrive.",
 "outcome": "A single dataset file that merges new posts by post_id and comments by comment_id, with counters refreshed on recent posts.",
 "steps": [
  "Complete a first export, such as `docker compose run --rm cli export json`, so a dataset exists.",
  "Run `docker compose run --rm cli export json --incremental` on a schedule you choose.",
  "For continuous updates, run `docker compose run --rm cli watch --poll-interval 30 --refresh-active-posts 20`.",
  "Check `data/state/` for the saved incremental state and `data/raw/` for the updated dataset."
 ],
 "agent_prompt": "In the TheMyxa/telegram-parser repo, run `docker compose run --rm cli export json --incremental` for channel <channel-username>. Expected output is an updated *_dataset.json in data/raw/ and a state file in data/state/. Verify that the post count did not drop after the run before reporting.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "Incremental runs depend on the saved state in data/state/, so deleting that folder makes the next run behave like a fresh export.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Docker Desktop (recommended) or Python with the packages in requirements.txt",
  "Telegram API credentials: API_ID and API_HASH from https://my.telegram.org/apps",
  "A Telegram account session for Telethon, needed only for live exports"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Watch mode keeps the Telethon session open for a long time, so protect the session file and stop the process when you no longer need it."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/themyxa-telegram-parser/keep-channel-dataset-current/",
 "md": "https://dedupedai.com/use-cases/themyxa-telegram-parser/keep-channel-dataset-current/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/themyxa-telegram-parser--keep-channel-dataset-current.json",
 "api_version": "v1"
}
