# How to query the GDELT API without drowning the agent

DevFeed: [How to query the GDELT API without drowning the agent](<https://devfeed.tech/articles/how-to-query-the-gdelt-api-without-drowning-the-agent-109709.md>)

Original publisher: [Read original article](<https://www.swytchcode.com/content/gdelt-api-research-agents>)

Author: Swytchcode Team

Published: 2026-10-30T19:06:52Z

Content type: tutorial

Language: en

Sources: [Swytchcode](<https://devfeed.tech/sources/swytchcode.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [API Governance](<https://devfeed.tech/topics/api-governance.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [api](<https://devfeed.tech/tags/api.md>), [articles](<https://devfeed.tech/tags/articles.md>), [doc](<https://devfeed.tech/tags/doc.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [html](<https://devfeed.tech/tags/html.md>), [json](<https://devfeed.tech/tags/json.md>), [query](<https://devfeed.tech/tags/query.md>)

## AI overview

GDELT DOC API queries need no key, but its defaults can overwhelm a research agent: a three-month search returns HTML, and article list mode defaults to 75 results. For a focused article search, set a short timespan, `mode=artlist`, `format=json`, a modest `maxrecords`, and `sort=datedesc` when recency matters. Use `TimelineVol` for coverage trends; it ignores `maxrecords`. The endpoint only supports datetimes within the last three months. Space calls at least five seconds apart after HTTP 429 responses; retrying immediately can keep triggering the limit. The article also says `swy search gdelt` currently returns no provider, so direct calls require reviewed code unless using the described Business or Enterprise bring-your-own-provider path.

## Source excerpt

GDELT's DOC API needs no key. The default search is three months of HTML, up to 75 articles. Set timespan, maxrecords, and format=json, then wait out a 429.