# Google News Search API (google_news.search)

- Canonical page: https://everyinfra.com/en/google-news-api/search
- Endpoint: POST /api/v1/social with {"platform": "google_news", "action": "search", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 20 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=google_news&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | The news search term, such as `OpenAI`. Google operators work: `site:cnn.com`, `OR`, and `-word` to exclude a word. Up to 500 characters. |
| country | not declared | no | not declared | A two-letter country code such as `us`, `gb` or `de` for the Google News edition to search (default `us`). |
| language | not declared | no | not declared | A two-letter language code such as `en`, `es` or `de` for the edition language (default `en`). |
| time_window | not declared | no | not declared | Only articles from this period: `hour`, `day`, `week`, `month` or `year`. Leave it out for no time limit. |
| limit | integer (1–20) | no | 20 | The most rows to return in this call, an integer from 1 to 20. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | Position of the article in this result list, starting at 1. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| url | Link to the record on the platform. |
| source | Name of the publisher of the article, such as Reuters. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| published_at | When the article was published, UTC, ISO 8601. |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "google_news",
  "action": "search",
  "params": {
    "keyword": "OpenAI"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "google_news",
        "action": "search",
        "params": {
            "keyword": "OpenAI",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "google_news",
  "action": "search",
  "results": [
    {
      "rank": …,
      "title": …,
      "url": …,
      "source": …,
      "text": …,
      "published_at": …,
      "image_url": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=google_news
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
