This project is a SvelteKit frontend for exporting historical YouTube performance data as CSV. It fetches the history for a YouTube channel or video, visualizes the selected metrics, and lets you download or copy the transformed dataset.
The app currently supports the vidiq source and works with two resource types:
channelexports channel history such as subscribers, views, and video countsvideoexports video history such as views, likes, and comments
- Requests export data from
GET /api/:site/:type/:id - Displays the returned time-series data in charts
- Builds CSV exports from the fetched snapshots
- Supports multiple export granularities:
all,hourly,daily,weekly, andmonthly - Can transpose CSV output so metrics become rows instead of columns
- Can interpolate missing periods when generating aggregated exports
The response contract for the upstream export API is documented in API_RESPONSE.md.
Install dependencies:
pnpm installStart the dev server:
PUBLIC_API_BASE_URL=https://your-api-host.example.com pnpm devOpen the app and provide:
- a source, currently
vidiq - a resource type:
channelorvideo - the target YouTube channel ID or video ID
PUBLIC_API_BASE_URL must point to the upstream host that serves /api/:site/:type/:id.
pnpm dev
pnpm build
pnpm preview
pnpm check
pnpm lint
pnpm formatCreate a production build with:
pnpm buildPreview the production output locally with:
pnpm preview