{
  "openapi": "3.0.1",
  "info": {
    "title": "AI News Brief Agent — Cited Market & Company Intelligence",
    "description": "Name a topic, company or market; the agent searches recent global news, groups stories, reads key articles and writes a cited AI brief: summary, dated developments, companies, sentiment, risks, opportunities and sources. $0.05 per brief + AI tokens at cost.",
    "version": "0.1",
    "x-build-id": "IEykWMvStTQRrOLTH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor-forge~news-market-brief-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor-forge-news-market-brief-agent",
        "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/actor-forge~news-market-brief-agent/runs": {
      "post": {
        "operationId": "runs-sync-actor-forge-news-market-brief-agent",
        "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/actor-forge~news-market-brief-agent/run-sync": {
      "post": {
        "operationId": "run-sync-actor-forge-news-market-brief-agent",
        "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, companies or markets",
            "type": "array",
            "description": "One brief per line, e.g. \"Nvidia\", \"EV batteries Europe\", \"UK fintech regulation\", \"lithium prices\". All words must appear in a headline or article URL (plural-tolerant, accents ignored, any language/script). \"Exact phrases\", OR and -excluded words also work. Up to 20 topics per run.",
            "items": {
              "type": "string"
            }
          },
          "lookbackHours": {
            "title": "Time window (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How far back to look for news, from 1 hour to 7 days (168). Default 48 hours; 24–72 hours suits a daily or weekly brief.",
            "default": 48
          },
          "focus": {
            "title": "Angle (optional)",
            "type": "string",
            "description": "Optional reader angle for the brief, e.g. \"investor view: earnings, guidance and analyst moves\" or \"supply-chain risks for a European car maker\"."
          },
          "languages": {
            "title": "Source languages",
            "type": "array",
            "description": "Only news published in these languages (names or codes: english, german, french, spanish, italian, japanese, chinese, de, fr…). Empty = all 65+ languages GDELT monitors. The brief is written in the brief language either way.",
            "default": [
              "english"
            ],
            "items": {
              "type": "string"
            }
          },
          "sourceCountries": {
            "title": "Source countries",
            "type": "array",
            "description": "Only outlets from these countries, e.g. \"United Kingdom\", \"Germany\", \"India\" (recognised by the outlet's country domain such as .co.uk or .de in the news files, and by GDELT's outlet-country data in the search API). Empty = worldwide.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop articles whose headline or URL contains these words or phrases, e.g. \"horoscope\" or \"stock tips\".",
            "items": {
              "type": "string"
            }
          },
          "maxHeadlines": {
            "title": "Max headlines per topic",
            "minimum": 5,
            "maximum": 250,
            "type": "integer",
            "description": "How many of the most relevant recent articles to consider per topic (after removing syndicated duplicates they are grouped into storylines and all go to the AI as headlines). More = broader brief, slightly more AI tokens.",
            "default": 75
          },
          "maxArticlesToRead": {
            "title": "Articles to read per topic",
            "minimum": 0,
            "maximum": 40,
            "type": "integer",
            "description": "How many articles to open and read (lead paragraphs) for detail, spread across the top storylines and different outlets. Sites whose robots.txt disallows it are skipped. 0 = headlines only (fastest).",
            "default": 12
          },
          "maxNewsFiles": {
            "title": "News depth (GDELT files to scan)",
            "minimum": 4,
            "maximum": 192,
            "type": "integer",
            "description": "GDELT publishes a file of newly seen articles every 15 minutes (~1,000 English or ~4,000 translated articles each). This many files, spread evenly over the time window, are scanned for your topics (a translated-language file counts as 2). More = more headlines for niche topics, a few seconds slower. Scanning stops early once every topic has plenty of headlines.",
            "default": 48
          },
          "useSearchApi": {
            "title": "Also use the GDELT search API",
            "type": "boolean",
            "description": "Also query GDELT's full-text news search API (finds articles that mention the topic in the body, useful for niche topics). It is often busy, so it gets at most ~30 seconds and never blocks the brief.",
            "default": true
          },
          "briefLanguage": {
            "title": "Brief language",
            "type": "string",
            "description": "Language the brief is written in, e.g. English, German, Spanish, French, Japanese.",
            "default": "English"
          },
          "includeArticleRows": {
            "title": "Output one row per article",
            "type": "boolean",
            "description": "Also output a free row for every unique headline considered: URL, outlet, dates, country, storyline, whether it was read and whether the brief cites it. No article text is output.",
            "default": true
          },
          "model": {
            "title": "AI model",
            "type": "string",
            "description": "Any OpenRouter model id, e.g. google/gemini-2.5-flash-lite (default: fast and cheap), openai/gpt-4o-mini, google/gemini-2.5-flash or anthropic/claude-sonnet-4 for a more nuanced brief at a higher token price. Tokens are billed to your Apify account at OpenRouter rates.",
            "default": "google/gemini-2.5-flash-lite"
          },
          "maxLlmCostUsd": {
            "title": "Max AI token cost per run (USD)",
            "minimum": 0,
            "maximum": 20,
            "type": "number",
            "description": "Hard cap on the AI token charges this run may cause on your Apify account (estimated, including the 10× free-plan rate when it applies). A topic whose worst-case cost would pass the cap gets a free headlines-only brief instead. Separate from this actor's own per-brief fee.",
            "default": 0.1
          },
          "maxOutputTokens": {
            "title": "Max output tokens per brief",
            "minimum": 1000,
            "maximum": 8000,
            "type": "integer",
            "description": "max_tokens for each brief. 3,000 fits a full brief; lower it to save tokens, raise it for very busy topics or verbose models.",
            "default": 3000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}