YouTube

FREEMIUM
By Dataverse | Updated 8 days ago | Data
Popularity

9.6 / 10

Latency

136ms

Service Level

100%

Health Check

100%

Back to All Discussions

Cant test the API

Rapid account: Angelhodar
angelhodar
4 months ago

Hi, I am trying to test your API with the free plan to see if it suits my needs. I need to convert channel username input to channel id, o I am using the channels endopint, but I am always getting this message with 401 error:

message:“This endpoint is disabled for your subscription”

Its important for me to have some way to convert channel username to channel id to make a request to the batch videos enpoint.

Rapid account: Bokolesnik
bokolesnik Commented 3 months ago

“I have to get the “uploads” playlist id from the channel result and then use the playlistitems endpoint to fetch the channel videos ids. It works fine but in the older api it was more clear just by using the GET channel videos endpoint.”

You are right, this logic followed by the original API. To reduce the number of requests, you could use a hack to get channel uploads playlist just replacing UC_xxx with UU_xxx in the channel ID (eg. UC_x5XG1OV2P6uZZ5FSM9Ttw will be UU_x5XG1OV2P6uZZ5FSM9Ttw), this transformed ID you can use with PlaylistItems: List API,

Request example:

GET /playlistItems?part=contentDetails,snippet&playlistId=UU_x5XG1OV2P6uZZ5FSM9Ttw

Response example:

{
  ...,
  "items": [
    "contentDetails": {
      "videoId": "S2UJlbXDynw",
      "videoPublishedAt": "2024-02-22T17:00:20Z"
    },
    "snippet": {
      "publishedAt": "2024-02-22T17:00:20Z",
      "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
      "title": "How Archivi.ng is making news more accessible",
      ...,
    },
    ...,
  ]
}

After that, use videoId and title to list videos with their details, or add /videos request to get videos stats.

Rapid account: Angelhodar
angelhodar Commented 3 months ago

Hi, thank you for the fix!! I have now been able to test the API properly and it works perfectly. Just have a question about listing channel videos that is a bit confusing compared to the older API. I have to get the “uploads” playlist id from the channel result and then use the playlistitems endpoint to fetch the channel videos ids. It works fine but in the older api it was more clear just by using the GET channel videos endpoint. I am also wondering how to know if a video is a short or not, but I think thats not a problem of the API itself. I have tried to get the fileDetails and recordingDetails to get more info but it gives a permission error.

Rapid account: Bokolesnik
bokolesnik Commented 4 months ago

Hi! I’m so sorry to hear you were having trouble with that endpoint. It looks like we had an issue with our BASIC plan features, but I’m happy to let you know that we’ve now fixed it. Everything should be working as expected.

Join in the discussion - add comment below:

Login / Signup to post new comments