Goofish (Xianyu) Search Scraper avatar

Goofish (Xianyu) Search Scraper

Pricing

Pay per usage

Go to Apify Store
Goofish (Xianyu) Search Scraper

Goofish (Xianyu) Search Scraper

Collect public second-hand product listings from Goofish search using a user-provided authenticated session.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

lixiaolong

lixiaolong

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 days ago

Last modified

Categories

Features

Limited permissions

Share

Browser-assisted Actor that collects public second-hand product listings from Goofish search. Camoufox handles browser fingerprints; the page itself creates signed mtop requests. The Actor extracts product cards from the rendered DOM and writes normalized records to the default Dataset.

On the Apify cloud the Actor runs anonymously: the container environment (limited permissions, disable_browser_sandbox auto-enabled) passes the fingerprint wall and the search API accepts the request without a logged-in session, returning real public listings. This is the primary selling point — no cookies, no accounts, no session setup.

Quick start (Apify cloud)

  1. Open the Actor in Apify Console.
  2. Set keyword (e.g. iphone, sneakers, camera).
  3. Optionally set maxItems (default 100) and maxPages (default 3).
  4. Start run. Results land in the default Dataset.

MCP / AI agent usage

The Actor is available to AI agents through the Apify MCP server and Apify AGI (agentic payments via x402 / MPP):

{
"tool": "callActor",
"actor": "ready_ruler/xianyu-goofish-search",
"input": { "keyword": "iphone", "maxItems": 100 }
}

Authentication requirement (local development only)

On a local machine (no Apify container) Goofish search is not reliably anonymous — the API can return RGV587_ERROR with a mini_login URL even after the fingerprint check passes. Use your own logged-in session through one of these inputs:

  1. Local development: python -m src.login, then scan output/login-qr.png with the Xianyu app. The session is saved to secrets/goofish-session.json.
  2. Apify input: cookieHeader for one session or cookieHeaders for your own session pool.
  3. Apify input: storageState, the JSON object generated by the QR login command.

Do not put credentials in source files. secrets/, output/ and storage/ are ignored by git.

Local setup on this machine

cd /srv/samba/share/deepseek-harees/actors/xianyu-goofish
source ~/.venvs/actor/bin/activate
python -m src.login # scan the QR and confirm on your phone
python -m unittest discover -s tests -v
python -m src.main
apify run --input-file /tmp/d3-input.json # Simulated Apify env, EXIT:0

Default local input is read from storage/key_value_stores/default/INPUT.json. Output is written to storage/datasets/default/, and the run summary to storage/key_value_stores/default/SUMMARY (Apify SDK 4 local storage does not append .json to values created with set_value). Raw first responses for parser debugging are saved under output/search-attempt-*.json.

Input example

{
"keyword": "iphone",
"maxPages": 3,
"maxItems": 100,
"requestDelaySecs": 3
}

Output fields

itemId, title, price, sellerNick, location, images, publishTime, itemUrl, soldFlag, status, wantCount, and keyword.

Note: the Goofish mtop search endpoint only returns page chrome (bucketId, trackParams, etc.). The actual product cards are client-rendered, so the Actor extracts them from the rendered DOM. sellerNick, condition and wantCount are read from the card markup; wantCount can be empty for a small fraction of cards that do not display a "人想要" badge (e.g. brand-new items whose card omits the badge). location/publishTime are populated only by the dedicated item-detail endpoint, not by search.

The source mtop schema can change. The parser accepts both direct item records and itemDO wrappers and deduplicates records by item ID.

Run behavior

  • Up to three fresh browser attempts for token/session failures.
  • Explicit LoginRequiredError instead of silently returning an empty Dataset.
  • Scroll-based loading of subsequent search batches, capped by maxPages and maxItems.
  • Optional Apify proxy configuration.
  • No request-signature forgery: requests originate from the loaded Goofish page.

Demo screenshots

Input configurationLive dataset output
InputDataset
Card gridMCP / agent call
CardsMCP

Cost & pricing reference

Measured on Apify cloud (FREE plan, ACTOR_COMPUTE_UNITS = $0.20/CU):

Run profileCU/runCost/runCost/1k items
60 items (~69s)0.0769~$0.0154~$0.256
100 items (~45s)0.0498~$0.0100~$0.100

Pricing model options (gross before Apify's 20% cut):

  • Pay-per-event per 1,000 items: $0.3–$1.0. At 100 items/run, $0.3/1k gives ~141% margin, $0.5/1k ~302%, $1.0/1k ~703%.
  • Flat per-run: $0.02–$0.03/run (60–140% margin at 100 items/run).

Only use sessions and accounts you own, and use the resulting public listing data in accordance with the site's terms and applicable data rules.