Xiaohongshu Data Extractor

Internal Tool · Chrome Extension for marketing team · 2024 - 2026

Impact

~5 hrs/day
Manual data collection eliminated (20+ clients x 15 min each, across 3-4 team members)
A few clicks
Client-ready PDF report (was 30+ min manual analysis per client)
Zero data gaps
Scheduled collection replaced manual daily recording (including weekends)

Problem

The marketing team managed 20+ Xiaohongshu (Little Red Book) creator accounts for clients, split across 3-4 people. Xiaohongshu has no public API and no data export feature. The Creator Center dashboard only shows yesterday's data after a fixed daily update time, and the data had to be copied out manually, field by field, into spreadsheets. At ~15 minutes per client, this added up to ~5 hours of daily data collection across the team, including weekends. Copy-paste errors were common, and team members sometimes forgot to collect data on busy days, leaving gaps in client reporting.

I noticed the team struggling with this and discovered that the web requests behind the dashboard contained complete, structured data. That became the basis for the tool. Part of my role was optimizing internal workflows, so even when busy with other projects, I made time to build and iterate on this.

XHS Data Extractor Chrome Extension popup UI showing data collection interface Followers Portrait visualization with gender, age, interest, and source distribution charts

Key Decisions

Architecture

Chrome Extension (Manifest V3) | |-- Background Service Worker | Scheduler: Chrome Alarms API (daily auto-collection) | Notifications: collection status, failures | |-- API Fetcher (active fetch + declarativeNetRequest for referer) | Directly calls XHS Creator Center API endpoints | 5 endpoints: overview, fans growth, fans portrait, | fans source, pro notes list (top 100) | |-- Data Processor | Normalizes response formats across endpoints | Stores in chrome.storage.local (per-account isolation) | |-- Popup UI | Account management (add/switch/remove) | Manual collection trigger | Collection history with source labels | |-- Visualization Page | Chart.js v4: 11 interactive charts | Monthly analysis with trend comparison | PDF export for client reports | |-- CSV Generator | UTF-8 BOM encoding (Excel compatibility) | 12 columns, auto-named by date/time

Transferable Pattern

Extracting structured data from platforms without APIs. Applicable to any marketplace or social platform where the brand operates: Shopify analytics, TikTok Shop, Lazada seller center, or any internal dashboard that lacks export functionality.

Tech Stack

JavaScript Chrome Extension (MV3) Chart.js v4 Golang (original CLI)