Xianyu Search API

POST

API health

24h health
Normal
24h average time
—
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Browse second-hand listings on Xianyu for a search phrase, up to 50 per call, with 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.

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.

Price $5.56 per 1,000 requests ($0.005556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.

Please help me write a data collection script with the EveryInfra Xianyu Search endpoint (xianyu/search).

Endpoint contract:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to xianyu and action to search, and put the parameters inside params.
- Required parameters:
  - keyword: 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.
- Optional parameters:
  - limit: 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. (default: 20)
- Returns a list of records. Main fields of each record: item_id (Numeric Xianyu listing ID (string)), url, title, price, original_price (Original price the seller entered, in y…), currency, city (Where the listing is, at city level as…), image_url, want_count (Number of users who tapped the want but…), tags (Every label on the listing card as writ…), category_id (Xianyu category ID (string)), free_shipping (Whether shipping is free); 19 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=xianyu.
- Example request body:
{
  "platform": "xianyu",
  "action": "search",
  "params": {
    "keyword": "iPhone 15"
  }
}
- Price: $5.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesxianyuPlatform identifier, fixed value.
actionbodystringYessearchCapability identifier, fixed value.
keywordbody.paramsNot declaredYes-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.
limitbody.paramsinteger (1–50)No20The 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.

Code samples

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"
  }
}'

[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

Real response

Captured September 29, 2026 at 22:32 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.

json
{
  "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": { … }
}

Response fields

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
item_idNumeric Xianyu listing ID (string); pass it as is in urls of item_detail.
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
pricePrice as a number without a currency symbol; see currency.
original_priceOriginal price the seller entered, in yuan; null when not entered.
currencyCurrency code of the price (for example CNY, USD). If price is present but currency is null, do not assume a currency.
cityWhere 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_urlImage link. Capabilities with several images may return an image_urls array.
want_countNumber 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.
tagsEvery 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_idXianyu category ID (string).
free_shippingWhether shipping is free.
is_auctionWhether the listing is an auction; if so, price is the current bid.
has_videoWhether the listing includes a video.
posted_atPublish 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_idNumeric seller ID (string).
seller_nameSeller nickname. Xianyu partly masks it for signed-out visitors, and it is returned as the page shows it.
seller_avatar_urlSeller profile photo URL.
seller_credit_labelSeller credit grade as shown on the search card, for example excellent.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

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.

Errors and billing

401
Missing or invalid key. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
422
Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
402
Insufficient balance. Top up first.
429
The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
503
Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
200 empty
The request completed without data and is not charged (billing.reason = empty_result_refunded).