{
  "openapi": "3.0.1",
  "info": {
    "title": "Worldwide News Search by Keyword",
    "version": "0.1",
    "x-build-id": "ADB9RoIqAZj9SgsVg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plotpointtech~worldwide-news-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plotpointtech-worldwide-news-search",
        "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/plotpointtech~worldwide-news-search/runs": {
      "post": {
        "operationId": "runs-sync-plotpointtech-worldwide-news-search",
        "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/plotpointtech~worldwide-news-search/run-sync": {
      "post": {
        "operationId": "run-sync-plotpointtech-worldwide-news-search",
        "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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One search per line. Use quotes for exact phrases (\"interest rates\"), OR between alternatives (tesla OR rivian), and a minus sign to exclude words (-sports). Keywords must be at least 3 characters.",
            "default": [
              "\"artificial intelligence\""
            ],
            "items": {
              "type": "string"
            }
          },
          "timespan": {
            "title": "Time window",
            "type": "string",
            "description": "How far back to search, e.g. 6h, 24h, 3d, 2w, 1m. Ignored when a start date is set. GDELT covers about the last 3 months.",
            "default": "1d"
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "UTC start, YYYY-MM-DD or YYYY-MM-DDTHH:MM."
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "UTC end, YYYY-MM-DD or YYYY-MM-DDTHH:MM. Defaults to now."
          },
          "sourceCountries": {
            "title": "Source countries",
            "type": "array",
            "description": "Only outlets based in these countries. Use English country names without spaces (unitedstates, unitedkingdom, germany, india) or two-letter FIPS codes (US, UK, GM, IN). Leave empty for worldwide.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sourceLanguages": {
            "title": "Source languages",
            "type": "array",
            "description": "Only articles written in these languages, e.g. english, spanish, french, german, chinese, arabic. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Only these domains",
            "type": "array",
            "description": "Limit to specific outlets, e.g. reuters.com, bbc.co.uk.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeDomains": {
            "title": "Exclude domains",
            "type": "array",
            "description": "Drop articles from these outlets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxArticles": {
            "title": "Maximum articles per query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop each query after this many articles.",
            "default": 100
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "oldest",
              "relevance"
            ],
            "type": "string",
            "description": "Newest first or oldest first. Relevance applies only when the GDELT search API answers; otherwise newest first is used.",
            "default": "newest"
          },
          "dedupeByTitle": {
            "title": "Remove duplicate headlines",
            "type": "boolean",
            "description": "Drop articles whose headline matches one already returned (syndicated copies on other sites). Duplicate URLs are always removed.",
            "default": true
          },
          "fetchArticleDetails": {
            "title": "Fetch article description and lead paragraphs",
            "type": "boolean",
            "description": "Visit each article page to add its meta description, first paragraphs, author and publish time. Slower; some sites refuse automated visits, in which case these fields stay empty.",
            "default": false
          },
          "engine": {
            "title": "Search engine",
            "enum": [
              "files",
              "api"
            ],
            "type": "string",
            "description": "News files (default) scans GDELT's open 15-minute news files: fast and consistent, and every article includes tone, people, organizations and places. Articles match when your terms appear in the headline, the URL, or the people, organizations, places and topics GDELT detected in the article. GDELT search API tries GDELT's full-text search first, which is often rate-limited for cloud servers; when it is, the run continues with the news files automatically.",
            "default": "files"
          },
          "maxScanDays": {
            "title": "Maximum days to scan in file mode",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "The news-file engine reads every 15-minute file in the window, so long windows take longer. Newest-first searches stop as soon as enough articles are found.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}