MasterKala
v0.5.2Unofficial read-only MasterKala: search gadgets, compare prices and specs, stock, delivery, deals.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mk_blog_posts Blog posts and buying guides
List MasterKala blog posts (buying guides, comparisons, how-tos), newest first, with links. Use for which-type-to-choose or how-to questions. Readers' Q&A: mk_blog_comments.
| Parameter | Type | Description |
|---|---|---|
category | string | Blog section; buying_guide = راهنمای خرید. |
limit | integer | Per page. |
page | integer | From 0. |
mk_blog_comments Blog post comments
Read the comments of a blog post as threads, with the store writer's answers as replies. Useful as a support FAQ: many posts hold readers' product questions answered by MasterKala.
| Parameter | Type | Description |
|---|---|---|
post_id * | integer | From mk_blog_posts, e.g. 330. |
full_text | boolean | Uncut text and all replies (default 400 chars, 3 replies). |
limit | integer | Max threads, newest first. |
mk_search Search products
Search MasterKala products by keyword: price, discount and stock of each match. Use first for "price of X". In-stock first. Also returns matching categories (ids for mk_browse) and brand/tag pages.
| Parameter | Type | Description |
|---|---|---|
query * | string | Persian or English keyword, e.g. 'هندزفری بلوتوث'. |
in_stock_only | boolean | Drop items not buyable now (total still counts all matches). |
limit | integer | Products per page. |
page | integer | From 0. |
mk_find_cheapest Find cheapest product
Find the cheapest in-stock products for a keyword, one flat list sorted by final_price. Use for the lowest price of X. free_shipping = reaches 5,000,000 Toman (bulky items never). complete=false: more in-stock items past `scanned`; raise scan.
| Parameter | Type | Description |
|---|---|---|
query * | string | Persian or English keyword, e.g. 'هندزفری بلوتوث'. |
include_accessories | boolean | Keep cases, covers, protectors, straps (dropped unless the query names them). |
limit | integer | Max offers. |
match_all_words | boolean | Keep only titles containing every query word. |
scan | integer | Max results to scan, 500 per request. |
mk_browse Browse a category or brand
List the products of a category, brand or tag with sorting, price range and filters. Pass exactly one of category_id / brand / tag_id. No keyword search here: mk_search.
| Parameter | Type | Description |
|---|---|---|
brand | From mk_brands, e.g. 'mcdodo'. | |
category_id | From mk_categories or mk_search, e.g. 606. | |
filter_ids | Ids from mk_filters: 'm30' brand, 'o78' color, '117' attribute. | |
limit | integer | Per page. |
max_price | Max final_price, Toman. | |
min_price | Min final_price, Toman. | |
page | integer | From 0. |
sort | string | In-stock items always come first. |
tag_id | From /tag/<id>/ links, e.g. 22246. |
mk_filters Filters of a category or brand
List the filters of a category, brand or tag page with their ids, and its price range. Use before mk_browse; options map filter id -> name. Non-brand groups are cut to 40 (`omitted` = rest): pass `group` for all. max_price in Toman.
| Parameter | Type | Description |
|---|---|---|
brand | From mk_brands, e.g. 'mcdodo'. | |
category_id | From mk_categories or mk_search, e.g. 606. | |
group | Only this group, in full, e.g. 'رنگ' (color). | |
tag_id | From /tag/<id>/ links, e.g. 22246. |
mk_categories List categories
List MasterKala's product categories with their ids (about 100). Use to get a category_id for mk_browse / mk_filters.
| Parameter | Type | Description |
|---|---|---|
query | Filter on Persian name or English slug, e.g. 'شارژر'. |
mk_brands List brands
List the brands MasterKala sells with their slugs (about 135). Use to get the brand slug for mk_browse / mk_filters.
| Parameter | Type | Description |
|---|---|---|
query | Filter on brand name, English, e.g. 'xiaomi'. |
mk_deals Current deals
List products on MasterKala's discount page, biggest discount first. ends_in_seconds = time left in the current offer period.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max deals. |
mk_product Product details
Get one product's full record: price (Toman), stock count, colors, category path, rating, branches. Use after mk_search / mk_browse. Specs: mk_specs. Reviews: mk_reviews. Delivery: mk_shipping.
| Parameter | Type | Description |
|---|---|---|
product_id * | integer | From mk_search / mk_browse, e.g. 24855. |
full_text | boolean | Uncut description (default 300 chars). |
mk_specs Specs and comparison
Get the spec table of 1-4 products side by side, with stock counts. Use for specs or comparison. Each row has one value per product id (missing = none). Unknown ids: not_found.
| Parameter | Type | Description |
|---|---|---|
product_ids * | array | Product ids, e.g. [27144, 20850]. |
mk_reviews Product reviews
Read customer reviews of a product (newest first) with store replies and the star breakdown. average and star_counts cover all reviews; count matches `stars`.
| Parameter | Type | Description |
|---|---|---|
product_id * | integer | From mk_search / mk_browse, e.g. 24855. |
full_text | boolean | Uncut text (default 400 chars). |
limit | integer | Max reviews, newest first. |
stars | integer | Only this many stars; 0 = all. |
mk_shipping Delivery date and fee
Get the nearest delivery slot and shipping fee for one product: Tehran courier and post to other cities. Fees in Toman, 0 = free; free above free_shipping_from (null = never). same_day_seconds_left > 0: can still arrive today in Tehran.
| Parameter | Type | Description |
|---|---|---|
product_id * | integer | From mk_search / mk_browse, e.g. 24855. |
mk_branches Physical branches
List MasterKala's physical shops in Tehran with address, phone and map location. mk_product's `branches` says which shops have a given product.