# Xianyu Scraper & API | EveryInfra (`blushing_parachute/everyinfra-xianyu-api`) Actor

Unofficial Xianyu data via one Actor: search, item_detail. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-xianyu-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** E-commerce, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 26.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.60 / 1,000 search requests

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Xianyu Scraper & API | EveryInfra

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.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `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. | keyword | — | 20 (up to 50) | $0.0046 |
| `item_detail` | 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. | urls | — | all the source returns | $0.0042 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "iPhone 15"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `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`: `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`

#### Field notes

- `city`: Where the listing is. In `item_detail` it is at city level as Xianyu shows it (a few listings show only the province); in `search`, most results give the province only. Finer location, when the listing has it, is in `district`, `lat`, `lng` and `poi_name`.
- `item_id`: Numeric Xianyu listing ID (string); pass it as is in `urls` of item_detail.
- `original_price`: Original price the seller entered, in yuan; null when not entered.
- `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.
- `seller_id`: Numeric seller ID (string). Most `search` results do not return it.
- `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.
- `condition_level`: Condition on a 10-point scale: 10 is brand new, 9.5 is 95% new, and so on; null when the seller does not mark it.
- `district`: District or county where the item is located, returned as shown on the page; absent when not given.
- `division_id`: Administrative division code of the item's location (string, such as 360100); absent when not given.
- `lat`: Latitude of the item's location, given as-is without coordinate-system conversion (GCJ-02 is common on maps in China); absent when there is no location.
- `lng`: Longitude of the item's location, paired with lat; absent when there is no location.
- `poi_id`: ID of the place above on the Xianyu map (string).
- `poi_name`: Name of the place (POI) the seller marked, such as a mall or residential compound; absent when not marked.
- `province`: Province where the item is located.
- `quantity`: Quantity for sale as marked by the seller; usually 1 for second-hand items.
- `seller_bio`: The seller's profile signature, as written.
- `seller_city`: City shown on the seller's profile, which may differ from where the item is located.
- `seller_credit_level`: Seller's Xianyu credit level (a number).
- `seller_good_review_rate`: Seller's positive review rate as a percentage (98 means 98%); null when the profile does not show it.
- `seller_identity_tags`: Verification tags on the seller's profile, as written, such as "real-person verification passed".
- `seller_item_count`: Number of items for sale shown on the seller's profile.
- `seller_joined_at`: Time the seller joined Xianyu, ISO 8601, UTC.
- `seller_last_seen`: Time the seller last visited Xianyu, returned as shown on the page, such as "visited 5 hours ago".
- `seller_other_items`: Other items for sale by the same seller; each has item_id and url, and the page sometimes also gives title, price and image_url.
- `seller_reply_rate_24h`: Seller's reply rate within 24 hours as a percentage (99 means 99%); null when the profile does not show it.
- `seller_sold_count`: Total number of items the seller has sold, as shown on the seller's profile.
- `seller_url`: Link to the seller's page on Xianyu.
- `seller_zhima_level`: Name of the seller's Zhima Credit level, returned as shown on the page, such as "excellent credit".
- `seller_zhima_level_code`: Zhima Credit level code, such as A.
- `seller_zhima_verified`: Whether the seller has enabled and shows Zhima Credit.
- `shipping_fee`: Shipping fee (CNY); 0 means free shipping.
- `sold_count`: Number of units of this item sold. Most Xianyu items do not show this count; both 0 and not shown return null, which does not mean nothing was sold.
- `status`: Item status, returned as shown on the Xianyu page, for example "online".

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0046, one event per started block of 20 results.
- `item_detail`: $0.0042, one event per non-empty request, whatever the row count.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee, and platform usage is included in these prices.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.
- This is an independent Actor. It is not affiliated with, sponsored by, or endorsed by Xianyu or its owner; names and trademarks belong to their respective owners.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

## `keyword` (type: `string`):

Used by `search` (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.

## `urls` (type: `array`):

Used by `item_detail` (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.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 20 (max 50). Billing: `search` one event per started block of 20 results.

## `params` (type: `object`):

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "iPhone 15"
}
```

# Actor output Schema

## `records` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keyword": "iPhone 15"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-xianyu-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keyword": "iPhone 15" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-xianyu-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "iPhone 15"
}' |
apify call blushing_parachute/everyinfra-xianyu-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blushing_parachute/everyinfra-xianyu-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AOVaAdV7oRFhcBXN3/builds/IjCrsEsAldnzm4LVy/openapi.json
