# 闲鱼 Xianyu API

按关键词搜索闲鱼在售二手商品，再用返回的 item_id 或商品链接批量读取详情：成色、想要人数、浏览与收藏数、全部图片、描述、所在城市和卖家好评率；按商品数计费，没取到的商品不收费。

- Domain: ecom · 2 data actions
- Canonical page: https://everyinfra.com/xianyu-api
- Failures and empty results never form a final charge. A few capabilities state different billing terms in their own API docs; for those, the API docs apply.

## Actions

### search — 关键词搜索
- Mode: sync · Price: 400 credits ($5.56 / 千次)
- Required: keyword

- Returns fields: item_id, url, title, price, original_price, currency, city, image_url, want_count, tags, category_id, free_shipping, is_auction, has_video, posted_at, seller_id, seller_name, seller_avatar_url, seller_credit_label, platform

### item_detail — 商品详情
- Mode: sync · Price: 400 credits ($5.56 / 千次)
- Required: urls

- Returns fields: item_id, url, title, text, price, original_price, currency, shipping_fee, condition_level, status, quantity, want_count, view_count, collect_count, sold_count, province, city, category_id, image_url, images, posted_at, seller_id, seller_name, seller_url, seller_item_count, seller_sold_count, seller_good_review_rate, seller_reply_rate_24h, district, division_id, lat, lng, poi_name, poi_id, seller_avatar_url, seller_city, seller_bio, seller_joined_at, seller_last_seen, seller_zhima_verified, seller_zhima_level, seller_zhima_level_code, seller_credit_level, seller_identity_tags, seller_other_items, platform

## Also

- Machine catalog (no key): https://everyinfra.com/openapi.json · GET /api/v1/social/catalog
- Agents guide: https://everyinfra.com/agents.md
