{
  "openapi": "3.0.1",
  "info": {
    "title": "News & Media Monitor (Event Clustering + Sentiment)",
    "description": "Monitor news worldwide by keyword: groups coverage of the same story across sources with sentiment, and supports incremental scheduled runs. Powered by the NewsAPI.ai (Event Registry) API.",
    "version": "0.1",
    "x-build-id": "6I0ZJXE0cyNj4Sr3t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/akozaruk~newsapi-ai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-akozaruk-newsapi-ai-scraper",
        "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/akozaruk~newsapi-ai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-akozaruk-newsapi-ai-scraper",
        "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/akozaruk~newsapi-ai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-akozaruk-newsapi-ai-scraper",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One or more keywords or phrases to search for, one per line (e.g. \"electric vehicles\"). Articles matching ANY of the keywords are returned.",
            "items": {
              "type": "string"
            }
          },
          "keywordsLocation": {
            "title": "Search in",
            "enum": [
              "body",
              "title",
              "title,body"
            ],
            "type": "string",
            "description": "Which part of the article to match the keywords against.",
            "default": "body"
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Restrict results to these article languages. Pick from the list or type a custom ISO 639 3-letter code. Leave empty for all languages.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "eng",
                "spa",
                "deu",
                "fra",
                "ita",
                "por",
                "rus",
                "zho",
                "jpn",
                "ara",
                "ukr",
                "nld",
                "pol",
                "tur",
                "kor",
                "hin",
                "ces",
                "swe",
                "dan",
                "nor",
                "fin",
                "ell",
                "heb",
                "ron",
                "hun",
                "vie",
                "tha",
                "ind",
                "slk"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "German",
                "French",
                "Italian",
                "Portuguese",
                "Russian",
                "Chinese",
                "Japanese",
                "Arabic",
                "Ukrainian",
                "Dutch",
                "Polish",
                "Turkish",
                "Korean",
                "Hindi",
                "Czech",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Greek",
                "Hebrew",
                "Romanian",
                "Hungarian",
                "Vietnamese",
                "Thai",
                "Indonesian",
                "Slovak"
              ]
            },
            "default": []
          },
          "dateStart": {
            "title": "Date from",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only return articles published on or after this date. Leave empty for no lower limit."
          },
          "dateEnd": {
            "title": "Date to",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only return articles published on or before this date. Leave empty for no upper limit."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "rel",
              "sourceImportance",
              "socialScore"
            ],
            "type": "string",
            "description": "Order in which matching articles are returned.",
            "default": "date"
          },
          "maxArticles": {
            "title": "Max articles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of articles to fetch in total. Each page of results counts against this Actor's shared monthly search quota, so please keep this conservative.",
            "default": 50
          },
          "groupIntoEvents": {
            "title": "Group into stories (event clustering)",
            "type": "boolean",
            "description": "Group articles covering the same real-world event into one dataset item, showing how many sources reported it and their average sentiment. Turn off to get one flat dataset item per article instead.",
            "default": true
          },
          "incrementalMode": {
            "title": "Incremental monitoring mode",
            "type": "boolean",
            "description": "Only fetch articles published since the last run with the same keywords/languages. Designed for scheduling this Actor to run repeatedly (e.g. daily) as a monitor, without re-fetching or re-paying for articles you've already seen. The very first run still uses \"Date from\"/\"Date to\" if set.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}