Goofish (Xianyu) Search Scraper
Pricing
Pay per usage
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
21 days ago
Last modified
Categories
Features
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)
- Open the Actor in Apify Console.
- Set
keyword(e.g.iphone,sneakers,camera). - Optionally set
maxItems(default 100) andmaxPages(default 3). - 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:
- Local development:
python -m src.login, then scanoutput/login-qr.pngwith the Xianyu app. The session is saved tosecrets/goofish-session.json. - Apify input:
cookieHeaderfor one session orcookieHeadersfor your own session pool. - 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-goofishsource ~/.venvs/actor/bin/activatepython -m src.login # scan the QR and confirm on your phonepython -m unittest discover -s tests -vpython -m src.mainapify 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,conditionandwantCountare read from the card markup;wantCountcan 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/publishTimeare 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
LoginRequiredErrorinstead of silently returning an empty Dataset. - Scroll-based loading of subsequent search batches, capped by
maxPagesandmaxItems. - Optional Apify proxy configuration.
- No request-signature forgery: requests originate from the loaded Goofish page.
Demo screenshots
| Input configuration | Live dataset output |
|---|---|
![]() | ![]() |
| Card grid | MCP / agent call |
|---|---|
![]() | ![]() |
Cost & pricing reference
Measured on Apify cloud (FREE plan, ACTOR_COMPUTE_UNITS = $0.20/CU):
| Run profile | CU/run | Cost/run | Cost/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.



