# Xianyu API

Xianyu (Goofish) is Alibaba's second-hand marketplace. `search` returns listings that match a keyword. `item_detail` reads a batch of listings by numeric item ID or goofish.com item link, with one row per listing.

Second-hand listings sell or come down quickly, so every row is a snapshot taken at request time. On search results, `want_count` comes from the listing card and is null when the card does not show it. `item_detail` adds condition on a ten-point scale, view and save counts, every photo, the description, and the seller's positive review rate. Listings that cannot be read are returned in `missed` and are not billed.

- Request: POST https://api.everyinfra.com/api/v1/social with `{"platform": "xianyu", "action": "<action>", "params": {...}}`
- Canonical page: https://everyinfra.com/en/xianyu-api
- Each capability uses the price recorded in the public catalog. The response includes the amount charged. Authentication failures, invalid parameters, failed calls, and empty results are not charged.

## Actions

### search — Search
Browse second-hand listings on Xianyu for a search phrase, up to 50 per call. Get price, city, want count, tags, auction flag and the seller's trust grade. Chinese terms and model numbers match seller titles best. A null `want_count` means the card did not show it, not zero.
- Sync delivery · Price: $5.56 per 1,000 requests
- Catalog values: defaultLimit=20, maxLimit=50. A limit can control pages or per-parent expansion for some actions, so it is not always a final row count.
- Parameters:
  - `keyword` (required): The Xianyu search phrase for `search`, 1–100 characters. Chinese terms and model numbers match seller titles more often than English translations. It is not an item ID or a seller name.
- 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
- Capability page: https://everyinfra.com/en/xianyu-api/search (Markdown: https://everyinfra.com/en/xianyu-api/search.md)

### item_detail — Listing details
Get full Xianyu listings for 1 to 20 item IDs or goofish.com links. Get description, condition score, shipping fee, location and detailed seller stats. `condition_level` uses a 10-point scale. `sold_count` is null when Xianyu hides it. Listings that cannot be read are refunded.
- Sync delivery · Price: $5.56 per 1,000 requests
- Parameters:
  - `urls` (required): For `item_detail`, an array of 1–20 Xianyu listings: each entry is a numeric item ID (the `item_id` returned by `search`) or a `https://www.goofish.com/item?id=<digits>` link, and each listing may appear once. Billing is per listing, and listings that cannot be read are refunded. App share short links are not accepted.
- 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
- Capability page: https://everyinfra.com/en/xianyu-api/item_detail (Markdown: https://everyinfra.com/en/xianyu-api/item_detail.md)

## Xianyu API questions

### What can I retrieve with the Xianyu API?

Set `platform` to `xianyu`. The current catalog lists search and listing details. These action names identify different Xianyu objects or views; they are not interchangeable search modes.

### Which input starts the Xianyu `search` request?

The Xianyu search phrase for `search`, 1–100 characters. Chinese terms and model numbers match seller titles more often than English translations. It is not an item ID or a seller name. Send it as `keyword` inside `params`.

### Which fields can Xianyu `search` return?

Its declared schema includes `item_id`, `title`, `price`, and `original_price`. A declared field can still be absent from an individual record, and every other action has its own field list.

### Does every Xianyu action return immediately?

Actions labeled asynchronous return a job ID you poll. `item_detail` runs synchronously only: it reads everything it returns (every target of a batch, or every SKU of a product) within the same call, and a request with `"mode": "async"` gets a 422 before anything is charged. Every other action can also run asynchronously: add `"mode": "async"` to the request body to receive a job ID immediately, useful for slow tasks or large limits. The current catalog contains sync delivery.

## Also

- Machine catalog (no key): https://everyinfra.com/openapi.json · GET /api/v1/social/catalog?platform=xianyu
- API guide for AI clients: https://everyinfra.com/llms.txt · agents guide: https://everyinfra.com/agents.md
