Searching and sorting news stories by video and image volume

Searching and sorting news stories by video and image volume


Today we want to show you a simple yet effective feature that we have just added based on a request from one of our brilliant users – finding and sorting stories by the number of images and videos they contain.

Finding stories by image and video count

No matter what news related project you’re working on, be it a particular research project or a news aggregation solution, the ability to search and sort stories based on the media (images and videos) contained in them is extremely useful. This capability means you can provide more flexibility and insight on the content you curate and push to stakeholders or app users.

We’ve added a number of new parameters that make it easier to understand the makeup of stories you collect or search for. Whether you are searching for content that is image and video-rich or content that is void of either media type, you now have complete control with the ability to find stories with specific image and video counts.

For example, you may wish to only retrieve stories that contain at least one video. Or perhaps you want stories that contain both multiple videos and images. We could go on and on with examples, but we’re sure you get the gist!

Here are the new search parameters added to the /stories, /related_stories, /coverages, /time_series, /trends and /histograms endpoints:

  • media.images.count.min
  • media.images.count.max
  • media.videos.count.min
  • media.videos.count.max

This latest update gives you increased flexibility and control over your News API searches and & increases analysis options as number of images/videos can now be combined with other search parameters and trend analyses to give you greater insights than ever before.

Simple Examples

Note: you need to add your AYLIEN News API credentials for the sample calls to work. If you don’t have an account, you can sign up here.

Finding stories with media

Find stories containing a minimum of 2 images –

Find stories containing exactly 2 images and minimum of 1 video –

Sorting results by image and video count

Sorting your results by image or video count is also possible and it couldn’t be easier.

We’ve added the following options for the `sort_by` parameters in the /stories endpoint:

  • media.images.count
  • media.videos.count

Sample query;

Find stories that contain ‘Obama’ in the title, published in the past 24 hours and sorted by image count –

Interesting use case

Comparing image and video presence by news category

We thought it would be interesting to take three news categories and compare the image and video volume for each, to see if there was much variance in how often each media type is used in each category. The three categories we chose were Health & Fitness, Technology and Personal Finance.

We collected a total of about 3M stories across 3 categories from the past 30 days. Using the new parameters for image and video counts we produced the following results, starting with images;

% of stories containing 0, 1 or 2+ images


The charts above tell us that the majority of news content contains at least one image. On average, from these three categories, 84% of stories contain at least 1 image, while just 16% contains no image at all.


With the recent sharp rise in video content popularity it is perhaps surprising to see the large number of stories published with no videos;

  • Technology 98.09%
  • Health & Fitness 99.47%
  • Personal Finance 99.9%

The chart below shows the percentage of stories from each category that did contain videos.



A few thoughts spring to mind immediately;

  1. As we mentioned the number of news stories containing videos is surprisingly low.
  2. Stories from the Technology category contain considerably more video content than Personal Finance and Health & Fitness categories.
  3. Video content in Personal Finance-related content is almost non-existent. We saw 0% of our results in this category containing 2 or more videos. In fact, out of just under 70,000 stories, only 73 contained at least 1 video.


Finding, sorting and analyzing news content by the media contained in stories adds an interesting and powerful new dimension to our News API. We hope this post has given you a good introduction to these new parameters and sparked some ideas in your mind as to how you can take advantage of them in your own projects and apps.

We always take feedback and feature requests from our users onboard and we were thrilled to deliver this update so soon after receiving the request (kudos to our awesome Engineers and team!). We have plenty more to come but if you have any requests we would love to here them.

Stay tuned as we will be taking a more in-depth look at each of these latest parameters soon.


News API - Sign up

Let's Talk