---
title: "Category time-series analysis with media filtering"
description: "Analyze articles in a category over time with media requirements and source quality filtering"
source: https://apitube.io/cookbook/category-time-series-analysis-with-media-filtering
---

#### Input parameters

| Parameter            | Description                                    | Type    | Default | Required |
|:---------------------|:-----------------------------------------------|:--------|:--------|:---------|
| category.id          | Category filter.                               | string  |         | Yes      |
| published_at.start   | Start date for time range.                     | string  |         | Yes      |
| published_at.end     | End date for time range.                       | string  |         | Yes      |
| sort.by              | Sort by publication date.                       | string  |         | Yes      |
| sort.order           | Ascending order for timeline.                   | string  |         | Yes      |
| per_page             | Maximum number of articles (100 for time-series). | integer | 100    | Yes      |
| media.images.count   | Minimum number of images.                       | integer |         | Yes      |
| source.rank.opr.min  | Minimum source quality.                         | string  |         | Yes      |
| api_key              | Your API key.                                  | string  |         | Yes      |

#### Workflow examples

##### Request for category time-series analysis:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"
```

##### Request for category-based media analysis:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:01000000&media.images.count=3&source.rank.opr.min=6&published_at.start=2023-01-01&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"
```

##### Request for cross-category sentiment comparison:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=category.id&api_key=YOUR_API_KEY"
```

---

#### Related Examples

- [Get articles with faceting for analytics](/cookbook/get-articles-with-faceting-for-analytics)
- [Get articles with range faceting](/cookbook/get-articles-with-range-faceting-for-timelines)
- [Get news in specific categories](/cookbook/get-news-in-categories)
- [Sort by engagement score](/cookbook/sort-articles-by-engagement-score)
- [Get articles with high-quality images](/cookbook/get-articles-with-high-quality-images)

