Search GDELT Sentences
gdelt_search_sentencesSearch the sentences of the last 72 hours of English-language news coverage with the GDELT Context 2.0 API, to read what coverage actually said. Every query term must fall inside one sentence; each match returns that sentence, the text around it, and its article URL, title, domain, and seen date — one sentence per article. Matches come newest first (dateDesc) or oldest first (dateAsc); there is no relevance ranking. maxRecords counts matching sentences before GDELT keeps one per article, so pages run short, and a page that is not every match hands back continuationWindow, the startDatetime/endDatetime that reaches the next matches. GDELT reads window bounds only to the minute, so a page whose matches all fall in one minute cannot be continued inside it: raise maxRecords, and at its 200 ceiling continuationWindow skips past that minute. Query operators: phrases ("bird flu"), OR groups ((ukraine OR gaza) ceasefire), -term to exclude an exact word, near5:"trump putin", and repeat2:"ukraine"; quotesOnly keeps sentences holding a quotation mark. For the DOC-only filters (sourcecountry:, sourcelang:, theme:, tone), domain filtering, other languages, or coverage older than 72 hours, use gdelt_search_articles.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "gdelt_search_sentences"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | dateDesc (default) returns the newest matches first, dateAsc the oldest. The Context API has no relevance order. | dateDesc |
| query | Yes | Words and phrases that must all appear in one sentence. Supports phrases ("bird flu"), OR groups ((ukraine OR gaza) ceasefire), -term to exclude an exact word (-russia still matches "Russian"), near5:"trump putin" (words within about five words of each other), and repeat2:"ukraine" (a word at least twice). GDELT refuses the DOC-only operators sourcecountry:, sourcelang:, theme:, and tone here. | |
| timespan | No | Window counting back from now: a whole number followed by min, h, hours, d, or days, in any case, from 31min to 72h (e.g. "6h", "3days"). A longer one runs as 72h with a windowClamp disclosure; a shorter one, or another unit such as w or m, is refused. Defaults to 72h. Ignored when startDatetime/endDatetime are set. | |
| maxRecords | No | Matching sentences to request. Defaults to 25. GDELT counts sentences before keeping one per article, so a page usually holds fewer matches; follow continuationWindow for the rest. Values above 200 run at 200 with a limitClamp disclosure unless clamping is disabled. | |
| quotesOnly | No | Keep only sentences holding a quotation mark. The sentence may hold only part of a longer quotation. | |
| endDatetime | No | End of an explicit window in GDELT format YYYYMMDDHHMMSS (UTC, exactly 14 digits). Must pair with startDatetime. A window ending before the last 72 hours is refused. | |
| startDatetime | No | Start of an explicit window in GDELT format YYYYMMDDHHMMSS (UTC, exactly 14 digits). Must pair with endDatetime. A start older than 72 hours runs from 5 minutes inside the reach, disclosed in windowClamp. A window under 60 minutes goes upstream widened, and matches outside it are dropped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | When the query's terms were joined by OR outside parentheses, the grouped query that ran. Guidance on this page: when nothing matched, how to broaden the query or window; when GDELT returned matches outside an explicit window — it reads window bounds only to the minute, and a window under 60 minutes goes out widened — how many were dropped; when continuationWindow is present, that this page is not every match; when the page reached past the far edge of its window, that it holds every match in it; and when no narrower window reaches further matches, why, and whether a larger maxRecords helps — or, at the 200 ceiling, that continuationWindow skips the rest of the one minute every match on the page fell in. | |
| matches | No | One matching sentence per article, in the requested date order. | |
| timespan | No | The timespan the request ran with: the one sent, trimmed, or 72h when none was sent or a longer one was clamped. Absent when startDatetime/endDatetime were used. | |
| limitClamp | No | Present only when the requested count exceeded the per-call cap: the call ran exactly as a call at the cap, and every count, notice, and continuation in this response reflects the applied value. | |
| totalCount | No | Number of matches returned in this response. | |
| windowClamp | No | Present only when the requested window reached further back than the API searches: the search ran on the applied window instead, and every count, notice, and continuation in this response reflects it. Absent when the search ran on the window requested. | |
| staleResponse | No | Present only when the refetch of this exact request was refused, failed, or came back empty, and the response is GDELT's stored answer from fetchedAt instead. It holds nothing published after fetchedAt; a relative timespan covers the window ending at fetchedAt, not now. Absent on a live answer. | |
| effectiveQuery | No | The query the call ran, for use in follow-up calls: the query given or, when it only joins terms with OR outside parentheses, those terms as one group. | |
| continuationWindow | No | The window that reaches the next matches: re-run the same call with these as startDatetime and endDatetime. GDELT reads window bounds only to the minute, so under dateDesc it ends on the whole minute at or after the oldest match on this page and under dateAsc starts on the whole minute at or before the newest; matches seen in that minute can repeat — de-duplicate by url. On a page at the 200 maxRecords ceiling whose matches all fall in one minute, it skips past that minute instead, since no window reaches the rest of it. Absent on an empty page, on a page that holds every match in its window, and when no narrower window reaches further matches. |