{
  "openapi": "3.0.1",
  "info": {
    "title": "Master News Aggregator",
    "description": "Aggregate Google News RSS, curated RSS, GDELT Cloud, and premium news APIs into normalized, AI-ready news data for monitoring and reporting.",
    "version": "0.1",
    "x-build-id": "BdEQQIDS6lK15JsSY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smart_tech_resources~master-news-aggregator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smart_tech_resources-master-news-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/smart_tech_resources~master-news-aggregator/runs": {
      "post": {
        "operationId": "runs-sync-smart_tech_resources-master-news-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/smart_tech_resources~master-news-aggregator/run-sync": {
      "post": {
        "operationId": "run-sync-smart_tech_resources-master-news-aggregator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "query",
          "sourcePlatforms"
        ],
        "properties": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Keyword, phrase, topic, or search query to collect news for."
          },
          "category": {
            "title": "Category",
            "enum": [
              "world",
              "business",
              "technology",
              "science",
              "health",
              "sports",
              "entertainment",
              "environment",
              "general"
            ],
            "type": "string",
            "description": "Optional category label to attach to normalized output.",
            "default": "technology"
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Country hints/filters passed to selected source adapters.",
            "items": {
              "type": "string"
            },
            "default": [
              "US",
              "GB",
              "MY",
              "SG"
            ]
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Language hints/filters passed to selected source adapters.",
            "items": {
              "type": "string"
            },
            "default": [
              "en"
            ]
          },
          "dateRange": {
            "title": "Date Range",
            "enum": [
              "last_24_hours",
              "last_7_days",
              "last_30_days"
            ],
            "type": "string",
            "description": "Convenience range converted to fromDate/toDate for supported sources.",
            "default": "last_7_days"
          },
          "fromDate": {
            "title": "From Date",
            "type": "string",
            "description": "Optional explicit start date in YYYY-MM-DD format."
          },
          "toDate": {
            "title": "To Date",
            "type": "string",
            "description": "Optional explicit end date in YYYY-MM-DD format."
          },
          "maxArticles": {
            "title": "Maximum Articles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of normalized articles to output.",
            "default": 200
          },
          "sourcePlatforms": {
            "title": "Source Platforms",
            "type": "array",
            "description": "News sources to collect and merge. Supported values: google_news_rss, curated_rss, gdelt, newsapi, mediastack, newsdata, event_registry. GDELT and premium API sources require BYOK secret inputs.",
            "items": {
              "type": "string"
            },
            "default": [
              "google_news_rss",
              "curated_rss"
            ]
          },
          "gdeltCloudApiKey": {
            "title": "GDELT Cloud API Key",
            "type": "string",
            "description": "Optional. Required only when GDELT Cloud source is enabled. Stored as Apify secret input."
          },
          "gdeltContentTypes": {
            "title": "GDELT Content Types",
            "type": "array",
            "description": "GDELT Cloud record types to collect when sourcePlatforms includes gdelt.",
            "items": {
              "type": "string",
              "enum": [
                "stories",
                "events",
                "entities",
                "all"
              ],
              "enumTitles": [
                "Stories",
                "Events",
                "Entities",
                "All / Mixed"
              ]
            },
            "default": [
              "stories",
              "events"
            ]
          },
          "gdeltSort": {
            "title": "GDELT Sort",
            "enum": [
              "significance",
              "recent"
            ],
            "type": "string",
            "description": "GDELT Cloud ranking mode when sourcePlatforms includes gdelt.",
            "default": "significance"
          },
          "newsApiKey": {
            "title": "NewsAPI Key",
            "type": "string",
            "description": "Optional. Required only when NewsAPI source is enabled. Stored as Apify secret input."
          },
          "mediastackApiKey": {
            "title": "Mediastack API Key",
            "type": "string",
            "description": "Optional. Required only when Mediastack source is enabled. Stored as Apify secret input."
          },
          "newsDataApiKey": {
            "title": "NewsData.io API Key",
            "type": "string",
            "description": "Optional. Required only when NewsData.io source is enabled. Stored as Apify secret input."
          },
          "eventRegistryApiKey": {
            "title": "Event Registry / NewsAPI.ai API Key",
            "type": "string",
            "description": "Optional. Required only when Event Registry source is enabled. Stored as Apify secret input."
          },
          "deduplicate": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Remove duplicate article URLs/titles before output.",
            "default": true
          },
          "includeSentiment": {
            "title": "Include Sentiment",
            "type": "boolean",
            "description": "Normalized records include a lightweight sentiment label.",
            "default": true
          },
          "includeEntities": {
            "title": "Include Entities",
            "type": "boolean",
            "description": "Normalized records include basic entity extraction.",
            "default": true
          },
          "includeTrendSummary": {
            "title": "Include Trend Summary",
            "type": "boolean",
            "description": "The SUMMARY record includes source, sentiment, country, and timeline counts.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}