{
  "openapi": "3.0.1",
  "info": {
    "title": "GDELT News Search: Global Articles by Keyword, Site, Country",
    "description": "Search worldwide online news from the GDELT DOC 2.0 API by keyword, domain, source country, language, tone and time window. Article URL, title, domain, language, country and date, with a GDELT citation. Only-new mode skips articles seen in earlier runs. Metadata only. Unofficial.",
    "version": "0.2",
    "x-build-id": "DjJCItdcqHzprPQbe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fecklesspleb~gdelt-news-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fecklesspleb-gdelt-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/fecklesspleb~gdelt-news-search/runs": {
      "post": {
        "operationId": "runs-sync-fecklesspleb-gdelt-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/fecklesspleb~gdelt-news-search/run-sync": {
      "post": {
        "operationId": "run-sync-fecklesspleb-gdelt-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "GDELT DOC 2.0 query. Quote exact phrases (\"climate change\"), use OR inside parentheses, and a minus sign to exclude. You may also type GDELT operators here (theme:, near20:). Leave empty only when you set a domain, country or language filter.",
            "default": "\"artificial intelligence\""
          },
          "domains": {
            "title": "Only these news domains",
            "type": "array",
            "description": "Optional. Exact domains such as reuters.com or bbc.co.uk (GDELT domainis: operator). Several domains are combined with OR. At most 20.",
            "items": {
              "type": "string"
            }
          },
          "sourceCountries": {
            "title": "Source countries",
            "type": "array",
            "description": "Optional. Country where the outlet is based: a name without spaces (unitedkingdom, france) or a 2-letter FIPS code (UK, FR). Combined with OR. At most 20.",
            "items": {
              "type": "string"
            }
          },
          "sourceLanguages": {
            "title": "Source languages",
            "type": "array",
            "description": "Optional. Language the article was published in: a name (english, spanish) or a 3-letter code (eng, spa). Combined with OR. At most 20.",
            "items": {
              "type": "string"
            }
          },
          "toneMin": {
            "title": "Minimum tone",
            "minimum": -100,
            "maximum": 100,
            "type": "number",
            "description": "Optional. Only articles with a GDELT tone above this value (for example 5 for clearly positive coverage). GDELT tone usually runs from about -10 to +10."
          },
          "toneMax": {
            "title": "Maximum tone",
            "minimum": -100,
            "maximum": 100,
            "type": "number",
            "description": "Optional. Only articles with a GDELT tone below this value (for example -5 for clearly negative coverage)."
          },
          "timespan": {
            "title": "Time span",
            "type": "string",
            "description": "How far back from now to search: a number and a unit, like 15min, 6h, 1d, 2w or 3m (months). Minimum 15min, maximum about 3 months. Ignored when a start date-time is set.",
            "default": "1d"
          },
          "startDateTime": {
            "title": "Start date-time (UTC)",
            "type": "string",
            "description": "Optional. Search from this moment instead of using the time span, e.g. 2026-11-01 or 2026-11-01T08:00:00Z (UTC). GDELT DOC 2.0 starts in January 2017."
          },
          "endDateTime": {
            "title": "End date-time (UTC)",
            "type": "string",
            "description": "Optional, with a start date-time. Empty means now."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "datedesc",
              "dateasc",
              "hybridrel",
              "tonedesc",
              "toneasc"
            ],
            "type": "string",
            "description": "Newest and oldest first can fetch more than 250 articles by moving the time window; the other orders return one page of at most 250.",
            "default": "datedesc"
          },
          "maxItems": {
            "title": "Max articles",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many articles are saved. Each request returns up to 250 and GDELT allows one request every 5 seconds, so 1,000 articles take about 30 seconds or more.",
            "default": 5
          },
          "onlyNew": {
            "title": "Only articles not seen in earlier runs",
            "type": "boolean",
            "description": "For scheduled runs: skip article URLs saved by earlier runs with the same state key. Skipped articles are not charged.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name for the only-new memory, so several scheduled runs can run side by side. Letters, digits, - and _."
          },
          "fallback": {
            "title": "When the DOC API is unavailable",
            "enum": [
              "auto",
              "off",
              "only"
            ],
            "type": "string",
            "description": "GDELT's DOC API often answers HTTP 429 (rate limit) or times out. With 'auto', after about 40 s (default run) or 75 s (larger runs) of refusals the run searches GDELT's raw article-list files on data.gdeltproject.org instead. That search matches your query on titles and descriptions only (not full text or translations), cannot apply tone filters or the relevance and tone sort orders (then it is not used), and takes source countries from GDELT's 2018 outlet list. Every row says which source it came from (dataSource).",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}