Com APIlotuss.com.my ↗
Fetch product names, prices, discounts, categories, and images from Lotus's Malaysia promotional pages via one structured API endpoint.
What is the Com API?
The Lotus's Malaysia API exposes one endpoint — get_promotional_products — that returns up to 10 fields per product from Lotus's promotional and category pages, including regular price, promotional price, discount percentage, SKU, brand, category, and image URL. Results are paginated and sortable, making it straightforward to pull structured product data from any Lotus's Malaysia campaign or category page.
curl -X GET 'https://api.parse.bot/scraper/7e4ff86c-8b57-45db-969f-17ca1b7035d4/get_promotional_products' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace lotuss-com-my-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
Lotus's Malaysia Promotional Products API Client
This module provides a Python client for extracting product data from Lotus's Malaysia
promotional and category pages, including prices, discounts, and product information
with pagination support.
Get your API key from: https://parse.bot/settings
"""
import os
import requests
from typing import Optional, Any, Dict, List
class ParseClient:
"""Client for interacting with Parse's Lotus Malaysia promotional products API."""
def __init__(self, api_key: Optional[str] = None):
"""Initialize the Parse API client.
Args:
api_key: API key for authentication. If not provided, reads from PARSE_API_KEY env var.
"""
self.base_url = "https://api.parse.bot"
self.scraper_id = "7e4ff86c-8b57-45db-969f-17ca1b7035d4"
self.api_key = api_key or os.getenv("PARSE_API_KEY")
if not self.api_key:
raise ValueError(
"API key not provided. Set PARSE_API_KEY environment variable or pass api_key parameter."
)
def _call(
self, endpoint: str, method: str = "POST", **params: Any
) -> Dict[str, Any]:
"""Make an API call to the Parse service.
Args:
endpoint: The endpoint name (e.g., 'get_promotional_products')
method: HTTP method ('GET' or 'POST')
**params: Query/body parameters for the request
Returns:
JSON response from the API
Raises:
requests.RequestException: If the API call fails
"""
url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}
if method.upper() == "GET":
response = requests.get(url, headers=headers, params=params, timeout=30)
elif method.upper() == "POST":
response = requests.post(url, headers=headers, json=params, timeout=30)
else:
raise ValueError(f"Unsupported HTTP method: {method}")
response.raise_for_status()
return response.json()
def get_promotional_products(
self,
category_id: str = "60725",
page: int = 1,
limit: int = 15,
sort: Optional[str] = None,
) -> Dict[str, Any]:
"""Get products from a Lotus's Malaysia promotional or category page.
Args:
category_id: Category ID for the promotional page. Default is 60725 (June Super Weekend Treats).
page: Page number for pagination (starts at 1).
limit: Number of products per page (1-100).
sort: Sort order - one of: best_match, price_low, price_high, newest. None for default ordering.
Returns:
Dictionary containing products list and pagination info
"""
params = {
"category_id": category_id,
"page": page,
"limit": limit,
}
if sort:
params["sort"] = sort
return self._call("get_promotional_products", method="GET", **params)
def main():
"""Demonstrate practical usage of the Lotus Malaysia promotional products API."""
try:
# Initialize the client
client = ParseClient()
print("✓ API client initialized successfully\n")
# Use case: Find discounted coconut products across promotional pages
print("=" * 70)
print("PRACTICAL USE CASE: Finding Best Discounted Products")
print("=" * 70)
# Step 1: Get initial page of promotional products
print("\n📦 Step 1: Fetching promotional products (first page)...\n")
response = client.get_promotional_products(
category_id="60725", page=1, limit=10, sort="price_low"
)
products = response.get("products", [])
pagination = response.get("pagination", {})
print(f"Found {pagination.get('total_products')} total products")
print(f"Displaying page {pagination.get('page')} of {pagination.get('total_pages')}\n")
# Step 2: Analyze and display products with significant discounts
print("💰 Best Deals (discount > 10%):")
print("-" * 70)
best_deals = []
for product in products:
if product.get("discount_percent", 0) > 10:
best_deals.append(product)
if best_deals:
for idx, product in enumerate(best_deals, 1):
print(f"\n{idx}. {product.get('name')}")
print(f" Brand: {product.get('brand')}")
print(
f" Regular Price: MYR {product.get('regular_price'):.2f} → Promo: MYR {product.get('promotional_price'):.2f}"
)
print(f" Discount: {product.get('discount_percent'):.2f}%")
print(f" Category: {product.get('category')}")
print(f" Stock: {product.get('stock_status')}")
else:
print("No products with discount > 10% on this page")
# Step 3: Get products sorted by price
print("\n\n" + "=" * 70)
print("📊 Step 2: Fetching products sorted by lowest price...")
print("=" * 70 + "\n")
price_sorted_response = client.get_promotional_products(
category_id="60725", page=1, limit=5, sort="price_low"
)
price_products = price_sorted_response.get("products", [])
print("Lowest Priced Products:")
print("-" * 70)
for idx, product in enumerate(price_products, 1):
savings = product.get("regular_price", 0) - product.get(
"promotional_price", 0
)
print(f"\n{idx}. {product.get('name')}")
print(f" SKU: {product.get('sku')}")
print(f" Promotional Price: MYR {product.get('promotional_price'):.2f}")
print(f" You Save: MYR {savings:.2f}")
# Step 4: Summary statistics
print("\n\n" + "=" * 70)
print("📈 Summary Statistics")
print("=" * 70 + "\n")
all_products = response.get("products", [])
if all_products:
avg_discount = sum(p.get("discount_percent", 0) for p in all_products) / len(
all_products
)
avg_price = sum(p.get("promotional_price", 0) for p in all_products) / len(
all_products
)
in_stock = sum(
1
for p in all_products
if p.get("stock_status") == "IN_STOCK"
)
print(f"Average Discount: {avg_discount:.2f}%")
print(f"Average Promotional Price: MYR {avg_price:.2f}")
print(f"Products In Stock: {in_stock}/{len(all_products)}")
print("\n✓ Example completed successfully!")
except requests.exceptions.RequestException as e:
print(f"❌ API Error: {e}")
except ValueError as e:
print(f"❌ Configuration Error: {e}")
if __name__ == "__main__":
main()Get products from a Lotus's Malaysia promotional or category page. Returns product names, promotional prices, regular prices, discount percentages, categories, brands, and product images. Results are paginated.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (starts at 1). |
| sort | string | Sort order for results. Accepts exactly one of: best_match, price_low, price_high, newest. Omitted = default server ordering. |
| limit | integer | Number of products per page, between 1 and 100. |
| category_id | string | Category ID for the promotional page. Default is 60725 (June Super Weekend Treats). Other category IDs can be found by browsing the site. |
{
"type": "object",
"fields": {
"products": "array of product objects with id, sku, name, regular_price, promotional_price, discount_percent, currency, category, image_url, stock_status, brand",
"pagination": "object with page, limit, total_products, total_pages"
},
"sample": {
"products": [
{
"id": 38855,
"sku": "72229187",
"name": "KARA COCONUT CREAM 500ML",
"brand": "KARA",
"category": "Sprinkles, Syrup & Other Ingredients",
"currency": "MYR",
"image_url": "https://publish-p35803-e190640.adobeaemcloud.com/content/dam/aem-cplotusonlinecommerce-project/my/images/magento/catalog/product/083/9555079300083/ShotType1_540x540.jpg",
"stock_status": "IN_STOCK",
"regular_price": 8.45,
"discount_percent": 11.83,
"promotional_price": 7.45
}
],
"pagination": {
"page": 1,
"limit": 5,
"total_pages": 33,
"total_products": 164
}
}
}About the Com API
What the API Returns
The get_promotional_products endpoint returns an array of product objects from a Lotus's Malaysia promotional or category page. Each object includes id, sku, name, regular_price, promotional_price, discount_percent, currency, category, image_url, and a stock status field. Prices are returned in Malaysian Ringgit (MYR). A pagination object accompanies every response, reporting the current page, limit, total_products, and total_pages.
Filtering and Pagination
The endpoint accepts a category_id parameter to target specific promotional or category pages — the default is 60725 (June Super Weekend Treats), but other valid category IDs can be passed to retrieve different campaigns. Page navigation is handled via the page integer parameter starting at 1, and you can control response size with limit (1–100 products per page). The sort parameter accepts best_match, price_low, price_high, or newest to control result ordering.
Coverage and Freshness
Data reflects the current live state of Lotus's Malaysia promotional pages at the time of the request. The API covers promotional pricing events and standard category pages accessible without a login on lotuss.com.my. Product-level data such as nutritional info, stock quantity counts, and customer reviews are not part of the response — only the core pricing, identity, and categorisation fields listed above.
The Com API is a managed, monitored endpoint for lotuss.com.my — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when lotuss.com.my changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official lotuss.com.my API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track promotional price changes over time for specific Lotus's Malaysia product SKUs
- Build a grocery price comparison tool using
promotional_priceandregular_pricefields - Monitor discount depth across categories by aggregating
discount_percentvalues - Populate a deal-alert service with new promotional products as campaigns launch
- Extract product images via
image_urlto build a visual catalogue of Lotus's Malaysia offers - Analyse which product categories appear most frequently in Lotus's Malaysia promotions
- Calculate average savings across a promotional page using
regular_priceandpromotional_price
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Lotus's Malaysia have an official developer API?+
What does `get_promotional_products` return beyond price fields?+
id, sku, name, regular_price, promotional_price, discount_percent, currency (MYR), category, image_url, and a stock status field. The pagination object tells you the current page, limit, total products, and total pages across the result set.How do I retrieve products from a different Lotus's Malaysia category or campaign?+
category_id string parameter to the get_promotional_products endpoint. The default value targets the June Super Weekend Treats page (ID 60725), but any valid Lotus's Malaysia category or promotional page ID can be substituted.