LIHKG Scraper – Hong Kong Forum Threads, Replies & Sentiment
Pricing
from $2.00 / 1,000 threads
LIHKG Scraper – Hong Kong Forum Threads, Replies & Sentiment
Scrape LIHKG (a major Hong Kong forum) threads and replies for social listening: title, author, reply count, reactions, content and timestamps. No API or login. Export JSON/CSV/Excel. Ideal for HK sentiment analysis and brand monitoring.
Pricing
from $2.00 / 1,000 threads
Rating
0.0
(0)
Developer
Chad
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
LIHKG Scraper (No API, No Login)
Scrape LIHKG (Hong Kong's largest online forum) — latest thread listings per category, and full thread content with all replies — via the public api_v2 JSON endpoint, output as structured data.
This actor is built for English-speaking researchers, analysts, and engineers who need Hong Kong forum sentiment / social listening data. Note: LIHKG itself is a Cantonese/Traditional-Chinese forum, so scraped title / content fields will be in Chinese — this tool structures and exports that data, it does not translate it.
Output Fields
Thread listing / thread content (ThreadRow)
| Field | Type | Description |
|---|---|---|
| thread_id | string | Thread ID |
| title | string | null | Thread title |
| content | string | null | Thread body (null in listing mode) |
| author | string | null | Author nickname |
| category | string | null | Category name |
| reply_count | number | null | Number of replies |
| like_count | number | null | Like count |
| dislike_count | number | null | Dislike ("question mark face") count |
| created_at | string | null | Post time (ISO 8601) |
| thread_url | string | Thread URL |
| source_mode | string | Scrape mode (thread-list / thread) |
| source_query | string | Query used (category ID or thread ID) |
| scraped_at | string | Scrape timestamp (ISO 8601) |
Replies (ReplyRow)
| Field | Type | Description |
|---|---|---|
| reply_id | string | null | Reply ID (post_id) |
| thread_id | string | Parent thread ID |
| floor | number | null | Floor number (msg_num) |
| author | string | null | Author nickname |
| content | string | null | Reply content (HTML tags stripped) |
| like_count | number | null | Like count |
| dislike_count | number | null | Dislike count |
| created_at | string | null | Reply time (ISO 8601) |
| scraped_at | string | Scrape timestamp (ISO 8601) |
Modes
| Mode | Input | Output | Billing |
|---|---|---|---|
| thread-list | catIds (category ID list) | Thread listing (ThreadRow) | $0.002/row |
| thread | threadIds / threadUrls | Thread content ($0.008/thread) + all replies ($0.003/reply) | by volume |
Input Fields
| Field | Type | Default | Description |
|---|---|---|---|
| mode | enum | thread-list | Mode: thread-list (listing) / thread (full thread) |
| catIds | array | — | Category IDs, e.g. 1 (Chat), 2 (Sports), 5 (Current Affairs) |
| threadIds | array | — | List of thread IDs |
| threadUrls | array | — | Thread URLs; the ID is extracted automatically |
| bulkInput | textarea | — | Bulk paste, one item per line, auto-merged into the matching field |
| maxItems | integer | 50 | Max items to scrape (listing: per category; thread: total threads) |
| keywords | array | — | Title keyword filter (listing mode only; leave empty for no filtering) |
| proxyConfiguration | proxy | no proxy | Enable Apify Proxy for heavy scraping |
Input Examples
Thread listing
{"mode": "thread-list","catIds": ["1", "5"],"maxItems": 100}
Full thread and replies
{"mode": "thread","threadIds": ["4126423"],"maxItems": 50}
Bulk thread URLs
{"mode": "thread","threadUrls": ["https://lihkg.com/thread/4126423/page/1","https://lihkg.com/thread/4000000/page/1"],"maxItems": 50}
Notes
- Only public content is scraped — no account or token required
- Uses the api_v2 JSON endpoint (no browser — fast and low-cost)
- Reply content has HTML tags automatically stripped (
<br>,<img>,<span>, etc.) - Thread mode:
maxItemslimits the number of threads; all replies within each thread are scraped without limit - Billed per event: one-time
actor-startfee of $0.005, $0.002 per listing row, $0.008 per thread, $0.003 per reply - Auto-stops after 5 consecutive pages with no new data — no idle burn
- LIHKG's api_v2 may add an
X-LI-DEVICEheader check or a challenge in the future, and may block datacenter IPs. This is monitored via smoke tests on Apify Cloud (go/no-go); if blocked, the fallback is Apify residential proxy (proxyConfiguration) — not over-engineered in advance
FAQ
Q: Do I need to log in to view this data?
A: No. This actor only scrapes public thread listings and replies — nothing that requires login.
Q: Can I scrape multiple categories at once?
A: Yes. Add multiple IDs to catIds, or paste them one per line via bulkInput.
Q: How is reply HTML handled?
A: Automatically. The content field is plain text — HTML tags are stripped and HTML entities are decoded (& → &, < → <, etc.).
Q: Why is content null in thread-list mode?
A: The listing API doesn't return thread body content, only titles and metadata. Use thread mode if you need the full text.
Disclaimer
This tool is for academic research and lawful business analysis only. Users must comply with LIHKG's Terms of Service and applicable laws. Do not use this tool to invade others' privacy, spread false information, or engage in any other unlawful activity. The author accepts no responsibility for any misuse.
LIHKG scraper, Hong Kong forum, HK social sentiment, LIHKG API, Hong Kong online discussion, forum thread scraper, HK opinion data