493 words
2 minutes
Notified When Epic Drops Free Games

Automatically Get Notified When Epic Gives Away Free Games
Epic Games regularly offers free games for a limited time, but keeping track of all of them can be tedious.
To solve this, you can set up a simple Telegram bot that checks Epic’s store daily and sends you a message when new free games become available.
How It Works
- The bot queries Epic’s store to find current free games.
- It compares the results to what you’ve already claimed.
- If it detects any new free games, it sends you a Telegram message with the game titles and store links.
- If there are no new free games, it stays quiet.
What You Get
An easy notification right in your Telegram app with all the info you need to claim the games before the offer expires.
Basic Setup
You’ll need:
- A Telegram bot token (easy to create via BotFather)
- Your Telegram chat ID
- A Python environment and internet access to run the script daily (e.g., with a cron job)
- Install python requests using pip.
The script runs once every 24 hours and only messages you if there’s something new.
import requests
import json
import hashlib
import os
from datetime import datetime
from time import sleep
# === CONFIG ===
EPIC_URL = "https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en-US&country=US&allowCountries=US"
CHECK_INTERVAL_SECONDS = 86400 # 24 hours
STATE_FILE = os.path.expanduser('~/epicgames/epic_free_games_state.json') #REPLACE THE PATH
TELEGRAM_BOT_TOKEN = "REPLACE THIS"
TELEGRAM_CHAT_ID = "ALSO REPLACE THIS"
def fetch_free_games():
response = requests.get(EPIC_URL)
response.raise_for_status()
data = response.json()
elements = data["data"]["Catalog"]["searchStore"]["elements"]
free_games = []
for game in elements:
promotions = game.get("promotions")
offers = promotions.get("promotionalOffers", []) if promotions else []
if offers:
price = game.get("price", {}).get("totalPrice", {}).get("discountPrice", 1)
if price == 0:
title = game["title"]
slug = game.get("productSlug", "")
url = f"https://store.epicgames.com/p/{slug}" if slug else "https://store.epicgames.com"
free_games.append({"title": title, "url": url})
return free_games
def get_hash(free_games):
# Use hash to detect change
titles = sorted(game["title"] for game in free_games)
joined = ",".join(titles)
return hashlib.sha256(joined.encode()).hexdigest()
def load_state():
try:
with open(STATE_FILE, "r") as f:
content = f.read().strip()
if not content:
return {}
return json.loads(content)
except (FileNotFoundError, json.JSONDecodeError):
return {}
def save_state(state):
with open(STATE_FILE, "w") as f:
json.dump(state, f)
def send_telegram_message(free_games):
text = "**New Free Epic Games Available!**\n\n"
for game in free_games:
text += f"🎮 {game['title']}\n🔗 {game['url']}\n\n"
url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
payload = {
"chat_id": TELEGRAM_CHAT_ID,
"text": text,
"parse_mode": "Markdown"
}
response = requests.post(url, data=payload)
return response.status_code == 200
def main():
print(f"[{datetime.now()}] Checking for new free games...")
free_games = fetch_free_games()
current_hash = get_hash(free_games)
state = load_state()
last_hash = state.get("last_hash")
if current_hash != last_hash:
print("🔔 New free games detected. Sending Telegram message...")
sent = send_telegram_message(free_games)
if sent:
state["last_hash"] = current_hash
save_state(state)
print("✅ Notification sent and state updated.")
else:
print("❌ Failed to send Telegram message.")
else:
print("ℹ️ No new free games.")
# Run immediately for demo; in real usage this should be scheduled via cron/systemd
main()
I’m currently using the following cron job to run the script. (Replace with ur user dirs etc)
0 12 * * * /usr/bin/python3 /home/ubuntu/epicgames/epic.py >> /home/ubuntu/epicgames/epic_cron.log 2>&1
NOTEWith this setup, you’ll never miss out on Epic’s limited-time giveaways again.
No more checking the store manually — just let the bot do the work.