Tag Actions
tags — List All Tags
List all unique tags across all memos.
bash
$RUNTIME "$API_SCRIPT" tagsImplementation details:
- The Memos API v1 does not have a dedicated
/tagsendpoint - Instead, fetch memos with a large page size and extract tags from the response
- Calls
GET /api/v1/memos?pageSize=100 - Iterates through all memos, collecting unique tags from each memo's
tagsarray - If there are more than 100 memos, paginate through all pages using
nextPageToken
Algorithm:
- Initialize empty
Setfor tags - Fetch first page of memos (pageSize=100)
- Collect all tags into the set
- If
nextPageTokenexists, fetch next page - Repeat until no more pages
- Display all unique tags sorted alphabetically
Display format:
🏷️ Tags (共 12 个)
━━━━━━━━━━━━━━━━━━━━━━━
ai (2)
deepseek (1)
iptv (1)
mock (1)
audio (1)
录音 (1)
影视资源 (1)
pve (1)
...
━━━━━━━━━━━━━━━━━━━━━━━
括号内为该标签下的 memo 数量Note: Tag counts are approximate when there are many memos, since the API may paginate.