npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

temu-sdk

v1.0.1

Published

Unofficial Temu SDK for JS/Node (US sellers only)

Readme

Temu SDK (Unofficial, US Sellers Only)

An unofficial TypeScript/JavaScript SDK for interacting with the Temu OpenAPI. This SDK helps you easily access Temu endpoints such as orders, products, logistics, fulfillment, ads, promotions, and more, without worrying about request signing or API boilerplate.

[!NOTE] ⚠️ Important: This SDK currently supports only the US Temu OpenAPI endpoints. EU and Global endpoints are not implemented.

🚀 Installation

npm install temu-sdk
# or
yarn add temu-sdk
# or
pnpm add temu-sdk

⚡ Quick Start

import dotenv from 'dotenv'
import TemuClient from 'temu-sdk'

dotenv.config()

const temu = new TemuClient({
    appKey: process.env.APP_KEY,
    accessToken: process.env.ACCESS_TOKEN,
    appSecret: process.env.APP_SECRET,
});

// Example: fetch orders
(async () => {
  const orders = await temu.order.orderListV2Get({
    pageNumber: 1,
    pageSize: 100
  });
  console.log(orders);
})();

🔧 Configuration

| Option | Type | Required | Default | Description | | ------------- | ----------------------- | -------- | ---------------------------------------------- | ------------------------------------------------------------------------- | | appKey | string | ✅ | — | Your Temu app key | | appSecret | string | ✅ | — | Your Temu app secret | | accessToken | string | ✅ | — | Access token from Temu OAuth flow | | baseurl | string | ❌ | https://openapi-b-us.temu.com/openapi/router | API base URL (change this if you’re using a proxy) | | headers | Record<string,string> | ❌ | {} | Extra headers (e.g. custom proxy headers, x-make-apikey, debug headers) |

📦 Example: Using with a Proxy

const temu = new TemuClient({
  appKey: "xxx",
  appSecret: "yyy",
  accessToken: "zzz",
  baseurl: "https://my-proxy.example.com/temu",
  headers: {
    "x-proxy-auth": "secret-token",
    "x-debug": "true",
  },
});

🔍 Available Endpoints

The SDK provides the following groups of methods:

  • client.ads
  • client.authorization
  • client.fulfillment
  • client.logistics
  • client.order
  • client.price
  • client.product
  • client.promotion
  • client.returnRefund
  • client.webhook

Each group exposes methods corresponding to Temu API operations. (See official Temu API docs for full method details.)

🛠 Advanced: Direct Request (Escape Hatch)

If an endpoint is not yet implemented, you can call the low-level method:

const result = await client._request("temu.custom.method", {
  param1: "value",
  param2: "value",
});

[!Warning] ⚠️ Note: _request is considered internal. Use it at your own risk.

📜 License

MIT License. This project is not officially affiliated with Temu.