How to get a videos with multiple videocategoryid using youtube api - google-apis-explorer

I have used Search: list operation to fetch a videos. When I add multiple videocategoryid to fetch videos, I get a response contain a invalidSearchFilter error.
Can you please help me to fetch videos from related category ids.
request -
https://www.googleapis.com/youtube/v3/search?part=snippet&order=viewCount&videoCategoryId=2,20&key={API_KEY}

Related

How to get the exact subscribers of own youtube channel throughout API

i'm trying to retrieve the number of subscribers, but the number that I received was rounded, not correct number.
By seeing the API docs, it is impossible to get exact subscribers number throughout youtube data API. So, I came up with the idea that using Analytics API, However there is no way to fetch the number of subscribers. Is there any way to do this?? thanks.
(It is possible to see the subscribers number by opening youtube but I can't do this throughout API)
These are the only metrics that the analytics api provides:
annotationClickThroughRate
annotationCloseRate
verageViewDuration
comments
dislikes
estimatedMinutesWatched
estimatedRevenue
likes
shares
subscribersGained
subscribersLost
viewerPercentage
views
Source: https://developers.google.com/youtube/analytics/metrics
Also See: https://stackoverflow.com/a/63537230/12772716
You can get the current subscribers via the YouTube Data API:
https://developers.google.com/youtube/v3/docs/channels
under statistics.subscriberCount
Additionally you could calculate the historical subscribercount by combining YouTube Data and Analytics API:
subscriberCount - (SUM(subscribersGained) - SUM(subscribersLost))

Querying MediaWiki API for random articles with both extracts and thumbnails

I'm building a web app that is using httpRequests to query the Wikipedia API. Ideally I need the API call to return at least 12 random articles that have BOTH a thumbnail and an extract, but I'm struggling to work out if this is possible.
My query url at the moment is:
http://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts%7Cpageimages&generator=random&redirects=1&exlimit=max&exintro=1&explaintext=1&piprop=thumbnail&pithumbsize=300&pilimit=max&pilicense=any&grnnamespace=0&grnfilterredir=nonredirects&grnlimit=100&origin=*
It returns plenty of articles but of the 20 that I can return the extracts for not all of those are guaranteed to also have thumbnails (it's usually <8). Is there any way to query the API for only those articles that have both an extract and a thumbnail?

How to get data from a spotify palylist

I am trying to get information about a playlist in spotify.
I saw that the API requires a playlist_id
https://api.spotify.com/v1/playlists/{playlist_id}
Does anyone know where i can get that from.
Or any other solution to how to get data from spotify from the API.
Thank you
If you have a single Spotify Playlist in mind, you can find the Playlist ID in:
the URL bar for the playlist on open.spotify.com
in Spotify if you navigate to the playlist, then go to Playlist Options (...) > Share > Playlist Link or the Spotify URI
If you don't want a specific Playlist, the API also provides methods for getting Playlists in bulk for a User or Search, and you can acquire Playlist IDs that way too

API for Vimeo doesn't have a count for the number of finishes ?

The number of viewers who haved watched a video is easily accessible from the API from videos -> stats/plays but I would also like to retrieve the number of viewers who have watched the video to the end. How do I retrieve this statistic ? It is easily accessible from the website, but I can't find it in the returned stats.
Only the number of plays via the GET video API call for now. https://developer.vimeo.com/api/reference/videos#get_video
If you want to download a table with stats, you will need to log in at your vimeo dashboard ..
#see How to get video stats via vimeo api
and Is it possible to get play statistics from an album of videos using the Vimeo API?

Using YouTube V3.0/V2.0 API to download JSON feed of channel stats and videos

I am trying to use a YouTube V3.0 API call to download a JSON feed of information for a particular YouTube channel (e.g: the Apple YouTube channel).
I have been looking at the YouTube API documentation, however I am struggling to construct the correct URL that I need to make the API call.
Basically, I just want this API call to return a JSON feed containing information such a the amount of subscribers, the amount of total video views for a particular YouTube channel.
Any help would be great, thanks.
Dan
Channels->list call id what you re looking for. You can use the API explorer at the end of the page to customize your search and construct the GET request you need.