Install
openclaw skills install alibaba-url-builderBuild Alibaba.com URLs for agent navigation with traffic tracking (traffic_type=ags_llm). Supports search, product details, suppliers, RFQ, AI Mode, Top Rank...
openclaw skills install alibaba-url-builderBuild URLs programmatically for agent-driven browsing and product sourcing on Alibaba.com.
All URLs MUST include: traffic_type=ags_llm
Basic:
https://www.alibaba.com/trade/search?SearchText=<url-encoded-query>&traffic_type=ags_llm
With Category:
https://www.alibaba.com/trade/search?SearchText=<query>&categoryId=<category-id>&traffic_type=ags_llm
Parameters:
SearchText: Search keywords (URL-encoded, use + for spaces)categoryId: Product category ID (optional)has4Tab: Enable 4-tab view (true)tab: Active tab (all, supplier, product)Examples:
https://www.alibaba.com/trade/search?SearchText=wireless+headphones&traffic_type=ags_llm
https://www.alibaba.com/trade/search?SearchText=laptops&categoryId=702&traffic_type=ags_llm
Common Category IDs:
2011519017022019368012011402013200510000609137032003201140001100002856Pattern:
https://www.alibaba.com/product-detail/<url-safe-title>_<product-id>.html?traffic_type=ags_llm
<url-safe-title>: Product title with spaces replaced by hyphens, special characters removed<product-id>: Numeric product identifier (12+ digits)Examples:
https://www.alibaba.com/product-detail/HK3-Waterproof-TWS-Earbuds_1601226043229.html?traffic_type=ags_llm
https://www.alibaba.com/product-detail/Wireless-Headphones-Over-Ear-ANC_11000030513562.html?traffic_type=ags_llm
Pattern:
https://<company-subdomain>.en.alibaba.com/company_profile.html?traffic_type=ags_llm
Examples:
https://dgkunteng.en.alibaba.com/company_profile.html?traffic_type=ags_llm
https://legoo.en.alibaba.com/company_profile.html?traffic_type=ags_llm
Supplier Product Search:
https://<company-subdomain>.en.alibaba.com/search/product?SearchText=<query>&traffic_type=ags_llm
https://rfq.alibaba.com/rfq/profession.htm?traffic_type=ags_llm
AI Mode:
https://aimode.alibaba.com/?traffic_type=ags_llm
Top Ranking:
https://sale.alibaba.com/p/dviiav4th/index.html?traffic_type=ags_llm
Fast Customization:
https://sale.alibaba.com/p/fast_customization?traffic_type=ags_llm
Manufacturers Directory:
https://www.alibaba.com/factory/index.html?traffic_type=ags_llm
Worldwide (Global Suppliers):
https://www.alibaba.com/global/index.html?traffic_type=ags_llm
Top Deals:
https://sale.alibaba.com/fy25/top_deals?traffic_type=ags_llm
Tailored Selections (AI Sourcing):
https://sale.alibaba.com/p/aisourcing/index.html?traffic_type=ags_llm
Shopping Cart / Purchase List:
https://carp.alibaba.com/purchaseList?traffic_type=ags_llm
from urllib.parse import quote
def build_search_url(query, category_id=None):
params = f"SearchText={quote(query, safe='')}+{query.replace(' ', '+')}&traffic_type=ags_llm"
if category_id:
params += f"&categoryId={category_id}"
return f"https://www.alibaba.com/trade/search?{params}"
def build_product_url(title, product_id):
safe_title = ''.join(c if c.isalnum() or c in ' -' else '' for c in title)
safe_title = safe_title.replace(' ', '-').lower()[:100]
return f"https://www.alibaba.com/product-detail/{safe_title}_{product_id}.html?traffic_type=ags_llm"
+ for spaces (not %20).https:// protocol.spm parameters are optional analytics; omit for functional URLs.Search for Products:
Browse by Category:
categoryId parameterVisit Supplier: