FlowData

How do I fetch the statistics of a YouTube channel?

Published on 10. November 2026

The YouTube area returns the public key figures of a YouTube channel: subscribers, number of videos and total views, plus title, description and thumbnail. That works well for a dashboard of your own channels, for client reports or for assessing creators for a collaboration.

The request

The lookup is a GET to https://api.flowdata.one/v1/youtube/stats/ with the channel identifier at the end:

curl "https://api.flowdata.one/v1/youtube/stats/@YouTube" \
  -H "Authorization: Bearer fd_YOUR_KEY"

Two forms of identifier work:

  • Handle, with or without @, for example @YouTube or YouTube.
  • Channel ID, which starts with UC and is 24 characters long, for example UC7hD4tWk2nQmL9xRb3sYp0E.

The channel ID is unique and therefore the safest choice. YouTube reports "channel not found" or returns a different channel: what can I do? shows where to find it.

The response

{
  "success": true,
  "cached": true,
  "data": {
    "id": 412,
    "channel_id": "UC7hD4tWk2nQmL9xRb3sYp0E",
    "handle": "@example-channel",
    "title": "Example Channel",
    "description": "Tutorials about data quality and automation for small online stores.",
    "subscriber_count": 4820,
    "video_count": 137,
    "view_count": 612904,
    "thumbnail_url": "https://yt3.example.com/example-channel-avatar.jpg",
    "last_synced_at": "2026-11-05T08:14:22.000000Z",
    "created_at": "2026-10-12T09:03:51.000000Z",
    "updated_at": "2026-11-05T08:14:22.000000Z"
  }
}

The channel in the example is made up. How to read the fields in data:

  • channel_id: the unique channel ID.
  • handle: the channel's handle as reported by YouTube.
  • title, description: the channel's name and description.
  • subscriber_count: number of subscribers.
  • video_count: number of public videos.
  • view_count: views across all videos.
  • thumbnail_url: URL of the channel image.
  • last_synced_at: when the numbers were last fetched from YouTube.
  • id, created_at, updated_at: internal details of the stored record that you can ignore.

How current are the numbers?

FlowData stores each channel's numbers after a lookup. If you ask for the same channel again within 24 hours, you get the stored numbers and cached is true. If the stored numbers are older than 24 hours or FlowData doesn't know the channel yet, they are fetched fresh from YouTube and cached is false.

So the numbers can be up to a day old, and last_synced_at shows exactly how old. For daily reports, one lookup per channel per day is plenty.

The first lookup of a new channel takes noticeably longer than a stored one, so set a generous timeout for your request.

Why is subscriber_count 0?

Channel owners can hide their subscriber count on YouTube. YouTube then doesn't give out a number and FlowData reports 0. For small or new channels, 0 can of course also be right.

Are there statistics for individual videos too?

No. The YouTube area only returns the key figures of whole channels. Views, likes or comments of individual videos aren't available through it.

What does a lookup cost?

Lookups are billed per 1,000 successful requests, even if the response comes from storage with cached: true. A 404 for a channel that wasn't found and server errors are free. The amounts are on the pricing page, and the prices that apply to your team are in the dashboard under Billing. If your balance is too low, the API answers with HTTP 402. See Understanding FlowData prices for details.

Good to know

  • Every lookup appears in the Log under Areas › YouTube. Failed lookups show up there with status 404 or 500.
  • Encode the identifier for the URL if it contains special characters. The @ can be written as %40.
  • The full reference is in the API documentation.

Was this article helpful?

Back to YouTube