Assigned
Status Update
Comments
sn...@google.com <sn...@google.com> #3
Hi,
Thank you for quick response. Yes, I actually copied curl code above from the API explorer.
I also tried with Python code below:
request = youtube.search().list(
part="snippet",
maxResults=50,
order="viewCount",
publishedAfter="2024-09-01T00:00:00Z",
q="artificial intelligence",
videoPaidProductPlacement="true",
)
response = request.execute()
return response
This also gave me invalid parameter error:
TypeError: Got an unexpected keyword argument videoPaidProductPlacement
Description
I run a request
That is, in the response I should get a list of playlists.
But one of the elements in the response is a channel, not a playlist ("kind": "youtube#channel").
This element should not be in the response.
- API request with parameters used (DO NOT include your credential)
- Result (copy and paste a JSON response you received)
Element that should not be in the response:
{
"kind": "youtube#searchListResponse",
"etag": "CTrWPcvgc4Gamg-1IZ5XpvsvuXQ",
"nextPageToken": "CDIQAA",
"regionCode": "RU",
"pageInfo": {
"totalResults": 105207,
"resultsPerPage": 50
},
"items": [
...
{
"kind": "youtube#searchResult",
"etag": "oFnt8yOR5LZL2VYHiMAD9evgR7w",
"id": {
"kind": "youtube#channel",
"channelId": "UCEgdi0XIXXZ-qJOFPf4JSKw"
},
"snippet": {
"publishedAt": "2013-12-15T20:39:04Z",
"channelId": "UCEgdi0XIXXZ-qJOFPf4JSKw",
"title": "Sports",
"description": "",
"thumbnails": {
"default": {
"url": "
},
"medium": {
"url": "
},
"high": {
"url": "
}
},
"channelTitle": "Sports",
"liveBroadcastContent": "none",
"publishTime": "2013-12-15T20:39:04Z"
}
},
...
]
}
Full response: see attached file search_response.json
- Expected result
Only playlists should be in response.
- Is it 100% reproducible?
No, sometimes I get correct responses.
- Reproducible API explorer link