Why hidden YouTube subscriber counts are not zeros

Six fields are guaranteed on a YouTube channel record and none of them is a number. subscriberCount, videosCount, description, keywords, tags and availableCountries are all marked conditional, because creators can hide them. Treat a missing count as hidden, never as zero.

Cover card reading "Why hidden YouTube subscriber counts are not zeros"

The split is not where you would put it

If you were designing this API you would probably guarantee the metrics and make the free text optional. The actual guarantee runs the other way:

Always present: id, name, url, isVerified, isFamilySafe, thumbnails.

Sometimes present: subscriberCount, videosCount, description, keywords, tags, availableCountries.

Every number is in the second list. So a run always answers “does this channel exist and is it verified”, and only usually answers “how big is it”.

The listing gives the reason for the important one plainly: hidden on some channels. YouTube lets a creator hide their subscriber count, and when they do there is nothing to return.

Absent is not zero, and it is not an error

Three things follow, and all three are places pipelines go wrong.

It is not a failure. The record came back, it describes a real channel, and it was billed at the normal rate. Nothing went wrong.

It is not worth retrying. The data is absent at the source. A retry buys another query fee and the same empty field.

It is not zero. This is the one that corrupts analysis. A channel with a hidden count is not a channel with no subscribers, and averaging it in as zero drags every aggregate down while looking perfectly valid.

def subs(channel):
    """None means hidden. It does not mean none."""
    raw = channel.get("subscriberCount")
    if not raw:
        return None                       # not 0
    m = re.match(r"([\d.]+)([KMB]?)", raw.strip())
    mult = {"K": 1_000, "M": 1_000_000, "B": 1_000_000_000}.get(m.group(2), 1)
    return int(float(m.group(1)) * mult)

known = [c for c in rows if subs(c) is not None]
print(f"{len(rows) - len(known)} of {len(rows)} channels hide their count")

Report the coverage. A shortlist built from a hundred channels where thirty hide their size is a different object from one where all hundred publish it, and the person reading your output should know which they have.

The string problem arrives too

When the count is present it is a string with the noun attached: "244M subscribers", and videosCount as "780 videos". Both need the word stripped and the abbreviation expanded before they can be compared, and both are approximate once expanded.

So the honest pipeline has three states per channel rather than two: published and parsed, published and unparseable, and hidden. Collapsing those into one nullable integer throws away the distinction that matters.

What to filter on instead

Since identity is guaranteed and metrics are not, build the first pass on what is always there. isVerified is a boolean and always present. So is isFamilySafe. Those will not tell you how big a channel is, but they will narrow a keyword search’s forty results without depending on a field that may not arrive.

Then fetch metrics for the survivors, and treat the ones that come back empty as a known unknown rather than a small number.

Questions people ask

Does YouTube Channel Scraper always return a subscriber count?

No. The field availability table marks subscriberCount as sometimes present and notes it is hidden on some channels, because YouTube lets creators hide the figure. Only id, name, url, isVerified, isFamilySafe and thumbnails are guaranteed.

Should I retry a channel that came back without metrics?

No. It is a successful result and it was billed. The data is absent at the source, so a retry spends another query fee asking a question YouTube will not answer.

Is subscriberCount a number?

No, it is a string carrying its own unit: "244M subscribers". videosCount is the same, arriving as "780 videos". Strip the noun and expand the abbreviation before comparing, and keep the original.

Sources

  1. YouTube Channel Scraper, field availability guaranteesapify.com