{
  "kind": "aggregator",
  "basic": {
    "name": "",
    "short_title": "News headlines API",
    "version": "1.0",
    "category": "News & Media",
    "tags": "news, headlines, media",
    "about": "## What this API does\n\nTop news headlines by country through one endpoint. The buyer sends a 2-letter country code in a public header; your upstream API key stays in a private header.\n\n## How buyers call it\n\nSend header `X-Country: in` and receive the top headline plus total available results.",
    "status": "private"
  },
  "routes": [
    {
      "name": "Top headlines",
      "playground_path": "/news/top",
      "method": "GET",
      "mode": "failover",
      "headers": [
        { "key": "X-Country", "visibility": "public", "required": true }
      ],
      "body_mode": "fields",
      "body_fields": [],
      "output_schema": {
        "top_title": "string",
        "top_source": "string",
        "total_results": "number"
      },
      "request_policy": {
        "max_requests_per_buyer_per_day_paid": 1000,
        "max_requests_total_trial": 5,
        "estimated_total_requests": 200000
      },
      "sources": [
        {
          "label": "NewsAPI",
          "method": "GET",
          "url": "https://newsapi.org/v2/top-headlines",
          "headers": [
            { "key": "X-Api-Key", "value": "{{YOUR_NEWSAPI_KEY}}" }
          ],
          "body_mode": "raw_json",
          "body_payload": { "private": "", "public_sample": "" },
          "body_fields": [],
          "response_type": "json",
          "rate_limits": [
            { "window": "day", "count": 100 }
          ],
          "request_mapping": [
            { "source_field": "X-Country", "target": "query", "placeholder": "country" }
          ],
          "schema_mapping": {
            "top_title": "articles[0].title",
            "top_source": "articles[0].source.name",
            "total_results": "totalResults"
          },
          "proxy": {
            "enabled": true,
            "required": true,
            "visibility": "private",
            "value": {
              "hostname": "{{YOUR_PROXY_HOST_PORT}}",
              "username": "{{YOUR_PROXY_USERNAME}}",
              "password": "{{YOUR_PROXY_PASSWORD}}"
            }
          }
        }
      ]
    }
  ],
  "pricing": {
    "requests_per_credit": 100,
    "plans": [],
    "trial_enabled": true,
    "trial_requests": 5
  }
}
