{"openapi":"3.0.0","info":{"title":"Shopee Regional Products Suggestions and Shops","version":"1.0.0","description":"Shopee search suggestions, discover-feed listings, products and shop profiles across 11 regional markets, one row per entity."},"servers":[{"url":"https://ah-shopee-com.opendata.best/s/shopee-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Shopee search suggestions, discover feed and products","description":"Open Shopee suggestion, discover-feed or item rows across 11 APAC and LATAM markets.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"fetchMode":{"type":"string","enum":["auto","suggestions","products","discover","shop"],"description":"Fetch mode. What to fetch. Leave it on Auto to pick the mode from the fields you fill: a product link or item ID runs Products, a shop ID or username runs Shop profile, a keyword runs Search suggestions. 'Discover feed' returns the market's daily-discover feed and needs no keyword.","default":"auto","example":"auto"},"keyword":{"type":"string","description":"Keyword. Search phrase for suggestions, or for finding a product seed when fetchMode is products. Discover mode does not use it to filter the feed; no keyword is needed for a shop target.","example":"phone case"},"market":{"type":"string","enum":["PH","SG","MY","TH","TW","VN","ID","BR","MX","CO","CL"],"description":"Shopee market / country or region. Shopee country or region to collect from. Select the market that matches your product or shop; available data varies by market and mode.","default":"SG","example":"SG"},"discoverySource":{"type":"string","enum":["auto","daily_discover","hot_picks_bfs"],"description":"Discover source. Catalog face used by discover mode.","default":"daily_discover"},"includeFilterConfig":{"type":"boolean","description":"Include search filters. Does not fetch product details.","default":false},"includeCatTree":{"type":"boolean","description":"Include category tree","default":false},"includeSearchFacet":{"type":"boolean","description":"Include search facet. In products mode, request category breadcrumbs for up to the first three rows. In shop mode, request the market-level Shopee Mall category list.","default":false},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"keyword":"phone case","market":"SG","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shops":{"post":{"operationId":"shops","summary":"Shopee shop profile or product lookup","description":"Shop profile rows (mode shop) or product detail rows by shopId, shopUsername, itemId or itemUrl. Fixed for this endpoint: fetchMode=\"shop\".","tags":["shops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"shopId":{"type":"string","description":"Shop ID. Numeric Shopee shop ID. On its own it runs Shop profile; together with Item ID it names a product seed."},"shopUsername":{"type":"string","description":"Shop username. The shop's username (the part after the Shopee domain in the shop link). Runs Shop profile."},"itemId":{"type":"string","description":"Item ID. Numeric Shopee item ID. Use it together with Shop ID (or give the product link instead). Runs Products."},"itemUrl":{"type":"string","description":"Shopee product URL. Shopee product link, such as https://shopee.sg/product/<shopId>/<itemId> or a link ending in -i.<shopId>.<itemId>. Select the matching market and avoid supplying separate IDs with the link."},"market":{"type":"string","enum":["PH","SG","MY","TH","TW","VN","ID","BR","MX","CO","CL"],"description":"Shopee market / country or region. Shopee country or region to collect from. Select the market that matches your product or shop; available data varies by market and mode.","default":"SG","example":"SG"},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"shopId":"442800909","market":"SG","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"rowType":{"type":"string"},"id":{"type":"string"},"market":{"type":"string"},"market_name":{"type":"string"},"market_host":{"type":"string"},"country":{"type":"string"},"keyword":{"type":"string"},"page":{"type":"integer"},"rank":{"type":"integer"},"absolute_rank":{"type":"integer"},"shop_id":{"type":"string"},"item_id":{"type":"string"},"product_id":{"type":"string"},"title":{"type":"string"},"query":{"type":"string"},"record_type":{"type":"string"},"price":{"nullable":true,"type":"string","description":"Listed sell price for all shoppers; null when the card omits it."},"voucher_discounted_price":{"nullable":true,"type":"string","description":"New-buyer voucher price from the card display; only valid for new users; null when absent."},"product_key":{"nullable":true,"type":"string"},"display_price":{"nullable":true,"type":"string","description":"Card display price (new-buyer voucher adjusted); null when the source omits it."},"original_price":{"nullable":true,"type":"string"},"strikethrough_price":{"nullable":true,"type":"string"},"price_min":{"nullable":true,"type":"string","description":"Lowest listed price; null when the source supplies no range."},"price_max":{"nullable":true,"type":"string","description":"Highest listed price; null when the source supplies no range."},"price_range_invalid":{"nullable":true,"type":"boolean","description":"true when the source price_min exceeds price_max; omitted otherwise."},"discovery_source":{"nullable":true,"type":"string"},"page_offset":{"nullable":true,"type":"integer"},"sold_text":{"type":"string"},"rating_text":{"type":"string"},"location":{"nullable":true,"type":"string","description":"Seller location; null when the card omits it."},"product_url":{"type":"string"},"source_url":{"type":"string"},"image":{"nullable":true,"type":"string"},"images":{"type":"array","items":{"type":"string"}},"currency":{"type":"string"},"currency_code":{"type":"string"},"captured_at":{"type":"string"},"source":{"type":"string"},"provider":{"type":"string"},"suggestion_item_ids":{"type":"array","items":{"type":"string"}},"suggestion_shop_ids":{"type":"array","items":{"type":"string"}},"suggestion_images":{"type":"array","items":{"type":"string"}},"suggestion_tracking":{"type":"object"},"suggestion_item_count":{"nullable":true,"type":"integer"},"suggestion_shop_count":{"nullable":true,"type":"integer"},"suggestion_image_count":{"nullable":true,"type":"integer"},"tracking":{"type":"object"},"search_info":{"type":"object"},"search_info_keys":{"type":"array","items":{"type":"string"}},"count":{"nullable":true,"type":"integer"},"bff_info":{"nullable":true},"card_type":{"nullable":true},"complete_buy_info":{"nullable":true},"complete_buy_queries":{"nullable":true,"type":"array","items":{}},"extra_query_condition":{"nullable":true},"hint":{"nullable":true},"icon_code":{"nullable":true},"pic":{"nullable":true},"promotion_query":{"nullable":true},"query_labels":{"nullable":true},"rewrite_keyword":{"nullable":true,"type":"string"},"seed_item_id":{"type":"string"},"stock":{"nullable":true,"type":"integer"},"sold":{"nullable":true,"type":"integer"},"historical_sold":{"nullable":true,"type":"integer"},"monthly_sold":{"nullable":true,"type":"integer"},"rating_star":{"nullable":true,"type":"number"},"rating_count":{"nullable":true,"type":"integer"},"rating_count_distribution":{"nullable":true,"type":"array","items":{"type":"integer"}},"item_rating":{"type":"object"},"rcount_with_context":{"nullable":true,"type":"integer"},"rcount_with_image":{"nullable":true,"type":"integer"},"is_sold_out":{"nullable":true,"type":"boolean"},"is_official_shop":{"nullable":true,"type":"boolean"},"is_preferred_plus_seller":{"nullable":true,"type":"boolean"},"liked_count":{"nullable":true,"type":"integer"},"catid":{"nullable":true,"type":"integer"},"category_breadcrumb":{"type":"array","items":{"type":"string"}},"tier_variations":{"type":"array","items":{}},"shop_name":{"nullable":true,"type":"string"},"shop_location":{"nullable":true,"type":"string"},"shop_icon":{"nullable":true,"type":"string"},"model_id":{"nullable":true},"global_cat":{"nullable":true,"type":"integer"},"global_cat_raw":{"nullable":true},"global_brand":{"nullable":true},"ctime":{"nullable":true,"type":"integer"},"discount":{"nullable":true},"recommended_platform_voucher_info":{"nullable":true},"voucher_info":{"nullable":true},"item_card_display_price":{"type":"object"},"item_card_display_sold_count":{"type":"object"},"username":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"item_count":{"nullable":true,"type":"integer"},"follower_count":{"nullable":true,"type":"integer"},"rating_good":{"nullable":true,"type":"integer"},"rating_normal":{"nullable":true,"type":"integer"},"rating_bad":{"nullable":true,"type":"integer"},"response_rate":{"nullable":true,"type":"number"},"response_time":{"nullable":true},"preparation_time":{"nullable":true},"cancellation_rate":{"nullable":true,"type":"number"},"has_flash_sale":{"nullable":true,"type":"boolean"},"mtime":{"nullable":true,"type":"integer"},"country_field":{"nullable":true,"type":"string"},"cover":{"nullable":true,"type":"string"},"portrait":{"nullable":true,"type":"string"},"shop_url":{"type":"string"},"profileSource":{"nullable":true,"type":"string"},"shop_categories":{"type":"array","items":{}},"mall_categories":{"type":"array","items":{}},"account":{"type":"object"},"shop_data":{"type":"object"}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: id; rowType=product_listing: id, title, product_url, price; rowType=shop_profile: id, shop_id, shop_name|name, source_url; rowType=suggestion: id, query."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}