Quickstart
Three steps: resolve a channel, pull its clippable moments, and price a clip from real views and niche CPM. Everything here runs against the live resolve endpoint. No key required to start.
01Resolve the channel
Point url at any channel. This one call reads the channel live from YouTube and hands back its identity, stats, and a recent-uploads sample.
curl -s "https://liquidclips.app/api/resolve?url=@veritasium" | jq '.channel, .videoCount'02Pull the moments
The clippable moments are the long-form uploads (8 minutes and up), richest first. Each long upload yields six or more clips, so this list is your raw material.
const res = await fetch(
"https://liquidclips.app/api/resolve?url=@veritasium"
);
const { videos } = await res.json();
// the clippable moments = long-form uploads, richest first
const moments = videos
.filter((v) => v.durationSec >= 8 * 60)
.sort((a, b) => b.views - a.views);
console.log(`${moments.length} clippable uploads`);03Price a clip
A clip is worth expected views times the niche CPM. The CPM ranges are on the CPM by niche data page, US estimate, per 1,000 views.
// clip value = expected views x niche CPM (per 1,000)
const CPM = { finance: 5, business: 4, tech: 3, gaming: 2.5, comedy: 1.5 };
function clipValue(medianViews, niche) {
const cpm = CPM[niche] ?? 2; // blended fallback
return (medianViews / 1000) * cpm;
}
// a tech channel whose clips do 40k views:
clipValue(40000, "tech"); // => 120 (USD, estimate)Clip value = expected views x niche CPM. Resolve gives you the views, the CPM table gives you the rate. Every valuation on LiquidClips falls out of this one line. Read the full logic in CPM, explained.
