{
  "openapi": "3.0.1",
  "info": {
    "title": "News API - Global Events, Breaking News, Entities (NewsAPI.ai)",
    "description": "Search global news articles and events from the Event Registry API (NewsAPI.ai) into a dataset: keyword and entity search, event clusters, breaking events, minute streams, article details, sentiment, concepts and categories. Lookup concept and source URIs. Read only. Bring your own NewsAPI.ai key.",
    "version": "0.1",
    "x-build-id": "LahIimd8UwMPI1dpy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~global-news-events-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-global-news-events-api",
        "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/nabeelbaghoor~global-news-events-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-global-news-events-api",
        "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/nabeelbaghoor~global-news-events-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-global-news-events-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "articles",
              "events",
              "breakingEvents",
              "eventDetails",
              "eventArticles",
              "articleDetails",
              "articleStream",
              "eventStream",
              "lookup"
            ],
            "type": "string",
            "description": "Article search and event search find news by keywords, concepts, categories, sources, locations, languages and dates. Breaking events lists what is spiking right now. Event details and articles about an event read events by URI. Article details reads articles by URI. The two streams return what was added in the last minutes. The lookup turns names into the URIs the searches take.",
            "default": "articles"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Article search, event search and the streams. Words or phrases to find, one per line, at most 60.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "and",
              "or"
            ],
            "type": "string",
            "description": "With several keywords: all must appear (and) or any may appear (or).",
            "default": "and"
          },
          "keywordLocation": {
            "title": "Keyword location",
            "enum": [
              "body",
              "title",
              "body,title"
            ],
            "type": "string",
            "description": "Search the keywords in the body, the title, or both.",
            "default": "body"
          },
          "keywordSearchMode": {
            "title": "Keyword search mode",
            "enum": [
              "phrase",
              "exact",
              "simple"
            ],
            "type": "string",
            "description": "Phrase matches each keyword as an exact phrase. Exact reads the Boolean query language (AND, OR, NOT, NEAR, NEXT). Simple is a relevance search that does not need every term.",
            "default": "phrase"
          },
          "conceptUris": {
            "title": "Concept URIs",
            "type": "array",
            "description": "Entities and topics the news must be about, as Wikipedia URIs such as http://en.wikipedia.org/wiki/Tesla,_Inc., one per line, at most 50. Find URIs with the lookup mode.",
            "items": {
              "type": "string"
            }
          },
          "conceptMatch": {
            "title": "Concept match",
            "enum": [
              "and",
              "or"
            ],
            "type": "string",
            "description": "With several concepts: all must be present (and) or any (or).",
            "default": "and"
          },
          "categoryUris": {
            "title": "Category URIs",
            "type": "array",
            "description": "Categories such as news/Business or dmoz/Business/Accounting, one per line, at most 20.",
            "items": {
              "type": "string"
            }
          },
          "categoryMatch": {
            "title": "Category match",
            "enum": [
              "or",
              "and"
            ],
            "type": "string",
            "description": "With several categories: any may match (or) or all must (and).",
            "default": "or"
          },
          "sourceUris": {
            "title": "Sources",
            "type": "array",
            "description": "News source domains such as bbc.co.uk or reuters.com, one per line.",
            "items": {
              "type": "string"
            }
          },
          "sourceLocationUris": {
            "title": "Source locations",
            "type": "array",
            "description": "Only sources based in these places, as location URIs such as http://en.wikipedia.org/wiki/Germany.",
            "items": {
              "type": "string"
            }
          },
          "sourceGroupUris": {
            "title": "Source groups",
            "type": "array",
            "description": "Predefined groups of sources such as general/ERtop10.",
            "items": {
              "type": "string"
            }
          },
          "authorUris": {
            "title": "Author URIs",
            "type": "array",
            "description": "Authors such as john_doe@techcrunch.com. Find URIs with the lookup mode.",
            "items": {
              "type": "string"
            }
          },
          "locationUris": {
            "title": "Locations",
            "type": "array",
            "description": "Where the news happened, as location URIs such as http://en.wikipedia.org/wiki/United_States.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "ISO 639-3 codes such as eng, deu, spa or fra, at most 5. Also filters the articles about an event.",
            "items": {
              "type": "string"
            }
          },
          "ignoreKeywords": {
            "title": "Keywords to exclude",
            "type": "array",
            "description": "Article and event search. Drop results that mention any of these.",
            "items": {
              "type": "string"
            }
          },
          "ignoreSourceUris": {
            "title": "Sources to exclude",
            "type": "array",
            "description": "Article and event search. Drop results from these source domains.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Article and event search. On or after this date, as YYYY-MM-DD. For events this is the event date, which can differ from when articles were published."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Article and event search. On or before this date, as YYYY-MM-DD."
          },
          "recentDataWindow": {
            "title": "Recent data window",
            "enum": [
              "7",
              "31"
            ],
            "type": "string",
            "description": "Article and event search. Search only the last 7 or 31 days, which uses the fewest tokens. Leave empty to search the archive too (your plan decides how far back)."
          },
          "articleSort": {
            "title": "Article sort order",
            "enum": [
              "date",
              "rel",
              "sourceImportance",
              "sourceAlexaGlobalRank",
              "sourceAlexaCountryRank"
            ],
            "type": "string",
            "description": "Article search. Newest first, relevance, or source importance and rank.",
            "default": "date"
          },
          "eventSort": {
            "title": "Event sort order",
            "enum": [
              "date",
              "rel",
              "size"
            ],
            "type": "string",
            "description": "Event search. By event date, relevance, or size (number of articles).",
            "default": "date"
          },
          "sortAscending": {
            "title": "Sort ascending",
            "type": "boolean",
            "description": "Article and event search. Oldest or smallest first instead of newest or largest first."
          },
          "dataTypes": {
            "title": "Content types",
            "type": "array",
            "description": "Article search and the article stream. News (the default), press releases, blogs.",
            "items": {
              "type": "string",
              "enum": [
                "news",
                "pr",
                "blog"
              ],
              "enumTitles": [
                "News",
                "Press releases",
                "Blogs"
              ]
            }
          },
          "minSentiment": {
            "title": "Minimum sentiment",
            "minimum": -1,
            "maximum": 1,
            "type": "number",
            "description": "Article search, event search and the article stream. From -1 (very negative) to 1 (very positive). Setting it limits results to English, the only language with sentiment."
          },
          "maxSentiment": {
            "title": "Maximum sentiment",
            "minimum": -1,
            "maximum": 1,
            "type": "number",
            "description": "From -1 to 1. Same modes as the minimum."
          },
          "duplicateFilter": {
            "title": "Duplicates",
            "enum": [
              "keepAll",
              "skipDuplicates",
              "keepOnlyDuplicates"
            ],
            "type": "string",
            "description": "Article search and the article stream. Keep all, skip duplicates, or keep only duplicates (copies of an article on other sources).",
            "default": "keepAll"
          },
          "eventFilter": {
            "title": "Articles with or without an event",
            "enum": [
              "keepAll",
              "skipArticlesWithoutEvent",
              "keepOnlyArticlesWithoutEvent"
            ],
            "type": "string",
            "description": "Article search and the article stream. Keep all, only articles assigned to an event, or only articles without one.",
            "default": "keepAll"
          },
          "sourceRankStart": {
            "title": "Source rank start percentile",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Article search and the article stream. 0 to 90 in steps of 10; 0 is the top ranked sources."
          },
          "sourceRankEnd": {
            "title": "Source rank end percentile",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "10 to 100 in steps of 10. For example 0 to 30 keeps the top 30 percent of sources."
          },
          "minArticlesInEvent": {
            "title": "Minimum articles per event",
            "minimum": 1,
            "type": "integer",
            "description": "Event search and the event stream. Only events reported in at least this many articles."
          },
          "maxArticlesInEvent": {
            "title": "Maximum articles per event",
            "minimum": 1,
            "type": "integer",
            "description": "Event search and the event stream. Only events reported in at most this many articles."
          },
          "minBreakingScore": {
            "title": "Minimum breaking score",
            "minimum": 0,
            "type": "number",
            "description": "Breaking events. How strongly an event must be breaking to be listed; the provider default is 0.2.",
            "default": 0.2
          },
          "streamMinutesBack": {
            "title": "Minutes back",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "The two streams. Return what was added in this many minutes, up to 240 (4 hours).",
            "default": 10
          },
          "eventUris": {
            "title": "Event URIs",
            "type": "array",
            "description": "Event details and articles about an event. Event URIs such as eng-2940883, one per line, from the uri column of an event search.",
            "items": {
              "type": "string"
            }
          },
          "includeDuplicates": {
            "title": "Include duplicate articles",
            "type": "boolean",
            "description": "Articles about an event. Also return copies of articles republished by other sources."
          },
          "articleUris": {
            "title": "Article URIs",
            "type": "array",
            "description": "Article details. Article URIs from the uri column of an article search, one per line; read 100 to a request.",
            "items": {
              "type": "string"
            }
          },
          "lookupType": {
            "title": "Lookup type",
            "enum": [
              "concepts",
              "categories",
              "sources",
              "authors",
              "locations"
            ],
            "type": "string",
            "description": "Lookup. What to look up: concepts (people, organisations, places, topics), categories, news sources, authors or locations.",
            "default": "concepts"
          },
          "lookupTerms": {
            "title": "Lookup terms",
            "type": "array",
            "description": "Lookup. Names or partial names such as Tesla, bbc or Germany, one per line. Each returns its candidates with their URIs.",
            "items": {
              "type": "string"
            }
          },
          "articleBodyLength": {
            "title": "Article body length",
            "minimum": -1,
            "type": "integer",
            "description": "Article modes. Characters of article body to return: -1 for the full body, 0 for none. Full article text is third-party content; check your rights before republishing it.",
            "default": -1
          },
          "includeConcepts": {
            "title": "Include concepts",
            "type": "boolean",
            "description": "Return the people, organisations, places and topics found in each article or event.",
            "default": true
          },
          "includeCategories": {
            "title": "Include categories",
            "type": "boolean",
            "description": "Return the categories of each article or event.",
            "default": true
          },
          "includeLocation": {
            "title": "Include location",
            "type": "boolean",
            "description": "Return the location each article or event is about."
          },
          "includeSocialScore": {
            "title": "Include social score",
            "type": "boolean",
            "description": "Return social media share counts or the social score."
          },
          "eventImageCount": {
            "title": "Event image count",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Event modes. How many image URLs to return per event, 0 for none."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Searches read 100 articles or 50 events a page; the streams return up to 2000 in one request.",
            "default": 200
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. The provider allows a few simultaneous requests; the actor sends one at a time and retries when it answers 429.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own NewsAPI.ai API key, shown on your NewsAPI.ai dashboard. Stored as a secret and sent as the apiKey field of each request body; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}