# Xianyu Search API (xianyu.search)

- Canonical page: https://everyinfra.com/en/xianyu-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "xianyu", "action": "search", "params": {...}}
- Price: $0.005556 per call ($5.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 50 per call
- Mode: sync; add "mode": "async" for slow tasks

Xianyu Search finds second-hand listings on Xianyu by `keyword` and returns each listing's title, price, the original price the seller entered, city or province, how many people want it, listing tags, free shipping, auction status and publish time, plus the seller's nickname and credit level. Use it to see what an item sells for second-hand and how quickly it might move: resale price research, trade-in pricing, or watching listings for an item.

Chinese words and model numbers that sellers put in titles match best. `want_count` is how many people tapped the want button, a fair signal of demand; it is null when the listing card does not show it, which is not zero. For auctions `price` is the current bid, so leave them out of price estimates, and treat `original_price` as the seller's own claim.

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=xianyu&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 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. |
| limit | integer (1–50) | no | 20 | The most rows to return in this call, an integer from 1 to 50. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| item_id | Numeric Xianyu listing ID (string); pass it as is in `urls` of item_detail. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| price | Price as a number without a currency symbol; see currency. |
| original_price | Original price the seller entered, in yuan; null when not entered. |
| currency | Currency code of the price (for example CNY, USD). If price is present but currency is null, do not assume a currency. |
| city | Where the listing is, at city level as Xianyu shows it; some listings show only the province. Finer location, when the listing has it, is in `district`, `lat`, `lng` and `poi_name`. |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| want_count | Number of users who tapped the want button. In search it comes from the card's label and is null when the card does not show it; null is not zero. |
| tags | Every label on the listing card as written, such as brand new, free shipping, brand or price drop, plus seller labels (credit, identity check, last seen, years on Xianyu); the want count is separate in `want_count`. Empty list when there are none. |
| category_id | Xianyu category ID (string). |
| free_shipping | Whether shipping is free. |
| is_auction | Whether the listing is an auction; if so, `price` is the current bid. |
| has_video | Whether the listing includes a video. |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| seller_id | Numeric seller ID (string). |
| seller_name | Seller nickname. Xianyu partly masks it for signed-out visitors, and it is returned as the page shows it. |
| seller_avatar_url | Seller profile photo URL. |
| seller_credit_label | Seller credit grade as shown on the search card, for example excellent. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "xianyu",
  "action": "search",
  "params": {
    "keyword": "iPhone 15"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "xianyu",
        "action": "search",
        "params": {
            "keyword": "iPhone 15",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-29T22:32:50Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "xianyu",
  "action": "search",
  "results": [
    {
      "item_id": "1089122948858",
      "url": "https://www.goofish.com/item?id=1089122948858",
      "title": "滋滋【福利疯抢】iPhone 15 盲盒随机打包手机、平板、电脑，九九新几乎全新，不指定、不挑选，完美主义者请勿下单，要求较多的急单的勿扰勿拍！ ✅ 评论区随心许愿，快递随机取件发货✅ 1人1单，邮费自理，请自觉下单✅ 客服回复不及时还请谅解！商品有在就都可以下单购买 宝宝",
      "price": 1.13,
      "currency": "CNY",
      "city": "重庆",
      "image_url": "https://img.alicdn.com/bao/uploaded/i1/2222991832241/O1CN01RndZ4wTqacI2Qw7p_!!4611686018427385009-0-xy_item.jpg",
      "want_count": 2,
      "tags": [
        "13小时前发布",
        "freeShippingIcon"
      ],
      "category_id": "50023914",
      "free_shipping": true,
      "is_auction": false,
      "has_video": false,
      "posted_at": "2026-09-29T09:02:03+00:00",
      "seller_name": "•••",
      "platform": "xianyu"
    },
    {
      "item_id": "1073624434319",
      "url": "https://www.goofish.com/item?id=1073624434319",
      "title": "出苹果15 iPhone15 国行256g 因为换手机了，太多了手机用不过来 随缘出，机况如图，电池77%这样 自己看哈",
      "price": 500,
      "currency": "CNY",
      "city": "上海",
      "image_url": "https://img.alicdn.com/bao/uploaded/i2/2222827391527/O1CN011onH6VJOZXL1jFqC_!!4611686018427382311-0-xy_item.jpg",
      "want_count": 270,
      "tags": [
        "Apple/苹果",
        "256GB",
        "无任何维修"
      ],
      "category_id": "50025386",
      "free_shipping": true,
      "is_auction": false,
      "has_video": false,
      "posted_at": "2026-08-12T13:09:19+00:00",
      "seller_name": "•••",
      "platform": "xianyu"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### How can I tell whether an item will sell quickly?

Look at `want_count`, the number of people who tapped the want button, taken from the listing card. It is null when the card does not show it, which is not zero. Many wants soon after `posted_at` point to an item in demand.

### What should I watch for when estimating resale prices?

Leave out auctions, where `is_auction` is true and `price` is the current bid, and treat `original_price` as the seller's own figure. Grouping listings by model and condition keywords before reading the price spread gives a more reliable range.

### What do I learn about the seller?

The seller's ID, avatar and credit label as shown on the card, plus the seller tags in `tags`. Nicknames are partly masked exactly as Xianyu shows them. For a listing's full details, pass its `item_id` to the Xianyu Listing details capability.

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=xianyu
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
