A YouTube channel lookup comes back with "channel not found", or the numbers clearly belong to another channel? Here are the causes and how to reliably query the right channel.
HTTP 404: channel not found
If FlowData can't determine the channel, the API answers with HTTP 404. The error text is in German at the moment and means "channel not found":
{"success":false,"error":"Kanal nicht gefunden"}
In the Log under Areas › YouTube you can see which identifier was used. Set the filter to Failed and click the eye icon.
Typical causes:
- A typo in the handle. Compare the spelling with the channel's address on YouTube, the part after
youtube.com/. - The channel no longer exists or was blocked by YouTube.
- An incomplete channel ID. A channel ID always starts with
UCand is exactly 24 characters long. FlowData treats anything else as a handle.
The error field can also contain a text starting with YouTube API Fehler, a YouTube API error. In that case YouTube rejected the lookup or was unreachable at that moment. Try again a little later. Other technical texts in this field also mean that the lookup didn't get through to YouTube. Responses with 404 aren't billed.
The numbers belong to another channel
If a handle can't be matched exactly, FlowData searches for a channel with that name and takes the first result. With a typo or a very generic name, that can be a similarly named but wrong channel.
To check:
- Compare
data.titleanddata.handlein the response with the channel you meant. - If something doesn't match, query with the channel ID instead. It's unique, so a mix-up is impossible.
- It's best to store the
channel_idfrom the first correct response in your application and use only that for all further lookups.
How to find the channel ID
- If the channel's address contains
youtube.com/channel/UC..., the part starting withUCis the channel ID. - Otherwise, open the channel on YouTube, open the channel info and choose Share channel and then Copy channel ID.
- Or look it up once with the handle and take the
channel_idfrom the response, after checking the title and handle.
HTTP 500
If an unexpected error occurs, the API answers with HTTP 500:
{"success":false,"error":"Internal server error while fetching YouTube statistics"}
That isn't caused by your request and isn't billed. Wait a moment and try again. If the error persists, contact support and mention the channel and the time.
404 even though the lookup worked yesterday
A channel's numbers are stored for 24 hours. After that, FlowData asks YouTube again. If exactly this refresh fails, you get a 404, even if older numbers exist. Trying again a little later usually helps.
Good to know
- How the lookup works and what the fields mean is explained in How do I fetch the statistics of a YouTube channel?.