YOUTUBE API

Channel Details

Retrieve channel details from YouTube with a single API request.

GET/api/data/v1/youtube/channel
1credit base costZero-credit cache supported

Request parameters

Up to 1 credit

YouTube channel ID. Can pass a channelId, handle or url

YouTube channel handle. Can pass a channelId, handle or url

YouTube channel URL. Can pass a channelId, handle or url

If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Caching page for details.]

Try in the console

Live requests use your prepaid balance. Cached responses cost zero where supported.

curl --request GET \
  --url 'https://fetchgoblin.com/api/data/v1/youtube/channel?handle=ThePatMcAfeeShow' \
  --header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'

Response

Example
{
  "success": true,
  "credits_charged": 1,
  "channelId": "UCxcTeAKWJca6XyJ37_ZoKIQ",
  "channel": "http://www.youtube.com/@ThePatMcAfeeShow",
  "name": "The Pat McAfee Show",
  "avatar": {
    "image": {
      "sources": [
        {
          "url": "https://yt3.googleusercontent.com/ytc/AIdro_nBgMGIxgHehCAlUUepEhd9Yooi1I55k6IF2WExl-v8Q-c=s72-c-k-c0x00ffffff-no-rj",
          "width": 72,
          "height": 72
        }
      ],
      "processor": {
        "borderImageProcessor": {
          "circular": true
        }
      }
    },
    "avatarImageSize": "AVATAR_SIZE_XL",
    "loggingDirectives": {
      "trackingParams": "CC0Q6OENIhMIkInyhaSPiwMV9wfWAB3aoR9h",
      "visibility": {
        "types": "12"
      }
    }
  },
  "description": "",
  "subscriberCount": 2750000,
  "subscriberCountText": "2.75M subscribers",
  "videoCountText": "9,221 videos",
  "viewCountText": "2,170,355,382 views",
  "joinedDateText": "Joined Aug 23, 2017",
  "tags": "pat mcafee, football, pat mcafee show, the pat mcafee show, pat mcafee podcast, pat mcafee clips, pat mcafee reacts, pat mcafee highlights, pat mcafee live, pat mcafee show live, pat mcafee podcast, nfl, nba, nhl, mlb, ufc, sports",
  "email": null,
  "store": "https://store.patmcafeeshow.com",
  "twitter": "https://twitter.com/PatMcAfeeShow",
  "instagram": "https://instagram.com/patmcafeeshow",
  "links": [
    "https://store.patmcafeeshow.com"
  ],
  "country": "United States"
}
Example data from the API specification. Run a request to retrieve current data.

Response shape

This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.

View JSON Schema +
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "credits_remaining": {
      "type": "integer"
    },
    "credits_charged": {
      "type": "integer"
    },
    "channelId": {
      "type": "string"
    },
    "channel": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "object",
      "properties": {
        "image": {
          "type": "object",
          "properties": {
            "sources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  }
                }
              }
            },
            "processor": {
              "type": "object",
              "properties": {
                "borderImageProcessor": {
                  "type": "object",
                  "properties": {
                    "circular": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "avatarImageSize": {
          "type": "string"
        },
        "loggingDirectives": {
          "type": "object",
          "properties": {
            "trackingParams": {
              "type": "string"
            },
            "visibility": {
              "type": "object",
              "properties": {
                "types": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "description": {
      "type": "string"
    },
    "subscriberCount": {
      "type": "integer"
    },
    "subscriberCountText": {
      "type": "string"
    },
    "videoCountText": {
      "type": "string"
    },
    "viewCountText": {
      "type": "string"
    },
    "joinedDateText": {
      "type": "string"
    },
    "tags": {
      "type": "string"
    },
    "email": {
      "type": [
        "string",
        "object",
        "array",
        "number",
        "boolean",
        "null"
      ]
    },
    "store": {
      "type": "string"
    },
    "twitter": {
      "type": "string"
    },
    "instagram": {
      "type": "string"
    },
    "links": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "country": {
      "type": "string"
    }
  }
}