Measuring a YouTube course's real length
YouTube Playlist Scraper guarantees duration as a number in seconds and includes the first hundred videos in its $0.05 query fee, so any course playlist of a hundred videos or fewer can be measured end to end for a nickel. Filter livestreams and private entries first or the total lies.

The question nobody can answer from the page
“How long is this course?” is the first thing anyone evaluating training content wants to know, and YouTube does not tell you. It shows a video count. Forty videos could be three hours or thirty.
The playlist scraper does tell you, because duration is typed as a number
in seconds and marked always present. No parsing, no ISO 8601 duration
string, no abbreviation. Sum the column.
run = client.actor("apidojo/youtube-playlist-scraper").call(run_input={
"startUrls": [f"https://www.youtube.com/playlist?list={playlist_id}"],
"maxItems": 100,
})
videos = list(client.dataset(run.default_dataset_id).iterate_items())
hours = sum(v["duration"] for v in videos) / 3600
print(f"{len(videos)} videos, {hours:.1f} hours")
Two filters before the sum means anything
A raw sum is usually wrong, for two reasons that are both visible in the output.
Livestreams. isLive is in the record. A single eight-hour stream parked
in a course playlist adds more running time than the rest of the curriculum
combined, and it is not something anybody is going to watch as a lesson.
Private and deleted entries. isPrivate appears in the sample. Entries
get removed after a playlist is built and still come back as rows, billed
like any other. They contribute nothing to the course and, worse, their
presence means the video count overstates what you can actually watch.
watchable = [v for v in videos if not v["isLive"] and not v.get("isPrivate")]
print(f"{len(watchable)} of {len(videos)} usable, "
f"{sum(v['duration'] for v in watchable)/3600:.1f} hours")
The gap between those two counts is itself a finding. A course with nine dead entries out of forty is a course nobody has maintained.
Why a nickel covers it
The pricing makes this job almost free. A playlist query is $0.05 and carries the first hundred videos, and most real courses are well under a hundred videos. So the per-video rate never applies at all: an album, a conference track, a module, a series, all come back complete for five cents.
That changes what is worth doing. Auditing one playlist is cheap enough to be worth doing casually. Auditing a shelf of twenty, to decide which training library to buy, costs a dollar and answers a procurement question that would otherwise be guesswork.
The allowance is per playlist rather than per run, so twenty playlists carry twenty allowances. Breadth is the cheap direction here, exactly as it is on the location and hashtag actors.
The number worth reporting
Not the video count, which YouTube already shows and which overstates. Report watchable hours, the count of dead entries, and the longest single item. Those three together describe a curriculum in a way the platform’s own page does not, and they cost five cents to produce.
Questions people ask
How much does it cost to measure a YouTube playlist?
$0.05 for the playlist query, which includes the first hundred videos, then $0.0005 each after that. A course of a hundred videos or fewer costs exactly a nickel however long the videos are.
Is playlist duration reliable?
The availability table types duration as a number and marks it always present, so no parsing is needed. What is unreliable is summing it blindly: playlists carry livestreams and private entries, and both distort a running time.
Why does a playlist contain videos I cannot watch?
Entries get made private or deleted after the playlist is built, and they still appear in the output with isPrivate set. They are billed like any other row, so filter after the run rather than expecting the actor to skip them.