---
title: "Sort articles by engagement score"
description: "Get the most viral and engaging articles sorted by engagement potential"
source: https://apitube.io/cookbook/sort-articles-by-engagement-score
---

#### Input parameters

| Parameter   | Description                                    | Type    | Default | Required |
|:------------|:-----------------------------------------------|:--------|:--------|:---------|
| sort.by     | Sort by engagement score.                      | string  |         | Yes      |
| sort.order  | Sort order (desc for highest engagement).      | string  |         | Yes      |
| api_key     | Your API key.                                  | string  |         | Yes      |
| per_page    | Maximum number of articles to retrieve.       | integer | 20      | No       |

#### Workflow examples

##### Request for most engaging articles:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"
```

##### Request for engaging breaking news with media:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"
```

##### Request for viral content for social media:

```shell
curl -X GET "https://api.apitube.io/v1/news/everything?sort.by=engagement&published_at.start=2024-01-01&media.images.count.min=1&api_key=YOUR_API_KEY"
```

---

#### Related Examples

- [Sort by quality score](/cookbook/sort-articles-by-quality-score)
- [Get sorted news by date](/cookbook/get-sorted-news)
- [Get Instagram-ready content](/cookbook/get-instagram-ready-content)
- [Get articles with high-quality images](/cookbook/get-articles-with-high-quality-images)
- [Get premium source articles](/cookbook/get-articles-from-premium-sources)

