mvanhorn/last30days-skill · error · ValueError
Missing Xiaohongshu API base URL
Error message
Missing Xiaohongshu API base URL
What it means
Error "Missing Xiaohongshu API base URL" thrown in mvanhorn/last30days-skill.
Source
Thrown at skills/last30days/scripts/lib/xiaohongshu_api.py:77
def _build_note_url(feed_id: str, xsec_token: str) -> str:
"""Build a stable Xiaohongshu note URL."""
if xsec_token:
return f"https://www.xiaohongshu.com/explore/{feed_id}?xsec_token={xsec_token}"
return f"https://www.xiaohongshu.com/explore/{feed_id}"
def search_feeds(
topic: str,
from_date: str,
to_date: str,
base_url: str,
depth: str = "default",
) -> List[Dict[str, Any]]:
"""Search Xiaohongshu feeds and normalize to web-item shape."""
base = (base_url or "").rstrip("/")
if not base:
raise ValueError("Missing Xiaohongshu API base URL")
# Quick login sanity check.
login = http.get(f"{base}/api/v1/login/status", timeout=8, retries=1)
is_logged_in = (
login.get("data", {}).get("is_logged_in")
if isinstance(login, dict) else False
)
if not is_logged_in:
raise http.HTTPError("Xiaohongshu API reachable but not logged in")
# API supports filters; use recency-oriented defaults.
publish_time = "一天内" if depth == "quick" else "一周内" if depth == "default" else "半年内"
payload = {
"keyword": topic,
"filters": {
"sort_by": "综合",
"note_type": "不限",
"publish_time": publish_time,View on GitHub (pinned to c7460f6114)
Solutions
- Configure the Xiaohongshu API base URL (XIAOHONGSHU_BASE_URL / the skill's base_url setting) to point at your running Xiaohongshu API instance.
- If you do not intend to use the Xiaohongshu source, exclude it from the run (--sources without xiaohongshu or INCLUDE_SOURCES without it).
When it happens
Trigger: Fires when the Xiaohongshu source is enabled but its API base URL is not configured. Occurs when the required environment variable/config entry for the Xiaohongshu API endpoint is missing or empty before the client makes its first request.
Common situations: See trigger scenarios.
AI-assisted analysis of mvanhorn/last30days-skill@c7460f6114 (2026-08-15).
Data as JSON: /api/errors/c32117c9a9e193ea.
Report an issue: GitHub.