# News API
> Search news and fetch top headlines from thousands of publishers worldwide, by topic, country and language. Each article includes the title, publisher, publish date, link and a snippet — powered by Google News.

## 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/news-api/..."
```

## Pricing
- **Free** (Free) — 1,500 calls/Mo, 2 req/s
- **Basic** ($14/Mo) — 40,000 calls/Mo, 6 req/s
- **Pro** ($39/Mo) — 180,000 calls/Mo, 15 req/s
- **Mega** ($119/Mo) — 750,000 calls/Mo, 40 req/s

## Endpoints

### News

#### `GET /v1/headlines` — Top headlines (optionally by topic)

**Parameters:**
- `topic` (query, optional, string) — world|nation|business|technology|entertainment|sports|science|health Example: `technology`
- `lang` (query, optional, string) — 2-letter language Example: `en`
- `country` (query, optional, string) — 2-letter country Example: `US`
- `limit` (query, optional, string) — Max articles 1-100 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/news-api/v1/headlines?topic=technology&lang=en&country=US&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "topic": "technology",
        "articles": [
            {
                "link": "https://news.google.com/rss/articles/CBMiuwFBVV95cUxOTzR4eWYxQURNS0luRXRha2tSWXMzZTkzdVRBZUx5MTVQSHBFTnRrZ0Y1Z1NjWjdlWFBhWk5nN2xCTXcyT05hcmk4eEpsX1lRQlJtSG4xaXkzOTVyY2x2aTNhbjA0d2UxbENQMTVWTEE3ZGJ5TXRPRFBwVFR4ZC1rUDdjSWZybEhwYWxiS2taNTI3SHZ1Y3VDaTJfTVhFUjhZZ0hxXy1GeDl6ZUdSbHZEcjhZanNkc2dsaHZJ?oc=5",
                "title": "Microsoft under fire for threatening security researcher with criminal investigation",
                "source": "TechCrunch",
                "snippet": "Microsoft under fire for threatening security researcher with criminal investigation TechCrunchDisgruntled 0-day hunter 'humiliated' by Microsoft pledges 'bone shattering drop' as Redmond calls cops The RegisterMicrosoft Condemns \"Uncoordinated\" Zero Day Disclosures Infosecurity MagazineMicrosoft’s nightmare: GitLab removes rogue security researcher days after GitHub ban CybernewsMicrosoft Calls the Zero-Day Dumps Irresponsible. The Researcher Says Microsoft Started It. Security Affairs",
                "published": "2026-05-29T17:03:39.000Z"
            },
            {
                "link": "https://news.google.com/rss/articles/CBMif0FVX3lxTFBSQ2l6QWcxWjZVOG5TR09SVU5jY00yb0l1QWZ6R2p5TG54VU5QSHk5c2QzcmdXS1RUSEV4ZGxfeV9aNURKQmtZSkhfSUh4UE1kLXdXTnUwQXQ5aFVXVUFhUjUtRUVFYkRjM2RLcFhfeXNnTDlQY19WTDUzZ0EwUWs?oc=5",
                "title": "Acer’s launching a Linux handheld
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search news articles

**Parameters:**
- `q` (query, required, string) — Search query Example: `artificial intelligence`
- `lang` (query, optional, string) — 2-letter language Example: `en`
- `country` (query, optional, string) — 2-letter country Example: `US`
- `limit` (query, optional, string) — Max articles 1-100 Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/news-api/v1/search?q=artificial+intelligence&lang=en&country=US&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "query": "artificial intelligence",
        "articles": [
            {
                "link": "https://news.google.com/rss/articles/CBMiwwFBVV95cUxPTUIwOG9hZTZ3YzU5VExlNFdiekR5T0tYNUJrSWZVRzlNZ3JsUnkyWlM1eWx2eFl3Qm1mUU96djM4MkRRdzZGQVFfMW5wQUNfUHdzLXN6ekQtNE41Y1hkREZqZGFlVTJHLUxPRmhwNWMtQzVhQUhjUGoteVNmYUZUU1lucmN3UlBsR1V3NFQwalhaSWt5bW1wUUxsdnYxWEdzZldHc3ZVV2V3dTh1RzRmblRBU3J1UFQ4dEphYngzMkVjUUU?oc=5",
                "title": "Opinion | How America can remain the world’s AI superpower",
                "source": "The Washington Post",
                "snippet": "Opinion | How America can remain the world’s AI superpower The Washington Post",
                "published": "2026-05-29T18:30:00.000Z"
            },
            {
                "link": "https://news.google.com/rss/articles/CBMiswFBVV95cUxOV0NtbFAxSVdNNTY2RUo5R0ZQYnhfT2ZOcGFGbWFLQ1ZhMVFqQ194RE9nYkowa1p0TmNrOUlJYU90YnBPVkxYLWw3ZENQaU1IZzVqVEpsSS1YckZKb0oxLU1CcHF0ZUNPbzB2N0FfZ2RiQ0VIaTdrX1AzbVIzUHU2U2FZYVk4R3hMekFxd29IX1RHWDJEVU1xOHM1T3U3OUFibTNRR21qbmloS0t4TEk5Q1NqTQ?oc=5",
                "title": "Meet the Silicon Valley priest advising tech companies on artificial intelligence ethics",
                "source": "OSV News",
                "snippet": "Meet the Silicon Valley priest advising tech companies on artificial intelligence ethics OSV News",
                "published": "2026-05-28T22:04:39.000Z"
            },
            {
                "link": "htt
…(truncated, see openapi.json for full schema)
```


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