# Allsides — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get balanced news coverage from multiple political perspectives and discover media bias ratings to understand how outlets lean Left, Center, or Right. Search headlines by topic and perspective to compare how different viewpoints cover the same stories.

**Category:** News & Media | **Website:** [allsides.com/](https://allsides.com/) | **Docs:** [parse.bot/marketplace/afa2d3ba-3225-432e-92ec-1724ee2661a0/allsides-com-api](https://parse.bot/marketplace/afa2d3ba-3225-432e-92ec-1724ee2661a0/allsides-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_headline_roundup_detail

Fetch the full detail of a single headline roundup, including individual articles grouped by Left, Center, and Right perspective. Requires a story slug path from the roundups listing. Returns the headline, a date/summary line, tagged articles with their source attribution, and topic tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | AllSides story path (e.g. '/story/elections-graham-platner-wins-senate-nomination-democrats-divided-future-party') or full URL. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/get_headline_roundup_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_headline_roundups

Fetch recent headline roundups from AllSides. Each roundup groups articles from Left, Center, and Right perspectives on a single news story. Returns all roundups currently displayed on the recent roundups page — no pagination, no filtering.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/get_headline_roundups \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_media_bias_ratings

Fetch media bias ratings for news sources from the AllSides ratings API. Returns paginated results including each source's name, URL slug, bias label, and bias image. Supports filtering by featured status and page-based pagination (zero-indexed).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `featured` | boolean | No | Whether to fetch only featured sources (true) or all sources (false). |
| `page` | integer | No | Zero-based page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/get_media_bias_ratings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"featured":"<boolean>","page":"<integer>"}'
```

### get_news_articles_by_perspective

Fetch current news articles filtered by a single political perspective from the AllSides balanced news page. Returns all articles currently displayed for that perspective — no pagination. Each article includes a headline, link, source name (when available), and the perspective label.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `perspective` | string | Yes | Political perspective filter. Accepted values: Left, Center, Right. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/get_news_articles_by_perspective \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"perspective":"<string>"}'
```

### search_allsides

Search AllSides content by keyword. Returns paginated results including article title, link, source name, text snippet, and content type (News, Opinion, Analysis, Fact Check). Supports zero-indexed pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Zero-based page number for pagination. |
| `query` | string | Yes | Search keyword or phrase. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-allsides-com-api-afa2d3ba/search_allsides \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
