# Goofish Xianyu Search Scraper (`fetch_cat/goofish-xianyu-search-scraper`) Actor

Search Goofish (Xianyu) listings by keyword and export structured product, price, seller, location, image, category, and demand data.

- **URL**: https://apify.com/fetch\_cat/goofish-xianyu-search-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.08 / 1,000 item extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Search Scraper

Export public Goofish (闲鱼 / Xianyu) marketplace search results to JSON, CSV, Excel, or your preferred integration. Search in Chinese or English and collect normalized listing, price, seller, location, image, category, and demand data.

### Input example

```json
{
  "keywords": ["iPhone 15", "自行车"],
  "maxItems": 20
}
```

### Output example

```json
{
  "itemId": "123456789",
  "url": "https://www.goofish.com/item?id=123456789",
  "keyword": "iPhone 15",
  "page": 1,
  "position": 1,
  "title": "iPhone 15 256G",
  "price": 3999,
  "currency": "CNY",
  "area": "上海",
  "sellerName": "example seller",
  "wantCount": 12,
  "labels": ["Apple/苹果"],
  "freeShipping": true,
  "isAuction": false,
  "isVideo": false,
  "scrapedAt": "2026-08-07T12:00:00.000Z"
}
```

### What data it exports

| Field | Description |
|---|---|
| `itemId` | Public listing identifier |
| `url` | Public listing URL |
| `keyword` | Search term that produced the row |
| `page` | Search result page number |
| `position` | Listing position within the result page |
| `title` | Listing title |
| `price` | Numeric asking price |
| `currency` | Price currency, normally CNY |
| `area` | Public location shown on the result |
| `imageUrl` | Primary listing image URL |
| `sellerName` | Public seller display name |
| `sellerAvatarUrl` | Public seller avatar URL |
| `sellerId` | Public seller identifier when available |
| `wantCount` | Number of users showing interest |
| `publishedAt` | Posting time when available |
| `categoryId` | Public category identifier |
| `categoryName` | Public category name |
| `labels` | Listing and category labels |
| `freeShipping` | Whether free shipping is advertised |
| `isAuction` | Whether the result is an auction |
| `isVideo` | Whether the result includes video |
| `detailPageType` | Public listing-page type |
| `scrapedAt` | ISO collection timestamp |

Optional values are omitted when they are not present on a public search result. The Actor does not invent values.

### Input settings

| Key | Description | Default |
|---|---|---:|
| `keywords` | One or more Chinese or English search terms | required |
| `maxItems` | Total unique listings saved | 20 |
| `resultsPerPage` | Listings requested per page | 30 |
| `maxPagesPerKeyword` | Pagination safety limit per keyword | 20 |

`maxItems` applies across all keywords. Add several keywords when you want one combined, deduplicated export.

### Who is it for?

- **Resale analysts** comparing asking prices and availability.
- **Marketplace sellers** researching competing listings and regions.
- **Collectors and buyers** monitoring niche products or brands.
- **Data teams** feeding structured marketplace rows into dashboards.
- **Automation builders** scheduling recurring exports and alerts.
- **AI developers** giving agents access to current public search results.

### Use cases

#### Price monitoring

Schedule the Actor with the same keyword and compare `price`, `area`, and `scrapedAt` over time.

#### Product availability research

Collect listings for model names, brands, collectibles, parts, or local-language product terms.

#### Regional marketplace analysis

Group exported rows by `area` to compare supply and asking prices across public locations.

#### Seller and category research

Use seller summaries, labels, and categories to understand how relevant listings are presented.

#### Alerts and workflows

Connect an Apify schedule, webhook, Make, Zapier, n8n, Google Sheets, or your own API consumer.

### Input recipes

**Quick sample**

```json
{"keywords":["iPhone 15"],"maxItems":10}
```

**Multiple Chinese keywords**

```json
{"keywords":["露营帐篷","公路自行车"],"maxItems":100}
```

**Bounded pagination**

```json
{
  "keywords": ["相机"],
  "maxItems": 60,
  "resultsPerPage": 30,
  "maxPagesPerKeyword": 3
}
```

### Pricing

This Actor uses pay-per-event pricing: a run-start event and a result-item event. Plan-specific rates and volume discounts can change, so see the live [Apify Pricing tab](https://apify.com/fetch_cat/goofish-xianyu-search-scraper/pricing) for current prices.

You are charged only for configured billable events. A small input is the safest way to estimate a recurring workflow before increasing `maxItems`.

### Tips and limits

- Use specific Chinese terms for the most relevant local results.
- Start with `maxItems` between 10 and 20 while testing a keyword.
- `maxItems` is capped at 1,500 per run.
- Public listings can change or disappear between runs.
- A broad keyword may produce less relevant rows than a model or category phrase.
- Optional fields depend on what Goofish exposes on each result.
- Results are deduplicated by listing identity across keywords and pages.
- Exported timestamps use ISO format for easier downstream processing.

### Export Goofish Xianyu search data

Export Goofish Xianyu search data as JSON, CSV, Excel, XML, RSS, or JSONL from an Apify dataset. You can also:

1. Schedule recurring runs in Apify Console.
2. Trigger the Actor from an application through the API.
3. Send run-finished webhooks to another service.
4. Connect datasets to Google Sheets or cloud storage.
5. Consume results from an AI agent through Apify MCP.

### API usage: Goofish Xianyu search API

Use the Goofish Xianyu search API workflow below to run keyword searches programmatically and retrieve the resulting dataset. Replace `$APIFY_TOKEN` with an Apify API token stored securely in your environment.

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~goofish-xianyu-search-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"keywords":["iPhone 15"],"maxItems":20}'
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/goofish-xianyu-search-scraper').call({
    keywords: ['iPhone 15'],
    maxItems: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/goofish-xianyu-search-scraper').call(run_input={
    'keywords': ['iPhone 15'],
    'maxItems': 20,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### MCP and AI agents

Use [Apify MCP](https://mcp.apify.com/?tools=fetch_cat/goofish-xianyu-search-scraper) to let Claude and other compatible agents run searches and consume structured results.

Add the hosted MCP server with the Claude CLI:

```bash
claude mcp add --transport http apify https://mcp.apify.com/?tools=fetch_cat/goofish-xianyu-search-scraper
```

Or add it to an MCP JSON configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=fetch_cat/goofish-xianyu-search-scraper"
    }
  }
}
```

Example prompts:

- “Search Xianyu for iPhone 15 listings and return the 20 lowest prices.”
- “Find public bicycle listings and group the results by area.”
- “Export current camera listings with seller and category fields.”

### FAQ

#### What data can I export with Goofish Xianyu Search Scraper?

You can export listing identifiers, URLs, titles, prices, locations, images, public seller summaries, demand counts, categories, labels, flags, and search provenance.

#### Can I run Goofish Xianyu Search Scraper through an API, schedule, or MCP client?

Yes. Use the API examples and MCP URL above, or create an Apify schedule for recurring searches.

#### Does it require my Goofish account?

No. It collects public search-result data without user credentials.

#### Can I search in English?

Yes. Chinese terms generally match more local listings, but both Chinese and English keyword strings are accepted.

#### Can I export CSV or Excel?

Yes. Open the run dataset and select JSON, CSV, Excel, XML, RSS, or another supported format.

#### Why is an optional field missing?

Goofish does not expose every attribute on every public search card. Missing optional values are omitted rather than guessed.

#### How do I control cost?

Begin with a small `maxItems`, inspect relevance, and then scale the input. See the live Pricing tab for current plan-specific rates.

#### Can I schedule monitoring?

Yes. Create an Apify schedule and use a webhook or integration to process each completed dataset.

#### Can an AI agent use it?

Yes. Use Apify MCP, or call the Actor through an agent tool that supports the Apify API.

#### Is this an official Goofish product?

No. This independent Actor exports publicly available marketplace search data. Follow applicable laws, platform terms, and data-protection requirements for your use case.

### Related actors

- [Amazon Products Search Scraper](https://apify.com/fetch_cat/amazon-products-search-scraper)
- [Etsy Scraper](https://apify.com/fetch_cat/etsy-scraper)
- [eBay Scraper](https://apify.com/fetch_cat/ebay-scraper)
- [AliExpress Scraper](https://apify.com/fetch_cat/aliexpress-scraper)
- [Walmart Scraper](https://apify.com/fetch_cat/walmart-scraper)

### Support

For a reproducible issue, open the Actor **Issues** tab and include:

- the run URL,
- the input used,
- the expected behavior,
- the observed behavior, and
- a small public keyword that reproduces the problem.

This context makes diagnosis faster while avoiding account credentials or private data.

# Actor input Schema

## `keywords` (type: `array`):

Chinese or English terms to search on Goofish.

## `maxItems` (type: `integer`):

Total number of unique listings to save across all keywords.

## `resultsPerPage` (type: `integer`):

Listings requested per search page.

## `maxPagesPerKeyword` (type: `integer`):

Pagination safety limit for each keyword.

## Actor input object example

```json
{
  "keywords": [
    "iPhone 15"
  ],
  "maxItems": 20,
  "resultsPerPage": 30,
  "maxPagesPerKeyword": 20
}
```

# Actor output Schema

## `overview` (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 = {
    "keywords": [
        "iPhone 15"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/goofish-xianyu-search-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 = { "keywords": ["iPhone 15"] }

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/goofish-xianyu-search-scraper").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 '{
  "keywords": [
    "iPhone 15"
  ]
}' |
apify call fetch_cat/goofish-xianyu-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fetch_cat/goofish-xianyu-search-scraper"
        }
    }
}

```

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/YLcsrxRnWKvfvrLIq/builds/IkJSircVCHItibRbN/openapi.json
