What is in the Event Database and the Global Knowledge Graph, how to query them through BigQuery and the DOC 2.0 API, the fields that matter, and the pitfalls to avoid.
GDELT is the largest open record of world news, and every index on this site is built from it. This guide covers what researchers need: what is in GDELT, how to get it, which fields matter, and the mistakes to avoid. It ends with the query that underlies a country-level conflict share like the African GPR Index.
The Global Database of Events, Language, and Tone (Leetaru and Schrodt, 2013) monitors news media worldwide and turns it into structured data. Two products matter most for research:
| Dataset | Unit | Starts | Updates | Best for |
|---|---|---|---|---|
| Event Database 1.0 | Event | 1979 | Daily | Long histories, country panels |
| Event Database 2.0 + Mentions | Event, mention | Feb 2015 | Every 15 min | Recent events, multilingual sources, coverage intensity |
| Global Knowledge Graph 2.0 | Article | Feb 2015 | Every 15 min | Theme- and source-based indices, text measures |
| DOC 2.0 API | Article search | Rolling recent window | Live | Quick timelines and article lists |
GDELT posts every 15-minute file as a zipped, tab-delimited CSV. The file http://data.gdeltproject.org/gdeltv2/masterfilelist.txt lists every file ever published, and lastupdate.txt the newest. Raw files are free and suit a pipeline that keeps a local copy.
All GDELT datasets are public tables in BigQuery (project gdelt-bq), for example gdelt-bq.gdeltv2.events and gdelt-bq.gdeltv2.gkg, with date-partitioned versions that cut cost. BigQuery is the fastest route for country-day aggregates over many years. Queries are billed by data scanned, so select only the columns and date partitions you need; check the table list in the BigQuery console, as names and partitioning can change.
The DOC API searches recent coverage without any setup and returns article lists or timelines as JSON or CSV:
https://api.gdeltproject.org/api/v2/doc/doc?query=(sanctions OR blockade) sourcecountry:egypt&mode=timelinevol×pan=3months&format=json
Useful modes are artlist (up to 250 articles per call), timelinevol (share of coverage over time) and timelinetone. Operators such as sourcelang:, sourcecountry:, domain: and theme: go inside the query.
import requests, pandas as pd
r = requests.get("https://api.gdeltproject.org/api/v2/doc/doc", params={
"query": '"strait of hormuz"', "mode": "timelinevol",
"timespan": "3months", "format": "json"}, timeout=60)
data = r.json() if r.headers.get("content-type", "").startswith("application/json") else {}
if not data.get("timeline"):
raise SystemExit("No results (or an error message): " + r.text[:200])
df = pd.DataFrame(data["timeline"][0]["data"]) # columns: date, value (% of coverage)
print(df.tail())
| Field | Table | Use |
|---|---|---|
QuadClass | Events | 1 verbal cooperation, 2 material cooperation, 3 verbal conflict, 4 material conflict. Classes 3 and 4 are the basis of threats vs acts. |
EventRootCode, EventCode | Events | CAMEO action codes, e.g. 13 threaten, 18 assault, 19 fight, 20 mass violence. |
GoldsteinScale | Events | Theoretical impact on stability, from −10 to +10. |
NumArticles, NumMentions | Events | Coverage intensity; use as weights. |
ActionGeo_CountryCode | Events | Where the event happened. These are FIPS 10-4 codes, not ISO (Nigeria is NI, Niger is NG). |
V2Themes, V2Locations | GKG | Themes (e.g. ARMEDCONFLICT, TERROR, SANCTIONS) and places mentioned in each article. |
SourceCommonName | GKG | The outlet, used to build source-restricted corpora such as pan-Arab or local South American press. |
This BigQuery query computes, for three Sahel countries, the article-weighted share of each day's event coverage that is verbal or material conflict. It is the core of the event-based construction used for the African and European indices (before normalization).
SELECT
PARSE_DATE('%Y%m%d', CAST(SQLDATE AS STRING)) AS day,
ActionGeo_CountryCode AS fips,
SAFE_DIVIDE(SUM(IF(QuadClass = 3, NumArticles, 0)), SUM(NumArticles)) AS threats_share,
SAFE_DIVIDE(SUM(IF(QuadClass = 4, NumArticles, 0)), SUM(NumArticles)) AS acts_share,
SAFE_DIVIDE(SUM(IF(QuadClass IN (3, 4), NumArticles, 0)), SUM(NumArticles)) AS conflict_share
FROM `gdelt-bq.gdeltv2.events_partitioned`
WHERE _PARTITIONTIME >= TIMESTAMP('2026-01-01') -- date added to GDELT
AND SQLDATE >= 20260101 -- date the event happened
AND ActionGeo_CountryCode IN ('ML', 'UV', 'NG') -- Mali, Burkina Faso, Niger (FIPS)
GROUP BY day, fips
ORDER BY day, fips;
To turn the share into an index, divide by its average over a reference period and multiply by 100. If you would rather not run it yourself, the finished series for every country is free on the countries page.
GDELT (the Global Database of Events, Language, and Tone) is an open project that monitors print, broadcast and web news worldwide, codes the events it reports, and records themes, locations, people and tone. Its event record starts in 1979.
GDELT 2.0 (the Event Database 2.0, Mentions table and Global Knowledge Graph 2.0) updates every 15 minutes. GDELT 1.0 daily files are posted each morning.
Yes. GDELT's raw files and APIs are free. Querying the GDELT tables in Google BigQuery is billed by Google according to the data scanned, after BigQuery's free monthly allowance.
The DOC 2.0 API searches a rolling window of recent coverage (the last three months by default). For older data, use the raw files or BigQuery.
GDELT 2.0 machine-translates coverage in 65 languages, so you can search non-English news with English terms.
Leetaru, K., & Schrodt, P. A. (2013). GDELT: Global data on events, location, and tone, 1979–2012. ISA Annual Convention. If you use the GPR Data Hub's indices, please also cite the relevant working paper.