# Media Bias API
> Political-bias and factual-reporting ratings for 1,350+ news sources, sourced from AllSides and Media Bias/Fact Check. Look up any outlet by domain or name to get its left/center/right political lean (5-point scale) and high/mixed/low factual reliability — ideal for news aggregators, media-literacy tools and content moderation.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/mediabias-api/..."
```

## Pricing
- **Free** (Free) — 1,000 calls/Mo, 2 req/s
- **Starter** ($19/Mo) — 50,000 calls/Mo, 10 req/s
- **Pro** ($79/Mo) — 500,000 calls/Mo, 30 req/s
- **Enterprise** ($299/Mo) — 5,000,000 calls/Mo, 100 req/s

## Endpoints

### Lookup

#### `GET /v1/source` — Bias & factual rating for one news source (by domain or name)

**Parameters:**
- `domain` (query, optional, string) — News-source domain, e.g. nytimes.com Example: `nytimes.com`
- `name` (query, optional, string) — News-source name, e.g. Fox News Example: `Fox News`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mediabias-api/v1/source?domain=nytimes.com&name=Fox+News"
```

**Response:**
```json
{
    "data": {
        "bias": "left-center",
        "name": "New York Times - News",
        "type": "News Media",
        "domain": "nytimes.com",
        "sources": {
            "mbfc": null,
            "allsides": "https://www.allsides.com/news-source/new-york-times",
            "wikipedia": "https://en.wikipedia.org/wiki/The_New_York_Times"
        },
        "bias_label": "lean left",
        "bias_scale": "5-point (AllSides)",
        "bias_position": -1,
        "factual_reporting": null
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:25.714Z",
        "request_id": "4b7bd249-96f1-4ba4-877f-98f7c66d80f9"
    },
    "status": "ok",
    "message": "Source rating retrieved",
    "success": true
}
```

### Search

#### `GET /v1/search` — Filter news sources by text, bias and factual reliability

**Parameters:**
- `q` (query, optional, string) — Free-text match on source name/domain Example: `guardian`
- `bias` (query, optional, string) — left | left-center | center | right-center | right Example: `left`
- `factual` (query, optional, string) — high | mixed | low Example: `high`
- `limit` (query, optional, string) — Results per page (1-100, default 20) Example: `20`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mediabias-api/v1/search?q=guardian&bias=left&factual=high&limit=20&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 2,
        "limit": 20,
        "total": 2,
        "offset": 0,
        "filters": {
            "q": "guardian",
            "bias": "left",
            "factual": "high"
        },
        "results": [
            {
                "bias": "left",
                "name": "Guardianlv",
                "type": null,
                "domain": "guardianlv.com",
                "sources": {
                    "mbfc": "http://mediabiasfactcheck.com/guardian-liberty-voice/",
                    "allsides": null,
                    "wikipedia": null
                },
                "bias_label": "left",
                "bias_scale": "3-point (MBFC)",
                "bias_position": -2,
                "factual_reporting": "high"
            },
            {
                "bias": "left",
                "name": "Theguardiansofdemocracy",
                "type": null,
                "domain": "theguardiansofdemocracy.com",
                "sources": {
                    "mbfc": "https://mediabiasfactcheck.com/guardians-of-democracy/",
                    "allsides": null,
                    "wikipedia": null
                },
                "bias_label": "left",
                "bias_scale": "3-point (MBFC)",
                "bias_position": -2,
                "factual_reporting": "high"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:25.795Z",
        "request_id": "b021ed20-b3b2-48cf-b63d-c44717b4dc8
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Dataset totals, bias values and rating distributions

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mediabias-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "total": 1352,
        "sources": "AllSides Media Bias + Media Bias/Fact Check",
        "bias_counts": {
            "left": 323,
            "right": 448,
            "center": 400,
            "left-center": 106,
            "right-center": 75
        },
        "bias_values": [
            "left",
            "left-center",
            "center",
            "right-center",
            "right"
        ],
        "with_domain": 892,
        "factual_counts": {
            "low": 162,
            "high": 452,
            "mixed": 245
        },
        "factual_values": [
            "high",
            "mixed",
            "low"
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:25.863Z",
        "request_id": "f4fb1eea-cea4-407c-9d62-a5da934f8b29"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/mediabias-api
OpenAPI spec: https://www.oanor.com/api/mediabias-api/openapi.json
