{
  "openapi": "3.0.1",
  "info": {
    "title": "AI News Brief: Daily Top Stories + LinkedIn & X Drafts",
    "description": "Get the day's most important news on AI or any topic from RSS feeds, Hacker News and Google News, merged into ranked stories with summaries and why they matter, plus optional LinkedIn, X, newsletter or Instagram drafts in your voice.",
    "version": "1.0",
    "x-build-id": "hd7A2ZH9CYJjqSfMk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingeniela~ai-news-brief/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingeniela-ai-news-brief",
        "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/ingeniela~ai-news-brief/runs": {
      "post": {
        "operationId": "runs-sync-ingeniela-ai-news-brief",
        "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/ingeniela~ai-news-brief/run-sync": {
      "post": {
        "operationId": "run-sync-ingeniela-ai-news-brief",
        "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",
        "properties": {
          "topic": {
            "title": "Topic",
            "type": "string",
            "description": "e.g. 'artificial intelligence', 'e-commerce', 'crypto', 'skincare industry'.",
            "default": "artificial intelligence"
          },
          "keywords": {
            "title": "Keywords (optional)",
            "type": "array",
            "description": "Words to search on Hacker News and Google News. Default for AI: AI, LLM, OpenAI, Anthropic, Gemini.",
            "items": {
              "type": "string"
            }
          },
          "hours": {
            "title": "Time range (hours)",
            "minimum": 6,
            "maximum": 168,
            "type": "integer",
            "description": "24 for a daily brief, 168 for a weekly one.",
            "default": 24
          },
          "maxStories": {
            "title": "Stories in the brief",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Ranked by how many outlets cover them and how much they are discussed.",
            "default": 10
          },
          "rssFeeds": {
            "title": "RSS feeds (optional)",
            "type": "array",
            "description": "Any blog or news site with RSS. For AI, 5 good feeds are already included.",
            "items": {
              "type": "string"
            }
          },
          "useDefaultAiFeeds": {
            "title": "Include the built-in AI feeds",
            "type": "boolean",
            "description": "TechCrunch AI, The Verge AI, MIT Technology Review AI, OpenAI news, Google AI blog.",
            "default": true
          },
          "filterFeedsByKeywords": {
            "title": "Only feed items that mention the keywords",
            "type": "boolean",
            "description": "Turn on for general feeds (e.g. a whole newspaper).",
            "default": false
          },
          "hackerNews": {
            "title": "Hacker News",
            "type": "boolean",
            "description": "Stories with your keywords and their points and comments.",
            "default": true
          },
          "minHnPoints": {
            "title": "Min Hacker News points",
            "minimum": 0,
            "type": "integer",
            "description": "Filters out noise.",
            "default": 30
          },
          "googleNews": {
            "title": "Google News",
            "type": "boolean",
            "description": "Adds mainstream coverage from Google News (about US$0.002 per article).",
            "default": false
          },
          "googleNewsQuery": {
            "title": "Google News search (optional)",
            "type": "string",
            "description": "Default: the topic."
          },
          "googleNewsLanguage": {
            "title": "Google News edition",
            "type": "string",
            "description": "Country:language, e.g. US:en, ES:es, MX:es-419, BR:pt-419.",
            "default": "US:en"
          },
          "googleNewsMaxItems": {
            "title": "Max Google News articles",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "More articles = better coverage counts.",
            "default": 40
          },
          "googleNewsMaxCostUsd": {
            "title": "Max spend on Google News (USD)",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit for the Google News step.",
            "default": 1
          },
          "onlyNew": {
            "title": "Skip stories from earlier runs",
            "type": "boolean",
            "description": "For a daily schedule: never repeat yesterday's news.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "Spanish",
              "Portuguese",
              "French",
              "German",
              "Italian"
            ],
            "type": "string",
            "description": "Language of summaries and drafts.",
            "default": "English"
          },
          "draftFormats": {
            "title": "Also write drafts for",
            "type": "array",
            "description": "Optional. Leave empty for just the brief.",
            "items": {
              "type": "string",
              "enum": [
                "linkedin",
                "x",
                "newsletter",
                "instagram"
              ],
              "enumTitles": [
                "LinkedIn post",
                "X / Twitter thread",
                "Newsletter item",
                "Instagram carousel"
              ]
            },
            "default": []
          },
          "draftsForTop": {
            "title": "Drafts for the top N stories",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Each story gets one draft per chosen format.",
            "default": 3
          },
          "voice": {
            "title": "Your voice (optional)",
            "type": "string",
            "description": "e.g. 'direct, practical, a bit of humour, I build AI automations for small businesses'."
          },
          "aboutMe": {
            "title": "About you (optional)",
            "type": "string",
            "description": "What you do, so the opinions in the drafts make sense for you."
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "auto",
              "anthropic",
              "openai",
              "openrouter",
              "gemini",
              "xai",
              "deepseek",
              "mistral"
            ],
            "type": "string",
            "description": "Leave all keys empty to use the built-in AI (billed per AI event).",
            "default": "auto"
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Empty = a good default for the provider."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (optional)",
            "type": "string",
            "description": "With your own key (any provider) that provider bills you and AI events are not charged."
          },
          "openaiApiKey": {
            "title": "OpenAI API key (optional)",
            "type": "string",
            "description": "Your own key from platform.openai.com."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key (optional)",
            "type": "string",
            "description": "Your own key from openrouter.ai/keys."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key (optional)",
            "type": "string",
            "description": "Your own key from aistudio.google.com/apikey."
          },
          "xaiApiKey": {
            "title": "xAI (Grok) API key (optional)",
            "type": "string",
            "description": "Your own key from console.x.ai."
          },
          "deepseekApiKey": {
            "title": "DeepSeek API key (optional)",
            "type": "string",
            "description": "Your own key from platform.deepseek.com."
          },
          "mistralApiKey": {
            "title": "Mistral API key (optional)",
            "type": "string",
            "description": "Your own key from console.mistral.ai."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}