Xueqiu Scraper avatar

Xueqiu Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Xueqiu Scraper

Xueqiu Scraper

Scrape Xueqiu (xueqiu.com) - China's largest investor community. Hot stocks, real-time quotes + K-line history via the v5 API, and stock/discussion search - after a browser warm-up that clears Xueqiu's JS challenge. No login required.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

7 days ago

Last modified

Share

Scrape Xueqiu (xueqiu.com) — China's largest investor community. Hot stocks by popularity, real-time quotes + daily K-line history via the public v5 API, and keyword search across stocks and community discussions. A real browser warms up first to clear Xueqiu's JS challenge — no login required.

What this actor does

  • Three modes: hotStocks (default), byStock, search
  • Hot stocksstock.xueqiu.com/v5/stock/hot_stock/list.json (全球 / 沪深 / 港股 / 美股 tabs) with rank, popularity score, rank movement, price, change %
  • Quotesv5/stock/quote.json with 30+ fields: price, change %, open/high/low, volume, amount, turnover rate, volume ratio, PE (TTM/LYR/forecast), PB, EPS, dividend yield, 52-week highs/lows, market caps, limit up/down
  • K-line historyv5/stock/chart/kline.json, candles (day/week/month) with date, open/high/low/close, volume
  • Search — the /k?q= page: stock table (name/code/price/change %/volume/market cap) + community discussions (author, title, content preview, likes/comments/shares, post URL)
  • Warm-up: navigates the homepage in Chromium so the WAF JS challenge sets the xq_a_token cookies, then reuses the session for the APIs — no captcha solving, no login
  • Typed error records for invalid symbols
  • Empty fields are omitted (strip_nulls before every push)

Output fields

Stock records (recordType: "stock"): symbol, stockCode, stockName, price, change, changePct, open, high, low, prevClose, volume, amount, turnoverRate, volumeRatio, marketCap, floatMarketCap, peTtm, peLyr, peForecast, pbRatio, eps, dividendYield, avgPrice, amplitude, ytdChangePct, high52w, low52w, limitUp, limitDown, lotSize, totalShares, floatShares, updateTime, currency, exchange, securityStatus, issueDate, delayed, navps, tickSize, pledgeRatio, priceExtended, timestampExtended, volumeExtended, amountExtended (quote details), hotRank (hot lists — the item's position in the board), popularityScore, scoreChange, rankChange (hot lists), industry (search matches), sourceUrl

K-line records (recordType: "kline"): klineDate, open, high, low, close, volume, plus symbol, stockCode, stockName, sourceUrl

Discussion records (recordType: "discussion"): author, publishTime, postSource, postTitle (omitted for title-less posts), postContent, likesCount, commentsCount, sharesCount, postUrl, sourceUrl

Error records (recordType: "error"): input, message

All data records carry recordType, scrapedAt, sourceUrl; error records are diagnostics (input, message) without a sourceUrl.

Input

FieldTypeDefaultDescription
modeselecthotStockshotStocks / byStock / search
hotListTypeselect1010 全球 hot, 12 沪深 hot, 13 港股 hot, 11 美股 hot
stockSymbolsarray["SH600519"]SH600519, SZ000001, 600519, 1.600519
includeKlinebooltrueEmit K-line candles with quotes
klineDaysint (1–500)60Candles per stock
klinePeriodselectdayday / week / month candle granularity
searchQuerytext茅台Search keyword
minPrice / maxPricenumber (0–100000)Price filter
minChangePct / maxChangePctnumber (−100–100)Change % filter
containsKeywordtextSubstring on stock name / post title / author / content
maxItemsint (1–500)50Hard cap

Examples

{ "mode": "hotStocks", "hotListType": "10", "maxItems": 20 }
{ "mode": "byStock", "stockSymbols": ["600519", "SZ000001", "1.300750"], "includeKline": true, "klineDays": 30 }
{ "mode": "search", "searchQuery": "比亚迪", "maxItems": 30 }

Data source

Xueqiu's public v5 JSON APIs (stock.xueqiu.com/v5/...) plus the server-rendered /k search page. The APIs reject cookie-less requests with 400016 and the quote pages show a slider captcha to plain clients, so the actor performs a browser warm-up on the homepage first — this satisfies the JS challenge and sets the xq_a_token cookies with zero user interaction. After warm-up, byStock and hotStocks need no further browsing (fast API-only mode).

Limitations

  • User profile pages (/u/<id>) were historically captcha-gated; Cycle-2 QA re-verified this on Apify cloud (2026-08-05): the slider captcha no longer fires after the homepage warm-up — profile pages render normally. However the user timeline API (/statuses/original/timeline.json) still returns non-200 without a login, and the profile DOM needs field-level mapping, so a byUser mode is not yet exposed. The diagnostic _probeByUser input (see input schema) reports captcha/render/timeline state on demand. Documented as in-progress.
  • The /S/<symbol> quote page itself shows a slider captcha to fresh sessions; quotes are instead fetched from the v5 API, which works with the warm-up cookies.
  • Search results are capped at the first page (the 综合 tab: top stock match + discussion stream).
  • On some datacenter IPs the rendered search page omits the A-share stock table (geo-variant markup shows only HK/ADR rows); the actor then falls back to the query/v1/search/web/stock.json API through the warm-up session to recover the A-share match (symbol, name, price, change %, industry). Verified working from Apify cloud on 2026-08-05.
  • The stock screener (v5/stock/screener/quote/list.json) and financial statements (v5/stock/finance/*) work with the same warm-up cookies but are not yet exposed as modes — noted as a future expansion axis.
  • Xueqiu data is CN-market only; symbols use SH/SZ/BJ prefixes.

Use cases

  • A-share hot-stock monitoring (daily sentiment)
  • Quote snapshots + historical series for research
  • Community sentiment tracking via discussion search
  • CN investor-community content pipelines

FAQ

Why does it need a browser? Xueqiu's WAF serves a JS challenge (and slider captchas on some pages) to plain HTTP clients. The actor launches headless Chromium, lets the challenge resolve on the homepage, then uses the browser session's cookies for the APIs. This works fully automatically — no captcha solving service, no login.

What do likesCount/commentsCount mean? The discussion cards show 赞/评论/转发 counts — mapped to likes, comments and shares respectively.

What is a symbol? Xueqiu's market-qualified code: SH600519 (Shanghai), SZ000001 (Shenzhen), BJ... (Beijing). The actor normalizes bare codes and market.code forms automatically.