{
  "kind": "aggregator",
  "basic": {
    "name": "",
    "short_title": "High-availability data API",
    "version": "1.0",
    "category": "",
    "tags": "data, failover, reliable",
    "about": "## What this API does\n\nOne endpoint, two upstreams: if the primary source fails or hits its rate limit, the backup answers automatically. Buyers always get the same unified fields regardless of which source responded.",
    "status": "private"
  },
  "routes": [
    {
      "name": "Get data (failover)",
      "playground_path": "/data",
      "method": "GET",
      "mode": "failover",
      "headers": [],
      "body_mode": "fields",
      "body_fields": [],
      "output_schema": {
        "value": "string",
        "updated_at": "string"
      },
      "request_policy": {
        "max_requests_per_buyer_per_day_paid": 1000,
        "max_requests_total_trial": 5,
        "estimated_total_requests": 100000
      },
      "sources": [
        {
          "label": "Primary",
          "method": "GET",
          "url": "https://api.primary-provider.com/v1/data",
          "headers": [
            { "key": "X-API-Key", "value": "{{PRIMARY_API_KEY}}" }
          ],
          "body_mode": "raw_json",
          "body_payload": { "private": "", "public_sample": "" },
          "body_fields": [],
          "response_type": "json",
          "rate_limits": [
            { "window": "minute", "count": 60 },
            { "window": "day", "count": 5000 }
          ],
          "request_mapping": [],
          "schema_mapping": {
            "value": "data.value",
            "updated_at": "data.timestamp"
          },
          "proxy": {
            "enabled": true,
            "required": true,
            "visibility": "private",
            "value": {
              "hostname": "{{YOUR_PROXY_HOST_PORT}}",
              "username": "{{YOUR_PROXY_USERNAME}}",
              "password": "{{YOUR_PROXY_PASSWORD}}"
            }
          }
        },
        {
          "label": "Backup",
          "method": "GET",
          "url": "https://api.backup-provider.com/data",
          "headers": [
            { "key": "Authorization", "value": "Bearer {{BACKUP_API_KEY}}" }
          ],
          "body_mode": "raw_json",
          "body_payload": { "private": "", "public_sample": "" },
          "body_fields": [],
          "response_type": "json",
          "rate_limits": [
            { "window": "day", "count": 1000 }
          ],
          "request_mapping": [],
          "schema_mapping": {
            "value": "result.current",
            "updated_at": "result.time"
          },
          "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": 50,
    "plans": [],
    "trial_enabled": true,
    "trial_requests": 5
  }
}
