# Goofish (Xianyu) Product Scraper 闲鱼 (`gio21/goofish-scraper`) Actor

Scrape Goofish / Xianyu (闲鱼) second-hand listings by URL or item ID. Get title, price, original price, views, wants, seller info, images & more. No login required. $0.005/product.

- **URL**: https://apify.com/gio21/goofish-scraper.md
- **Developed by:** [Gio](https://apify.com/gio21) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$5.00 / 1,000 product scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Goofish (Xianyu) Scraper — Second-Hand Listings, Prices, Sellers & Demand

**Goofish Scraper** extracts second-hand listing data from [Goofish / Xianyu (闲鱼)](https://www.goofish.com) — Alibaba's C2C resale marketplace — by **listing URL or item ID**: title, asking price, original price, shipping fee, demand signals (wants, views, sold), photos, publish date and full seller profile. It runs with **no login, no cookies and no setup**.

Export to **JSON, CSV or Excel**, pull it through the **API**, schedule it, or feed it straight to an **AI agent**. Think of it as a Goofish API for the listing data the marketplace doesn't expose officially.

### What can you do with it?

- **💰 Second-hand price research** — pull the asking price, original price and shipping fee for any listing to benchmark used-market value.
- **🔁 Reselling & arbitrage** — compare Goofish resale prices against retail, Temu or 1688 sourcing costs to spot flips and margins.
- **📍 Monitor specific listings** — track wants, views, sold count and online status on the exact items you care about over time.
- **📊 Market & demand research** — measure interest with `wantCount`, `browseCount`, `collectCount` and seller credibility signals.
- **🤖 AI / LLM datasets** — produce clean, structured listing JSON for RAG pipelines, agents and analysis.

### What data does it extract?

| Field | Description |
|-------|-------------|
| `title` / `description` | Listing title and full description text |
| `price` / `originalPrice` / `priceUnit` | Asking price and original price |
| `currency` | Currency code (CNY) |
| `transportFee` | Shipping fee |
| `quantity` / `status` / `isOnline` | Stock, listing status (`在线` = online) and online flag |
| `wantCount` / `collectCount` / `browseCount` / `soldCount` | Demand & engagement signals |
| `publishedAt` / `publishedTimestamp` | When the item was listed |
| `images` / `coverImage` | Photo URLs |
| `categoryId` | Category identifier |
| `seller` | Seller nick, city, item count, items sold, Zhima (Sesame Credit) verification, last-active, reply speed, avatar |
| `itemId` / `url` | Identifiers and canonical link |

### Input

Provide one or more **Goofish listing URLs** (or bare numeric **item IDs**). This actor works **per item** — you give it the links to the listings you want, and it returns one structured record for each. It does **not** search Goofish by keyword.

| Field | Type | Description |
|-------|------|-------------|
| `itemUrls` | Array | Goofish/Xianyu listing URLs, e.g. `https://www.goofish.com/item?id=777925312968`. |
| `itemIds` | Array | Alternatively, bare numeric Goofish item IDs. |
| `maxRetries` | Integer | Retries if the page returns an anti-bot challenge instead of data. Default `2`, max `4`. |

### Output

One record per listing:

```json
{
  "itemId": "777925312968",
  "url": "https://www.goofish.com/item?id=777925312968",
  "title": "Teenie  weenie     特卖",
  "description": "Teenie  weenie     特卖\n  所有款式在指定时间内购都有折扣，低至一折起 ...",
  "price": 165,
  "originalPrice": 420,
  "priceUnit": null,
  "currency": "CNY",
  "transportFee": 0,
  "quantity": 1,
  "status": "在线",
  "isOnline": true,
  "categoryId": "50114004",
  "wantCount": 54,
  "collectCount": 12,
  "browseCount": 1118,
  "soldCount": 0,
  "publishedAt": "2024-03-28 00:02:19",
  "publishedTimestamp": 1711555339000,
  "images": [
    "http://img.alicdn.com/bao/uploaded/i2/O1CN01hUeND523Ee7UmixpH_!!53-fleamarket.heic"
  ],
  "coverImage": "http://img.alicdn.com/bao/uploaded/i2/O1CN01hUeND523Ee7UmixpH_!!53-fleamarket.heic",
  "seller": {
    "sellerId": "2209362967224",
    "nick": "菁菁33",
    "city": "牡丹江",
    "itemCount": 1330,
    "soldCount": 56,
    "zhimaVerified": true,
    "lastActive": "10小时前来过",
    "replyInterval": "3小时+",
    "avatar": "http://img.alicdn.com/bao/uploaded/i2/O1CN01xnKKk223Ee6Hz7DhN_!!0-mtopupload.jpg"
  }
}
````

#### Field notes

- `price` / `originalPrice`: asking price and the seller's stated original price, both in CNY. `originalPrice` is `null` when the seller didn't provide one.
- `status` / `isOnline`: `status` is the raw marketplace label (`在线` = online); `isOnline` is the convenient boolean.
- `soldCount`: items sold for this specific listing — often `0` since most Goofish listings are single, one-off second-hand items.
- `wantCount` / `collectCount` / `browseCount`: demand signals — how many users tapped "want", saved, or viewed the listing.
- `seller.zhimaVerified`: whether the seller passed Alibaba's Zhima (Sesame Credit) verification — a trust signal for buyers.
- Text fields (`title`, `description`, `status`, `seller.city`, `seller.nick`) are returned in their original Chinese.

### Integrations

- **API** — start runs and fetch the dataset via the [Apify API](https://docs.apify.com/api/v2) (REST/JSON) or the JS/Python clients. A Goofish API for the data the marketplace doesn't expose.
- **Schedule & monitor** — run on a [schedule](https://docs.apify.com/platform/schedules) to re-check the same listings for price or status changes; get notified on failures.
- **AI agents / MCP** — expose this actor to ChatGPT, Claude and other assistants through the [Apify MCP server](https://mcp.apify.com) so an AI can pull Goofish listing data on demand.
- **No-code** — pipe results into Make, Zapier, Google Sheets, Slack or your database with Apify [integrations](https://docs.apify.com/platform/integrations) and webhooks.

### FAQ

**What is Goofish / Xianyu (闲鱼)?**
Goofish — known in China as Xianyu (闲鱼) — is Alibaba's consumer-to-consumer marketplace for second-hand and used goods, similar to a Chinese eBay or Facebook Marketplace. Goofish is the international-facing name for the same platform.

**How does Goofish Scraper work?**
You give it the links (or IDs) of the listings you want. The actor opens each listing page exactly as a buyer would, lets the page perform its own signed API handshake, then copies the visible data and organizes it into a structured record — only much faster, and at scale.

**Do I need a Goofish account or login?**
No. No account, cookies or credentials — proxy and unblocking are handled automatically.

**Can I search Goofish by keyword?**
No. This actor is **URL/ID-based**: it scrapes the detail of listings you already have links to. It does not run keyword searches or return a feed of results. Collect the listing URLs first (manually or from another source), then pass them in `itemUrls`.

**Is it legal to scrape Goofish?**
The actor collects only **publicly available** listing information (no login, no personal account data beyond the public seller profile). As with any scraping, you are responsible for how you use the data and for complying with applicable laws and terms. See [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

**What currency are the prices in?**
Prices (`price`, `originalPrice`, `transportFee`) are in CNY (Chinese Yuan).

**Why did a listing return `no_data`?**
The page hit a transient anti-bot challenge instead of returning data. Simply re-run that URL or ID — the `maxRetries` input also retries automatically.

**Can I get the data through an API or connect it to AI?**
Yes — run it via the Apify API/clients, or expose it to AI assistants through the Apify MCP server. See **Integrations** above.

**How much does it cost?**
Pay only for what you scrape on a pay-per-result basis on a paid Apify plan.

### Related Actors

Building a sourcing or resale pipeline? Pair Goofish Scraper with:

- **[Shopee Scraper](https://apify.com/gio21/shopee-scraper)** — products, prices and sold-volume estimates from Shopee by keyword or category.
- **[1688 Product Scraper](https://apify.com/gio21/1688-product-scraper)** — wholesale product data from 1688 (Alibaba).
- **[Temu Scraper](https://apify.com/gio21/temu-scraper)** — products and prices from Temu.

***

### ⭐ Like this actor?

If it saved you time, please take 30 seconds to [leave a review on the Apify Store](https://apify.com/gio21/goofish-scraper) — it's the single biggest way to support continued development.

# Actor input Schema

## `itemUrls` (type: `array`):

One Goofish/Xianyu listing URL per item. Each must be a full goofish.com item-detail URL containing the numeric id, e.g. "https://www.goofish.com/item?id=777925312968". Add one entry per listing you want. Use this OR (or together with) itemIds. Not a search query.

## `itemIds` (type: `array`):

Alternative to itemUrls: one bare numeric Goofish item ID per item (the id from the listing URL), e.g. "777925312968". Add one entry per listing. Combine with itemUrls if you have a mix of links and IDs.

## `maxRetries` (type: `integer`):

How many times to retry a single item if the page returns a transient anti-bot challenge instead of data (results in a `no_data` record). Higher values raise reliability and run cost. Example: 2. Range 0–4.

## Actor input object example

```json
{
  "itemUrls": [
    "https://www.goofish.com/item?id=777925312968"
  ],
  "itemIds": [
    "777925312968"
  ],
  "maxRetries": 2
}
```

# Actor output Schema

## `overview` (type: `string`):

Scraped Goofish listings.

# 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 = {
    "itemUrls": [
        "https://www.goofish.com/item?id=777925312968"
    ],
    "itemIds": [
        "777925312968"
    ],
    "maxRetries": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("gio21/goofish-scraper").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 = {
    "itemUrls": ["https://www.goofish.com/item?id=777925312968"],
    "itemIds": ["777925312968"],
    "maxRetries": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("gio21/goofish-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "itemUrls": [
    "https://www.goofish.com/item?id=777925312968"
  ],
  "itemIds": [
    "777925312968"
  ],
  "maxRetries": 2
}' |
apify call gio21/goofish-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gio21/goofish-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Goofish (Xianyu) Product Scraper 闲鱼",
        "description": "Scrape Goofish / Xianyu (闲鱼) second-hand listings by URL or item ID. Get title, price, original price, views, wants, seller info, images & more. No login required. $0.005/product.",
        "version": "0.0",
        "x-build-id": "e7GTKYoObCYW7JrDh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gio21~goofish-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gio21-goofish-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gio21~goofish-scraper/runs": {
            "post": {
                "operationId": "runs-sync-gio21-goofish-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gio21~goofish-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-gio21-goofish-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "itemUrls": {
                        "title": "Item URLs",
                        "type": "array",
                        "description": "One Goofish/Xianyu listing URL per item. Each must be a full goofish.com item-detail URL containing the numeric id, e.g. \"https://www.goofish.com/item?id=777925312968\". Add one entry per listing you want. Use this OR (or together with) itemIds. Not a search query.",
                        "default": [
                            "https://www.goofish.com/item?id=777925312968"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "itemIds": {
                        "title": "Item IDs",
                        "type": "array",
                        "description": "Alternative to itemUrls: one bare numeric Goofish item ID per item (the id from the listing URL), e.g. \"777925312968\". Add one entry per listing. Combine with itemUrls if you have a mix of links and IDs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxRetries": {
                        "title": "Max retries per item",
                        "minimum": 0,
                        "maximum": 4,
                        "type": "integer",
                        "description": "How many times to retry a single item if the page returns a transient anti-bot challenge instead of data (results in a `no_data` record). Higher values raise reliability and run cost. Example: 2. Range 0–4.",
                        "default": 2
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
