{
  "openapi": "3.0.1",
  "info": {
    "title": "News Stories & Trends for AI Agents: Deduplicated, Multilingual",
    "description": "News stories, not duplicate headlines: each story groups every outlet covering it (289 outlets, 55 countries, multilingual), with trends and spike detection. Incremental mode returns only new or growing stories. Built for AI agents and MCP.",
    "version": "0.1",
    "x-build-id": "xhcU2fl5s72Qd2NrS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nacenempresas~news-stories-for-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nacenempresas-news-stories-for-ai",
        "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/nacenempresas~news-stories-for-ai/runs": {
      "post": {
        "operationId": "runs-sync-nacenempresas-news-stories-for-ai",
        "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/nacenempresas~news-stories-for-ai/run-sync": {
      "post": {
        "operationId": "run-sync-nacenempresas-news-stories-for-ai",
        "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": [
          "topics"
        ],
        "properties": {
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Topics, companies, products or public figures to follow. Write them in English: GDELT finds matching coverage in 65 languages. Multi-word topics are searched as exact phrases; you can also use GDELT syntax such as (openai OR anthropic).",
            "default": [
              "artificial intelligence"
            ],
            "items": {
              "type": "string"
            }
          },
          "timespan": {
            "title": "Time window",
            "type": "string",
            "description": "How far back to look: 15min to 3 months, e.g. 1h, 24h, 7d, 2w, 3m.",
            "default": "24h"
          },
          "minSources": {
            "title": "Minimum outlets per story",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Only return stories covered by at least this many different outlets. 1 returns every article group; 3+ keeps only widely covered news.",
            "default": 2
          },
          "maxStoriesPerTopic": {
            "title": "Max stories per topic",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound of stories returned (and charged) per topic, ranked by number of outlets.",
            "default": 50
          },
          "incremental": {
            "title": "Only new or growing stories (for scheduled runs)",
            "type": "boolean",
            "description": "Remembers stories delivered in previous runs and returns (and charges) only stories that are new or picked up by more outlets since. Ideal for hourly/daily schedules and alerts.",
            "default": false
          },
          "trends": {
            "title": "Include coverage trends",
            "type": "boolean",
            "description": "Adds one trend row per topic: article volume and average tone per hour/day, % change and a spike flag.",
            "default": true
          },
          "compact": {
            "title": "Compact output for LLM agents",
            "type": "boolean",
            "description": "Shorter rows (about 150 words per story, max 5 sources) to save tokens in agent pipelines.",
            "default": false
          },
          "languages": {
            "title": "Outlet languages",
            "type": "array",
            "description": "ISO 639-1 codes (en, es, de, fr, zh…). Empty = all 65 languages.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Outlet countries",
            "type": "array",
            "description": "ISO 3166 country codes of the outlets (US, GB, ES, DE…). Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Only these outlets",
            "type": "array",
            "description": "Restrict to these domains, e.g. reuters.com, bbc.co.uk.",
            "items": {
              "type": "string"
            }
          },
          "excludeDomains": {
            "title": "Exclude outlets",
            "type": "array",
            "description": "Domains to ignore.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "gdelt = GDELT global news index (65 languages), rss = ~400 publisher RSS feeds and news sitemaps from 40+ countries, googlenews = Google News RSS search (off by default; you enable it under your own responsibility).",
            "items": {
              "type": "string",
              "enum": [
                "gdelt",
                "rss",
                "googlenews"
              ],
              "enumTitles": [
                "GDELT (65 languages)",
                "Publisher feeds & news sitemaps",
                "Google News RSS"
              ]
            },
            "default": [
              "gdelt",
              "rss"
            ]
          },
          "customFeeds": {
            "title": "Extra RSS/Atom feeds",
            "type": "array",
            "description": "Your own feed URLs to include (blogs, trade press, press rooms).",
            "items": {
              "type": "string"
            }
          },
          "maxArticlesPerStory": {
            "title": "Max source articles listed per story",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "One article per outlet, earliest first.",
            "default": 10
          },
          "clustering": {
            "title": "Grouping engine",
            "enum": [
              "multilingual",
              "fast"
            ],
            "type": "string",
            "description": "multilingual = groups the same event across languages (default). fast = same-language grouping, quicker.",
            "default": "multilingual"
          },
          "semanticMatching": {
            "title": "Multilingual topic matching",
            "type": "boolean",
            "description": "Also finds non-English headlines about your topic by meaning (e.g. 'inteligencia artificial', 'KI'), not only by keywords.",
            "default": true
          },
          "topicSimilarity": {
            "title": "Multilingual matching strictness (0-1)",
            "type": "string",
            "description": "Leave empty for the tuned default. Higher = only headlines very clearly about the topic."
          },
          "similarityThreshold": {
            "title": "Grouping strictness (0-1)",
            "type": "string",
            "description": "Leave empty for the tuned default. Higher = stricter grouping (more, smaller stories)."
          },
          "preferLanguage": {
            "title": "Preferred headline language",
            "type": "string",
            "description": "ISO code, e.g. en. If a story has an article in this language, its title becomes the headline."
          },
          "minGrowth": {
            "title": "Incremental: new outlets needed to re-send a story",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "In incremental mode, a story already delivered is sent (and charged) again only when at least this many new outlets have picked it up.",
            "default": 1
          },
          "stateStoreName": {
            "title": "Incremental: memory store name",
            "type": "string",
            "description": "Named key-value store used to remember delivered stories. Use different names for independent schedules.",
            "default": "news-stories-state"
          },
          "llmApiKey": {
            "title": "Your OpenAI or Anthropic API key (optional)",
            "type": "string",
            "description": "If set, each story gets a written 1-2 sentence summary generated with your own key. Without it, summaries are extractive (free)."
          },
          "llmProvider": {
            "title": "LLM provider",
            "enum": [
              "auto",
              "openai",
              "anthropic"
            ],
            "type": "string",
            "description": "Which provider your API key belongs to. auto detects it from the key format.",
            "default": "auto"
          },
          "llmModel": {
            "title": "LLM model",
            "type": "string",
            "description": "Optional model id. Defaults to a small, cheap model of the provider."
          },
          "summaryLanguage": {
            "title": "Summary language",
            "type": "string",
            "description": "Language for the written summaries (only used with your own LLM API key).",
            "default": "English"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}