Taobaokeapi is an open-source Nuxt.js demo that shows how to build a Taobao affiliate (Taobaoke) shopping promotion site on top of the official Taobao Affiliate APIs.
What is Taobaokeapi?
Taobaokeapi is a demo application built with Node.js and Nuxt.js that illustrates how to integrate the Taobao Affiliate API suite into a mobile-friendly web UI. It takes as input a user token from api.taobaokeapi.com and a Taobao Union promotion site ID and ad zone ID, and it outputs a working storefront where visitors can browse promoted products, generate Taobao password (淘口令) shareable texts, and view order details. The project's README is written in Chinese and targets developers who want a ready-made reference for the Taobao Affiliate APIs.
Key Features
- Product discovery API — Uses
taobao.tbk.sc.material.optionalto fetch a feed of Taobao promotional products with optional filtering, displayed in a category and product list layout. - Taobao password generation — Calls
taobao.tbk.tpwd.createto turn a product link into a shareable 淘口令 (Tao password) string. - Link conversion and parsing — Uses
taobao.tbk.sc.tpwd.convertto resolve TKL texts into trackable affiliate links. - Order querying — Integrates
taobao.tbk.sc.order.details.getto retrieve order information for commission tracking. - Nuxt.js SSR frontend — The app runs as a universal Vue.js application with server-side rendering, configurable via
nuxt.config.jswith a root URL. - Vant mobile UI — The interface is built with the Vant component library, giving a mobile-first design suitable for WeChat and phone browsers.
- PM2 deployment workflow — Includes commands to build with Yarn or npm and launch through PM2 for production.
Who is it for?
- Developers building Taobaoke platforms: Use this demo as a starting point to understand how to call the four affiliate APIs and structure a Nuxt.js project around them.
- Affiliate marketers and independent promoters: Set up their own promotional storefront by cloning the repo and entering their own API token and promotion zone IDs.
- Nuxt.js learners: Study a small real-world Nuxt.js project with a server configuration file and Vant-based mobile components.
What can you do with Taobaokeapi?
- E-commerce developers: Integrate the product search, TKL generation, and order APIs into a new or existing Nuxt.js app.
- Promotion site operators: Deploy a functional demo where users browse product categories, open product details, and generate shareable TKL texts for social selling.
- WeChat mini-program or H5 developers: Learn how to build a mobile shopping UI with Vant and server-rendered data.
How do I set it up?
The README walks through these steps: clone the GitHub repository, open nuxt.config.js to set the frontend root URL in the env block, edit server/config.js with a usertoken obtained from https://api.taobaokeapi.com/?tbklogin=1 and the promotion site's site_id and adzone_id, then install dependencies using Yarn or npm, run yarn dev or npm run dev for local development, and use yarn build or npm run build plus pm2 start for production.
FAQ
What Taobao Affiliate APIs are included?
The demo covers four APIs: taobao.tbk.sc.material.optional for product search, taobao.tbk.tpwd.create for generating 淘口令, taobao.tbk.sc.tpwd.convert for TKL conversion and link redirect, and taobao.tbk.sc.order.details.get for querying orders.
Do I need a Taobao Union account to run it?
Yes. You need a usertoken from api.taobaokeapi.com and a Taobao Union promotion site with site_id and adzone_id. These are required for the affiliate API calls to return data.
Is this project free?
The source code is open-source on GitHub, so the code itself is free. You will need to obtain your own API credentials from Taobao Union to use the affiliate APIs.
How do I deploy it?
Build the project with yarn build or npm run build, then start it with PM2 using pm2 start. The default local development server runs at http://localhost:3000/.







