Get captured media URLs (Spotify tracks, YouTube videos)
get_media_linksRetrieve Spotify track URIs and YouTube watch URLs of media you played, with time data. Filter by period, device, or search term.
Instructions
Lists canonical deep-links Vetroscope captured for media the user actually played — Spotify spotify:track:… URIs and YouTube https://www.youtube.com/watch?v=… URLs. Each row carries the matching time data so you can answer 'what YouTube videos did I rewatch this week + give me the link to the top one?' or 'send me a Spotify URI for the song I played the most yesterday'. Each row also includes a webUrl HTTPS variant — https://open.spotify.com/track/<id> for Spotify (which hands off to the desktop app when installed), same as url for YouTube — so a clickable link survives any markdown / chat renderer that strips custom URI schemes. Requires Vetroscope ≥ 0.2.30 with the capture_media_links setting enabled — available: false is returned on older installs or when nothing has been captured. With period set, the same dashboard filter stack as get_report applies and totals match Charts; without period, time columns are lifetime totals. URLs are filtered strictly at capture time (YouTube /watch only; track URIs only — no ads, no shorts, no channel pages) so anything returned here is safe to open directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Restrict to one kind. Omit to return both. | |
| period | No | today | yesterday | week | month | year | a single date YYYY-MM-DD | an inclusive date range YYYY-MM-DD..YYYY-MM-DD. Omit for lifetime totals. | |
| search | No | Case-insensitive substring match against project, sub-project, or app name. Useful for 'find the Beyoncé track' style lookups. | |
| limit | No | Max links returned (default 100). Sorted by total time within the period desc. | |
| hour_start | No | Inclusive start hour 0-24 in local time. Combine with hour_end (e.g. 9 and 17 = 9am to 4:59pm). Omit both for no hour filter. | |
| hour_end | No | Exclusive end hour 0-24 in local time. Combine with hour_start. | |
| weekdays | No | Restrict to specific weekdays. 0=Sunday, 1=Monday, …, 6=Saturday. Omit or pass [0,1,2,3,4,5,6] for no weekday filter. | |
| device | No | Restrict to a single device. Pass 'current' (or 'this') for the local machine, a device UUID from get_device_breakdown, or a platform name like 'darwin', 'win32', 'browser-extension'. Omit or pass 'all' for no device filter. |