Inspiration

Many users in Algeria struggle to get detailed and localized information when browsing AliExpress. Product pages are often cluttered, not mobile-friendly, and the information about shipping, pricing, and variants can be confusing. We wanted to build a Telegram bot that simplifies this experience by providing clean, Arabic-language summaries of AliExpress products directly within the chat interface.

What it does

The bot takes any valid AliExpress product link and responds with:

✅ اسم المنتج ووصفه (Product title and description in Arabic)

🖼️ صورة المنتج (Product image)

💵 السعر النهائي بالدولار (Final price in USD including shipping)

📦 معلومات الشحن إلى الجزائر (Shipping info to Algeria)

⭐ تقييمات ومراجعات المستخدمين (Ratings and user reviews)

🏬 معلومات البائع (Seller info)

🎨 الخيارات المتاحة (مثل الألوان أو المقاسات)

All this is returned in a well-formatted Arabic message inside Telegram.

How we built it

Language: Python 3.11

Framework: python-telegram-bot (v13.13 and also compatible with v20+ using async/await)

AliExpress API: Used to fetch product details, shipping info, and reviews.

Custom Modules:

aliexpress_api.py: Manages API calls and handles authentication.

link_processor.py: Normalizes and extracts product ID from any AliExpress link format.

formatter.py: Translates and formats all product information into Arabic.

telegram_bot.py: Manages bot updates and command handling.

Security: Environment variables (.env or Replit Secrets) store tokens and API keys securely.

Logging: All errors and API responses are logged for debugging and monitoring.

Challenges we ran into

🧩 Handling different formats of AliExpress product links.

🌍 Extracting accurate shipping info specific to Algeria (some API endpoints are inconsistent).

🌐 Translating technical descriptions into user-friendly Arabic.

🕸️ Dealing with AliExpress API rate limits and authentication.

📏 Telegram message limits required careful formatting to avoid truncation.

Accomplishments that we're proud of

Built a fully functional bot that works with real AliExpress products.

Automatically supports both old and new Telegram bot API versions.

All content is presented in Arabic, tailored for Algerian users.

Clean architecture with modular design for easy testing and maintenance.

Successfully tested against a variety of real-world links and edge cases.

What we learned

How to integrate and authenticate with a complex API like AliExpress.

Best practices in building Telegram bots using both sync and async approaches.

Arabic localization for technical content.

Efficient error handling and logging practices in production bots.

How to manage and secure credentials using environment variables.

What's next for aliexpressbot

Add support for currency conversion to DZD (Algerian Dinar).

🛒 Allow users to add items to a wishlist or get price drop alerts.

📦 Track shipping and delivery estimates based on user location.

🌍 Support more languages for wider regional use.

🧠 Add AI-powered product summarization and recommendation features.

Built With

  • aliexpress
  • api
  • async/await
  • python
  • python-telegram-bot
Share this project:

Updates