> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gdeltcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List incidents

> Stories, Events and a country check, and how to trade recall for precision.

[EventBench](https://gdeltcloud.com/benchmarks/events) measured conflict Stories plus Events with
deaths, every page.

| You want | Ask for |
| - | - |
| **Recall** | Stories and Events, every page, then the country check. |
| **Precision** | Events of one kind located in the country, first page only. |

## 1. Stories

Stories carry incidents that were never coded as Events.

```bash theme={null}
curl -G "https://gdeltcloud.com/api/v2/stories" \
  --data-urlencode "country=Nigeria" \
  --data-urlencode "story_category=conflict_security,cameoplus_crime" \
  --data-urlencode "date_start=2026-11-16" \
  --data-urlencode "date_end=2026-11-25" \
  --data-urlencode "limit=100" \
  -H "Authorization: Bearer $GDELT_CLOUD_API_KEY"
```

Stories are dated by the day they were reported, so the window ends a few days after the period.

## 2. Keep the Stories about the country

`geo.country` is the first country a Story is about, else where its Event happened.

```python theme={null}
stories = [s for s in stories if s["geo"]["country"] == "Nigeria"]
```

## 3. Events: conflict deaths and violent crime

`has_fatalities` covers conflict Events. Violent crime, killings included, is
[`CR01`](https://docs.gdeltcloud.com/reference/codes-crime#cr01); ask for it separately.

```bash theme={null}
curl -G "https://gdeltcloud.com/api/v2/events" \
  --data-urlencode "country=Nigeria" \
  --data-urlencode "country_match=location" \
  --data-urlencode "has_fatalities=true" \
  --data-urlencode "date_start=2026-11-16" \
  --data-urlencode "date_end=2026-11-22" \
  --data-urlencode "limit=100" \
  -H "Authorization: Bearer $GDELT_CLOUD_API_KEY"

curl -G "https://gdeltcloud.com/api/v2/events" \
  --data-urlencode "country=Nigeria" \
  --data-urlencode "country_match=location" \
  --data-urlencode "category=CRIME" \
  --data-urlencode "subcategory=CR01" \
  --data-urlencode "date_start=2026-11-16" \
  --data-urlencode "date_end=2026-11-22" \
  --data-urlencode "limit=100" \
  -H "Authorization: Bearer $GDELT_CLOUD_API_KEY"
```

## 4. Every page, or the first

For recall, send `pagination.next_cursor` back as `cursor` until it is `null`. For a short list,
stop after the first page. On `CURSOR_STALE`, start that list again.

```python theme={null}
import os, requests

API = "https://gdeltcloud.com"
HEADERS = {"Authorization": f"Bearer {os.environ['GDELT_CLOUD_API_KEY']}"}

def rows(path, params, max_pages=None):
    params, pages = dict(params, limit=100), 0
    while True:
        r = requests.get(API + path, headers=HEADERS, params=params)
        r.raise_for_status()
        body = r.json()
        yield from body["data"]
        pages += 1
        cursor = body["pagination"]["next_cursor"]
        if not cursor or pages == max_pages:
            return
        params["cursor"] = cursor

week = {"country": "Nigeria", "date_start": "2026-11-16", "date_end": "2026-11-22"}

stories = [s for s in rows("/api/v2/stories", {
    "country": "Nigeria", "story_category": "conflict_security,cameoplus_crime",
    "date_start": "2026-11-16", "date_end": "2026-11-25",
}) if s["geo"]["country"] == "Nigeria"]

events = [
    *rows("/api/v2/events", {**week, "country_match": "location", "has_fatalities": "true"}),
    *rows("/api/v2/events", {**week, "country_match": "location", "category": "CRIME", "subcategory": "CR01"}),
]
```

## 5. Count each incident once

Drop repeated Events, skip Events whose Story is listed, and count the rest once per Story and per
`incident.uid`.

```python theme={null}
events = list({e["id"]: e for e in events}.values())
seen_stories, seen_incidents, extra = {s["id"] for s in stories}, set(), 0
for e in events:
    refs, uid = {r["id"] for r in e["story_refs"]}, e["incident"]["uid"]
    if not (refs & seen_stories or uid in seen_incidents):
        extra += 1
    seen_stories |= refs
    seen_incidents.add(uid)
incident_count = len(stories) + extra
```

## One kind of event

For "every protest in India this week", ask for one [category](https://docs.gdeltcloud.com/reference/enums.md#event_category)
located in one country.

```bash theme={null}
curl -G "https://gdeltcloud.com/api/v2/events" \
  --data-urlencode "country=India" \
  --data-urlencode "country_match=location" \
  --data-urlencode "category=Protests" \
  --data-urlencode "date_start=2026-11-16" \
  --data-urlencode "date_end=2026-11-22" \
  --data-urlencode "limit=100" \
  -H "Authorization: Bearer $GDELT_CLOUD_API_KEY"
```

## On a schedule

Save any list above as a [Monitor](https://docs.gdeltcloud.com/guides/monitors.md). Scheduled checks use no Query Units.

## Next

> [card] [Concepts](https://docs.gdeltcloud.com/concepts.md)
>
> What Stories, Events and their dates mean.

> [card] [Recipes](https://docs.gdeltcloud.com/guides/recipes.md)
>
> Copy-paste queries for common questions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.