PHPackages                             lovefc/taobaoapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lovefc/taobaoapi

ActiveLibrary[API Development](/categories/api)

lovefc/taobaoapi
================

淘宝开放平台基础api类

0.0.2(4y ago)6101MITPHPPHP &gt;=5.3.0

Since Aug 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/lovefc/taobaoapi)[ Packagist](https://packagist.org/packages/lovefc/taobaoapi)[ Docs](https://github.com/lovefc/taobaoapi.git)[ RSS](/packages/lovefc-taobaoapi/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

淘宝开放平台API类库
===========

[](#淘宝开放平台api类库)

php封装的淘宝api类库，简单好用，配合文档食用，不用再去记函数名以及参数

### 安装

[](#安装)

直接下载源码或者使用 composer 安装

```
{
    "require": {
        "lovefc/taobaoapi": "0.0.2"
    }
}

```

### 食用方法

[](#食用方法)

```

$config = array(
    'client_id' => 'xx', //client_id
	'client_secret' => 'xxxx', //client_secret
	'backurl' => 'xxxxxx', //回调地址
	'data_type' => 'json', // 返回数据格式
	'taobao_token_file' => __DIR__ .'/taobao_token.txt'
);

// 必须要授权后使用
$taobao = new Taobao\Api($config);

$datas = array(
    // session的值如果提示要传,就要传,它本质上就是你授权获取的token
    'session' => $taobao->access_token,
    'simplify'=>'true',
    'fields' => 'tid,orders,receiver_name,receiver_state,receiver_address,receiver_mobile,receiver_phone,shop_pick,buyer_nick,receiver_town,o2o_shop_name'
);

// 这里使用的函数就是淘宝的api接口名
// 参考 https://open.taobao.com/api.htm?docId=46&docType=2
// 注意把api接口名中的点号换成下划线即可，传参请参考文档
$data = $taobao->taobao_trades_sold_get($datas);

$data = json_decode($data, true);

print_r($data);

```

### 交流讨论

[](#交流讨论)

QQ群号：474310505

[![avatar](/qq.png)](/qq.png)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~316 days

Total

2

Last Release

1781d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29d97b6587197b373f7244e3d4a84e6944ffd971ff10a88256c39432e3fb8936?d=identicon)[lovefc](/maintainers/lovefc)

---

Top Contributors

[![lovefc](https://avatars.githubusercontent.com/u/18413965?v=4)](https://github.com/lovefc "lovefc (7 commits)")

---

Tags

phpapi

### Embed Badge

![Health badge](/badges/lovefc-taobaoapi/health.svg)

```
[![Health](https://phpackages.com/badges/lovefc-taobaoapi/health.svg)](https://phpackages.com/packages/lovefc-taobaoapi)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
