eBay
在 eBay 上买卖
- 认证方式
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 购物
- 文档 / URL
- https://developer.ebay.com/
简介
eBay Buy API 提供商品搜索、物品详情和目录数据——外加销售和履约 API。认证是 OAuth 2.0(未认证请求返回 403——已实测)。
快速开始
商品搜索(替换 YOUR_TOKEN):
curl "https://api.ebay.com/buy/browse/v1/item_summary/search?q=iphone&limit=3" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"itemSummaries": [
{
"itemId": "v1|395123456789|0",
"title": "Apple iPhone 15 128GB Black",
"price": { "value": "799.00", "currency": "USD" },
"itemWebUrl": "https://www.ebay.com/itm/395123456789",
"thumbnailImages": [{ "imageUrl": "https://..." }]
}
]
}
认证方式
- 在 developer.ebay.com 注册 → 创建应用 → 获取 Client ID + Client Secret。
- 公开数据的 OAuth 2.0 client-credentials 流程:
curl -X POST "https://api.ebay.com/identity/v1/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "CLIENT_ID:CLIENT_SECRET" \
-d "grant_type=client_credentials&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory.readonly"
- 无令牌请求返回 403(已实测)。
速率限制与注意事项
- 免费开发者账号:限流适中(每个 API 每天几百次——见文档);付费档可扩展。
- Buy Browse API(
/buy/browse/v1)是主要读取 API:item_summary 搜索、物品详情和目录。 - 沙盒:
api.sandbox.ebay.com+ 测试密钥做开发。 - OAuth 令牌短时有效——通过同一令牌端点刷新。
常见问题
eBay API 免费吗? 免费开发者账号带限流;部分 API 有费用。
如何获取令牌? 用应用的 Client ID/Secret 走 OAuth 2.0 client-credentials。
为什么 403? 公开 Buy API 需要 Bearer 令牌(已实测)。
购物 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Best Buy Products, Buying Options, Categories, Recommendations, Stores and Commerce | API Key | Yes | Unknown | ↗ |
| BuyWhere Real-time product catalog API for AI agents across merchants in 7 countries (SG, MY, TH, VN, PH, ID, US) | API Key | Yes | Unknown | ↗ |
| Descripio Amazon Reviews Amazon product reviews for 12 marketplaces | API Key | Yes | Unknown | ↗ |
| Digi-Key Retrieve price and inventory of electronic components as well as place orders | OAuth | Yes | Unknown | ↗ |
| Dummy Products An api to fetch dummy e-commerce products JSON data with placeholder images | API Key | Yes | Yes | ↗ |