I am trying to create a clone of Youtube app & using Youtube API v3 how to get list of thumbnails with info what has videos on original Youtube page? - api

I am using a request:
https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&q={search value}&maxResults=3&key={key}`
This way I am getting json with info about video thumbnails and descriptions what i need but I don't have an url to channel picture and don't have infro how many views has a video.
I found the way to get the info about channel URL logo in separate request
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={id}
but it doesn't look right to make additional separate requests for every single logo of the list and Views statistics.
Also, is it possible to get in the same request for embedded video URL's as well?

You are right, it's impossible from a search query q=${searchValue} to get the associated channel thumbnail URL in a single request.

Related

How to differentiate a carousel media from an image or video media in Instagram-API?

I was scraping all carousel medias using cheerio and regex to find all urls inside the page body.
To know if a media was a carousel, I checked if the request response was type 'video' and didn't have a 'videos' property. Like in this thread null.jpg being returned for carousel posts via Instagram API.
But now, Instagram changed the way carousels come in the requests, now, the Json response comes identical an image response if the first slide of the carousel is an image, and identical a video response if the firt slide is a video.
I want to know if anyone can differentiate carousels from other types of media in requests from the Instagram API.
Since last April 24th we are receiving posts of type "carousel" from the API. This posts contain the property "carousel_media" with all the carousel images/videos.

how can i get pictures from instagram using specific tags and locations

So, I am trying to get a bunch of pictures from Instagram using their API.
How can I specify the pictures I want to get, using both tags and location, not just one of them.
I tried to go to the endpoints listed on Instagram page, but it does not show any endpoint for both of them.
There is no API currently to get photos by both tags and location, you can use location search API get photos and then compare the tags in photos.
Here is an implementation of this feature: http://www.gramfeed.com/instagram/map
search for a location and then filter by keyword, the filter applies only for the photos loaded on the page, not all instagram photos at that location, you have scroll and load a bunch of photos and then filter with keyword.

If I want to get the thumbnail URL for a YouTube video, should I be using the "videos" API or the "thumbnails" API?

The YouTube API has a page for thumbnails and a page for videos. If I want the thumbnails for a certain YouTube video, which API should I be using?
I'm inclined to say the thumbnail API, but I can't figure out how to get information out of it? Can I only set with it? The first bullet point on the thumbnail API docs seems to indicate that I can get images from it:
A resource's snippet.thumbnails property is an object that identifies the thumbnail images available for that resource.
The only method available on thumbnails ressource is set means :
Uploads a custom video thumbnail to YouTube and sets it for a video.
https://developers.google.com/youtube/v3/docs/thumbnails
So you can't retrieve a thumbnail of a video with the resource thumbnails.
You need to use the ressource videos.list https://developers.google.com/youtube/v3/docs/videos/list with paramter snippet and specific videoId

Youtube captions eample

Can anyone provide an example of how to retrieve captions for YouTube video?
Based on API docs, API request https://gdata.youtube.com/feeds/api/videos?q=surfing&caption&v=2
returns list of videos about surfing with captions.
However a request for the first video from the list
https://gdata.youtube.com/feeds/api/videos/bQX4fustG9Q?v=2&key=DEVELOPERKEY
returns feed that shows no traces of captions
What am I missing?
Can someone please post an example of request that will retrieve captions for that video?
Thank you.
According to the docs, you don't need to send any special parameters in the initial request, but instead retrieve videos normally and then look for the link with rel=http://gdata.youtube.com/schemas/2007#video.captionTracks.
Note that the caption link is only visible to the owner of a video.

Show specific news feed in Facebook Canvas Application

I develop Facebook canvas application and have the following question:
I succeeded getting the news feed of the user as json object.
Now I want to show inside the Canvas some of the news feed, for example only the post that include specific words.
I want them to look like in original Facebook news feed.
I develop my application with java.
How I can do this?