PHPackages                             sanmai/mercari-php-sdk - 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. sanmai/mercari-php-sdk

ActiveLibrary[API Development](/categories/api)

sanmai/mercari-php-sdk
======================

Mercari API PHP SDK

0.1.11(1mo ago)34.6k—10%Apache-2.0PHPPHP ^8.2CI passing

Since Jan 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/sanmai/mercari-php-sdk)[ Packagist](https://packagist.org/packages/sanmai/mercari-php-sdk)[ RSS](/packages/sanmai-mercari-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (36)Versions (15)Used By (0)

Mercari API PHP SDK
===================

[](#mercari-api-php-sdk)

This is a pretty complete Mercari API client. Feel free to jump in and contribute!

```
composer require sanmai/mercari-php-sdk

```

Status of Implementation
------------------------

[](#status-of-implementation)

- Search Items (v3)
- Get Item By ID
- Get User By ID
- Fetch Bulk Items by ID
- Purchase Item
- Similar Items
- Get Transaction By TransactionID
- Get Transaction By ItemID
- Get Transaction Messages
- Post Transaction Messages
- Post Transaction Review
- Get Todo List
- Get Comments
- Post Comment
- Get Item Categories
- Get Item Brands

What You Need
-------------

[](#what-you-need)

Before you start messing with this API client, here's the lowdown on what you gotta have:

- Authority Hostname. In the examples, we'll pretend it's `proxy-auth.example.com` .
- "Open API" Hostname. This is where you actually talk to the Mercari API. We'll call it `proxy-api.example.com`.
- API Credentials: You'll need a `client_id` and `client_secret` from Mercari.

Next, you can either set up your own proxy server or resort to a dynamic SSH tunnel. Your call!

### Proxy Server

[](#proxy-server)

Just add a new location block to your config file:

```
location / {
    proxy_pass https://actual-api-host.example.jp/;
    proxy_ssl_server_name on;

    # Lock it down with an IP allow list
    allow 192.168.1.0/24; # Allow a specific subnet
    allow 10.0.0.1;      # Allow a specific IP
    deny all;             # Deny all other IPs
}
```

This tells nginx to forward requests to your `actual-api-host.example.jp` server, but only from the IPs you've specified. You're in control, deciding who gets access and what they can do.

### SSH Tunnel

[](#ssh-tunnel)

If you don't want to set up a dedicated proxy, fear not! Just run this command to set up a dynamic SSH tunnel:

```
ssh -fCND 1080 my-server.example.com
```

This opens a tunnel through your `my-server.example.com` server (replace with your actual server address), granting you access to the Mercari API as if you were right there on the server.

Development
-----------

[](#development)

To run all tests:

```
make -j -k

```

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance97

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.6% 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 ~73 days

Recently: every ~25 days

Total

12

Last Release

45d ago

PHP version history (2 changes)0.1PHP ^7.4 || ^8.0

0.1.5PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/edcb8dde95c71b1c97c3c91e57d3548795fa2014c657744fb878e2be3b5949fc?d=identicon)[sanmai](/maintainers/sanmai)

---

Top Contributors

[![sanmai](https://avatars.githubusercontent.com/u/139488?v=4)](https://github.com/sanmai "sanmai (64 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (23 commits)")

---

Tags

sdkMercari

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sanmai-mercari-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/sanmai-mercari-php-sdk/health.svg)](https://phpackages.com/packages/sanmai-mercari-php-sdk)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)[tamara-solution/php-sdk

Tamara PHP Client Library

10259.4k1](/packages/tamara-solution-php-sdk)

PHPackages © 2026

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