Skip to content

API & Embed Docs

Use our public API to search AliExpress products, embed deal banners on your site, build CLI tools, or let AI agents read the humanoid robot catalog. Product responses include affiliate links.

Sub-affiliate earnings: Pass your tag parameter to earn commissions on sales generated through your embeds and API integrations. Sign up for a tag here.

Quick Start — Embed a Banner

Copy this iframe to embed a dynamic product banner on any website:

<iframe
  src="https://bestcartai.com/api/embed?q=wireless+earbuds&tag=YOUR_ID&limit=4&format=html&theme=dark"
  width="100%"
  height="380"
  frameborder="0"
  style="border-radius:12px;"
></iframe>

CLI Usage

Use curl or any HTTP client:

# Search products
curl "https://bestcartai.com/api/products?q=wireless+earbuds&limit=5"

# Read the AI/bot manifest
curl "https://bestcartai.com/ai.json"

# Read the curated robot catalog
curl "https://bestcartai.com/humanoids/catalog.json"

# Read direct robot answers for AI/search
curl "https://bestcartai.com/humanoids/answers"

# Read the Unitree buyer checklist
curl "https://bestcartai.com/humanoids/buyer-checklist"

# Use OpenAPI with generators or agent tooling
curl "https://bestcartai.com/openapi.json"

# AI chat
curl -X POST https://bestcartai.com/api/chat \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"best phone case under $10","timestamp":0}]}'

# Visual search
curl -X POST https://bestcartai.com/api/visual-search \
  -F "image=@product-photo.jpg"

# Get embed JSON for your site
curl "https://bestcartai.com/api/embed?q=led+lights&tag=my_blog&format=json"

API Endpoints

GET/ai.json

Compact machine-readable site manifest for bots, answer engines, and CLIs

ParamTypeDescription
Example:
curl https://bestcartai.com/ai.json
GET/openapi.json

OpenAPI 3.1 schema for public BestCart AI endpoints

ParamTypeDescription
Example:
curl https://bestcartai.com/openapi.json
GET/humanoids/catalog.json

Curated Unitree and humanoid robot catalog with SDK/EDU development notes

ParamTypeDescription
Example:
curl https://bestcartai.com/humanoids/catalog.json
GET/humanoids/answers

Crawlable robot Q&A with FAQPage structured data for search and AI answer engines

ParamTypeDescription
Example:
curl https://bestcartai.com/humanoids/answers
GET/humanoids/buyer-checklist

Crawlable seller-message templates and quote checklist for high-ticket Unitree buyers

ParamTypeDescription
Example:
curl https://bestcartai.com/humanoids/buyer-checklist
GET/api/products

Search AliExpress products with affiliate links

ParamTypeDescription
qstringSearch query (e.g. 'wireless earbuds')
limitnumberResults per page (max 50, default 40)
offsetnumberPagination offset
sortstringrelevance | price_asc | price_desc | newest
min_pricenumberMinimum price filter
max_pricenumberMaximum price filter
currencystringTarget currency (USD, EUR, GBP, etc.)
countrystringShip-to country code (US, DE, BR, etc.)
category_idstringAliExpress category ID
Example:
/api/products?q=wireless+earbuds&limit=5&currency=EUR&sort=price_asc
POST/api/chat

AI shopping assistant — conversational product search

ParamTypeDescription
messagesarray[{"role":"user","content":"...","timestamp":123}]
Example:
{"messages":[{"role":"user","content":"best bluetooth speaker under $20","timestamp":1234}]}
POST/api/visual-search

Upload an image, AI identifies the product and finds it on AliExpress

ParamTypeDescription
imageFileImage file (multipart/form-data)
Example:
curl -X POST -F 'image=@photo.jpg' https://bestcartai.com/api/visual-search
POST/api/subscribe

Capture robot buyer intent for EDU quotes, price drops, accessories, and buying help

ParamTypeDescription
emailstringBuyer email address
intereststringedu-quote | price-drop | accessories | buying-help
productSlugstringOptional robot slug such as unitree-g1
currentPricenumberOptional current price for price-drop scoring
targetPricenumberOptional target alert price
targetDropPctnumberOptional target discount percentage
sourcestringWhere the lead came from
Example:
curl -X POST https://bestcartai.com/api/subscribe -H "Content-Type: application/json" -d '{"email":"buyer@example.com","interest":"price-drop","productSlug":"unitree-g1","currentPrice":18852,"targetDropPct":10}'
GET/api/embed

Embeddable product banner — returns HTML or JSON for publishers

ParamTypeDescription
qstringSearch query
tagstringYour sub-affiliate tracking ID
limitnumberNumber of products (max 12)
formatstringjson | html (default: json)
currencystringTarget currency
themestringdark | light
Example:
/api/embed?q=phone+cases&tag=my_blog&limit=4&format=html&theme=dark
GET/api/og

Dynamic Open Graph image for social sharing

ParamTypeDescription
titlestringProduct title
pricestringSale price
originalstringOriginal price
discountstringDiscount percentage
imagestringProduct image URL
Example:
/api/og?title=Wireless+Earbuds&price=7.22&original=14.73&discount=51

Rate Limits

Product search: 50 requests/minute per IP

Chat: 20 requests/minute per IP

Visual search: 10 requests/minute per IP

Embed: 100 requests/minute per IP (cached for 5 min)